From 06417569535dcb0f4a9912ab52c0151cc1da99ef Mon Sep 17 00:00:00 2001 From: Riddick Date: Fri, 19 Jun 2026 12:13:25 +0200 Subject: [PATCH 1/5] Core-Standard-3 Introduce PHPStan and PHPUnit infrastructure Integrated foundational development tooling into the Core repository by configuring PHPStan for static analysis and bootstrapping PHPUnit for testing. Updated the README to reflect these changes and outline branch-specific details. This setup establishes a baseline for static guarantees, type safety, and deterministic testing, supporting future CI/CD integration and long-term architectural goals. --- README.md | 109 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 6a6e86b..6ca89bc 100644 --- a/README.md +++ b/README.md @@ -23,19 +23,19 @@

- + GitHub last commit (branch) - + GitHub activity (branch) - + GitHub commit difference between two branches

@@ -45,47 +45,92 @@ Standard provides the base classes, kernel, domain layer, and minimal runtime ut --- -## FireHub Icon Development Branch +## FireHub Icon Introduce PHPStan and PHPUnit infrastructure – Development Branch -⚠️ **This is the `develop` branch** +⚠️ **This is the `development` branch** - Unstable - APIs may change without notice - Not intended for production use +### Related + +- Milestone: **Development v1** +- Target Release: **v0.0.0** +- Repository: FireHub Core Standard + +### Pull request + +

+ + GitHub pull request title + + GitHub pull request author + + GitHub pull request created + + GitHub pull request comments +

+ +### Milestone + +

+ + GitHub milestone details +

+ ## FireHub Icon Branch Purpose -The `develop` branch is the **primary integration branch** for all ongoing development. +Introduce foundational development tooling into FireHub Core by setting up: + +- PHPStan static analysis configuration +- PHPUnit testing framework bootstrap +- Baseline structure for future CI enforcement + +This branch establishes the initial quality assurance layer for the Core repository. + +## FireHub Icon Architectural Goal + +To decouple Core implementation logic from quality enforcement mechanisms, by introducing a dedicated tooling layer that: + +- Enforces type safety and architectural consistency (PHPStan) +- Enables deterministic regression testing (PHPUnit) +- Prepares Core for CI/CD quality gates without affecting runtime behavior -It serves as the staging area where: -- Feature branches are merged -- Bug fixes are integrated -- Experimental work is stabilized -- Code is prepared for upcoming releases +This ensures that Core remains: -All **release branches** are created **from `develop`**. +- framework-agnostic at runtime +- strictly validated at development time +- stable for long-term evolution -## Stability Guarantee +## FireHub Icon Core Concept -❌ No backward compatibility guarantee -❌ APIs may change without notice -❌ Behavior may be incomplete or inconsistent -❌ Breaking changes are expected +> “Core is not validated by runtime behavior, but by enforced static guarantees.” -This branch is intended **only for contributors and advanced testers**. +This branch introduces the idea that: -## FireHub Icon Composer Usage (Not Recommended) +- Core correctness is proactively enforced (static analysis + tests) +- not reactively discovered in production -For internal testing only: +It formalizes the principle: -```json -{ - "require": { - "the-firehub-project/core-standard": "dev-develop" - } -} -``` -⚠️ Never use dev-develop in production. +- Runtime = execution layer +- Tooling = correctness layer ## FireHub Icon Authors and Contributors @@ -102,4 +147,4 @@ Architecture guidelines, design principles, and ecosystem documentation are avai This software is licensed under the Apache-2.0 License. -For more details, read the full license [here](./LICENSE). +For more details, read the full license [here](./LICENSE). \ No newline at end of file From b8128994852461f201e1288be6b870d20ce1b367 Mon Sep 17 00:00:00 2001 From: Riddick Date: Tue, 23 Jun 2026 10:31:39 +0200 Subject: [PATCH 2/5] Update CITATION.cff with corrected Packagist URL Revised the `packagist` URL in the CITATION.cff file to reflect the correct namespace (`the-firehub-project/core-standard`). This ensures proper attribution and accurate package reference for external tools and repositories. --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index 3ad7641..9dd7bdb 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -38,4 +38,4 @@ identifiers: value: "https://github.com/The-FireHub-Project/Core-Standard" description: The GitHub URL of this version. - type: other - value: "packagist:firehub/core-standard" + value: "packagist:the-firehub-project/core-standard" From 96fb9b139c49278be8971d7f8105f70a7463fc1f Mon Sep 17 00:00:00 2001 From: Riddick Date: Tue, 23 Jun 2026 10:32:20 +0200 Subject: [PATCH 3/5] Add PHPStan configuration and dependencies for static analysis Configured PHPStan by introducing a `phpstan.neon` file and adding `phpstan/phpstan` and `the-firehub-project/phpstan-rules` as development dependencies in `composer.json`. Updated `.gitattributes` to exclude the configuration file from export. This enhances the repository with static analysis capabilities to ensure code quality and type safety. --- .gitattributes | 1 + composer.json | 4 ++++ phpstan.neon | 6 ++++++ 3 files changed, 11 insertions(+) create mode 100644 phpstan.neon diff --git a/.gitattributes b/.gitattributes index 1e7bf2f..27356a7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -9,6 +9,7 @@ /.editorconfig export-ignore /.gitattributes export-ignore /.gitignore export-ignore +/phpstan.neon export-ignore # Explicit text file types *.php text diff --git a/composer.json b/composer.json index 5ccd483..64e7613 100644 --- a/composer.json +++ b/composer.json @@ -8,6 +8,10 @@ "require": { "php": "^8.5" }, + "require-dev": { + "phpstan/phpstan": "^2.0", + "the-firehub-project/phpstan-rules": "dev-develop" + }, "minimum-stability": "stable", "authors": [ { diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..6161413 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,6 @@ +includes: + - vendor/the-firehub-project/phpstan-rules/src/config/base.neon + +parameters: + paths: + - src/ \ No newline at end of file From aaf16ba30cbe60bc2ce5173853ceabc41e29326a Mon Sep 17 00:00:00 2001 From: Riddick Date: Tue, 23 Jun 2026 10:46:10 +0200 Subject: [PATCH 4/5] Add PHPStan CI workflow with matrix support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced a new GitHub Actions workflow (`PHPStan.yml`) to run static analysis on pull requests using PHPStan. The workflow leverages a reusable workflow for matrix execution across supported PHP versions, extensions, and tool configurations. This integration automates analysis for code quality and type safety, aligning with Core-Standard’s development practices. --- .github/workflows/PHPStan.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/PHPStan.yml diff --git a/.github/workflows/PHPStan.yml b/.github/workflows/PHPStan.yml new file mode 100644 index 0000000..62e061a --- /dev/null +++ b/.github/workflows/PHPStan.yml @@ -0,0 +1,18 @@ +name: PHPStan + +on: + pull_request: + +permissions: read-all + +jobs: + build: + uses: The-FireHub-Project/.github/.github/workflows/RunCommandOnMatrix.yml@master + with: + title: "Run PHPStan" + phpVersions: ${{ vars.PHP_VERSIONS }} + phpExtensions: ${{ vars.PHP_EXTENSIONS }} + tools: "phpstan:2.x" + command: "phpstan analyse" + secrets: + GH_TOKEN: ${{ secrets.GH_TOKEN }} \ No newline at end of file From 6a1c6a1f96b5759182b590a6d3e754bef6b3da6d Mon Sep 17 00:00:00 2001 From: Riddick Date: Tue, 23 Jun 2026 10:56:52 +0200 Subject: [PATCH 5/5] Add PHPStan CI workflow with matrix support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Introduced a new GitHub Actions workflow (`PHPStan.yml`) to run static analysis on pull requests using PHPStan. The workflow leverages a reusable workflow for matrix execution across supported PHP versions, extensions, and tool configurations. This integration automates analysis for code quality and type safety, aligning with Core-Standard’s development practices. --- README.md | 109 ++++++++++++++++-------------------------------------- 1 file changed, 32 insertions(+), 77 deletions(-) diff --git a/README.md b/README.md index 6ca89bc..6a6e86b 100644 --- a/README.md +++ b/README.md @@ -23,19 +23,19 @@

- + GitHub last commit (branch) - + GitHub activity (branch) - + GitHub commit difference between two branches

@@ -45,92 +45,47 @@ Standard provides the base classes, kernel, domain layer, and minimal runtime ut --- -## FireHub Icon Introduce PHPStan and PHPUnit infrastructure – Development Branch +## FireHub Icon Development Branch -⚠️ **This is the `development` branch** +⚠️ **This is the `develop` branch** - Unstable - APIs may change without notice - Not intended for production use -### Related - -- Milestone: **Development v1** -- Target Release: **v0.0.0** -- Repository: FireHub Core Standard - -### Pull request - -

- - GitHub pull request title - - GitHub pull request author - - GitHub pull request created - - GitHub pull request comments -

- -### Milestone - -

- - GitHub milestone details -

- ## FireHub Icon Branch Purpose -Introduce foundational development tooling into FireHub Core by setting up: - -- PHPStan static analysis configuration -- PHPUnit testing framework bootstrap -- Baseline structure for future CI enforcement - -This branch establishes the initial quality assurance layer for the Core repository. - -## FireHub Icon Architectural Goal - -To decouple Core implementation logic from quality enforcement mechanisms, by introducing a dedicated tooling layer that: - -- Enforces type safety and architectural consistency (PHPStan) -- Enables deterministic regression testing (PHPUnit) -- Prepares Core for CI/CD quality gates without affecting runtime behavior +The `develop` branch is the **primary integration branch** for all ongoing development. -This ensures that Core remains: +It serves as the staging area where: +- Feature branches are merged +- Bug fixes are integrated +- Experimental work is stabilized +- Code is prepared for upcoming releases -- framework-agnostic at runtime -- strictly validated at development time -- stable for long-term evolution +All **release branches** are created **from `develop`**. -## FireHub Icon Core Concept +## Stability Guarantee -> “Core is not validated by runtime behavior, but by enforced static guarantees.” +❌ No backward compatibility guarantee +❌ APIs may change without notice +❌ Behavior may be incomplete or inconsistent +❌ Breaking changes are expected -This branch introduces the idea that: +This branch is intended **only for contributors and advanced testers**. -- Core correctness is proactively enforced (static analysis + tests) -- not reactively discovered in production +## FireHub Icon Composer Usage (Not Recommended) -It formalizes the principle: +For internal testing only: -- Runtime = execution layer -- Tooling = correctness layer +```json +{ + "require": { + "the-firehub-project/core-standard": "dev-develop" + } +} +``` +⚠️ Never use dev-develop in production. ## FireHub Icon Authors and Contributors @@ -147,4 +102,4 @@ Architecture guidelines, design principles, and ecosystem documentation are avai This software is licensed under the Apache-2.0 License. -For more details, read the full license [here](./LICENSE). \ No newline at end of file +For more details, read the full license [here](./LICENSE).