From 50a3b68a0bec160970e22e9ebbfc11b2598e8eb8 Mon Sep 17 00:00:00 2001 From: ArmaX <407448+armanist@users.noreply.github.com> Date: Mon, 12 Jan 2026 14:18:04 +0400 Subject: [PATCH] Enhance CONTRIBUTING.md with new setup steps Updated contributing guidelines to include static analysis and code style checks. --- CONTRIBUTING.md | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d9c07b271..1345b22c3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,9 +6,9 @@ Thanks for your interest in contributing to Quantum PHP Framework πŸ’‘ Whether y ## Before You Start -Familiarize yourself with the codebase: Quantum PHP Framework is modular β€” most features live under `/src` (core logic) and `/modules` (demo templates and optional components). Start by reviewing the `Router`, `Controller`, and `QtModel` classes to understand the framework flow. -Check existing issues and milestones: look for tickets labeled `good first issue`, `help wanted`, or assigned to an upcoming version. -Don’t hesitate to open a new issue if you find something worth improving. +- Familiarize yourself with the codebase: Quantum PHP Framework is modular β€” most features live under `/src` (core logic) and `/modules` (demo templates and optional components). Start by reviewing the `Router`, `Controller`, and `QtModel` classes to understand the framework flow. +- Check existing issues and milestones: look for tickets labeled `good first issue`, `help wanted`, or assigned to an upcoming version. +- Don’t hesitate to open a new issue if you find something worth improving. --- @@ -60,26 +60,39 @@ git checkout -b feature/your-feature-name vendor/bin/phpunit --stderr ``` -4. Commit and push your branch: +4. Run Static Analysis: + +```bash +vendor/bin/phpstan analyse --memory-limit=-1 +``` + +5. Run Code Style Checks + +```bash +vendor/bin/php-cs-fixer check +``` + +6. Commit and push your branch: ```bash git commit -m "Add: SoftDeletes trait for models" git push origin feature/your-feature-name ``` -5. Open a Pull Request from your fork β†’ `softberg/quantum-php-core`. Describe **what** you changed, **why**, and **how** to test it. Reference any related issues. Always work in a branch, never directly on `main` of your fork. +7. Open a Pull Request from your fork β†’ `softberg/quantum-php-core`. Describe **what** you changed, **why**, and **how** to test it. Reference any related issues. Always work in a branch, never directly on `main` of your fork. --- ## Testing Quantum uses **PHPUnit** for tests. If you add new features, make sure they include unit tests β€” especially for database or HTTP-related components. For in-memory testing, use SQLite in-memory databases (for example, in tests using IdiormDbal). +All contributions must also pass **PHPStan** (static analysis) and **PHP-CS-Fixer** (code style) checks. --- ## Code Guidelines -- PHP 7.3+ compatibility is required. +- PHP 7.4+ compatibility is required. - Keep class responsibilities clear β€” avoid bloated classes. - Follow the existing directory structure - Always document public methods.