Skip to content

Conversation

@terabytesoftw
Copy link
Contributor

Pull Request

Q A
Is bugfix?
New feature? ✔️
Breaks BC?

@coderabbitai
Copy link

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Summary by CodeRabbit

  • New Features

    • Introduced a shared php-forge/coding-standard package with centralized ECS and Rector configurations for reuse via Composer.
  • Breaking Changes

    • Project identity, package name, namespace and composer manifest updated; dev/testing tool configs removed or relocated (affects local test/static analysis setups).
  • Documentation

    • README, CHANGELOG and guides rewritten with installation, quick start and shared-config usage.
  • Chores

    • CI and QA workflow files removed; configuration layout reorganized to use centralized config files.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Repository repurposed from a Yii2 template to a shared PHP coding-standard package: CI workflows removed, centralized ECS and Rector configs added under config/, root wrappers simplified to import them, composer metadata/autoload adjusted, docs and changelog updated, and legacy tool configs removed.

Changes

Cohort / File(s) Summary
GitHub Actions workflows removed
.github/workflows/build.yml, .github/workflows/dependency-check.yml, .github/workflows/mutation.yml, .github/workflows/static.yml
Deleted CI workflow files that automated build, dependency checks, mutation testing, and static analysis. Review for CI expectations and any external workflow references.
Linter config tweak
.github/linters/actionlint.yml
Removed one ignore entry: "section is alias node but mapping node is expected" from the workflow ignore list.
Shared configuration introduced
config/ecs.php, config/rector.php
Added centralized ECS and Rector configurations intended for import by consumer repositories; review rule sets, enabled rules, and any exclusions.
Root wrapper configs updated
ecs.php, rector.php
Replaced inline ECS/Rector definitions with simple wrappers that import the new config/ files and point paths to the shared configs.
Tool configs removed
phpstan.neon, phpunit.xml.dist
Removed PHPStan and PHPUnit configuration files; consumer repos will need their own test/static-analysis configs.
Composer manifest repurposed
composer.json
Renamed package to php-forge/coding-standard, updated description/keywords, changed PSR-4 namespace, added rector/rector and symplify/easy-coding-standard, removed require-dev, and adjusted scripts. Review dependency and script changes.
Documentation and changelog
README.md, docs/development.md, docs/testing.md, CHANGELOG.md
README rebranded for PHP Forge; docs updated to explain shared config layout and simplified QA commands; new CHANGELOG entry added.

Sequence Diagram(s)

(Skipped — changes do not introduce a new multi-component sequential control flow requiring visualization.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I swapped old templates for a tidy chest,
Shared rules tucked in config, neat and dressed.
ECS prances, Rector trims each tangled vine,
One package guides the code—compact and fine.
A rabbit cheers: hop, harmonize, align.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: introducing shared configuration files under config/ for Composer-based reuse, which aligns with the primary alterations across the codebase.
Description check ✅ Passed The description clarifies that this is a new feature introducing shared configuration files for Composer-based reuse, which directly relates to the changeset's core objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/development.md (1)

18-23: Docs table misses .styleci.yml that is still synced.

The sync-metadata script still downloads .styleci.yml, so the table should list it to avoid confusion.

📝 Suggested doc update
 | File               | Purpose                                      |
 | ------------------ | -------------------------------------------- |
 | `.editorconfig`    | Editor settings and code style configuration |
 | `.gitattributes`   | Git attributes and file handling rules       |
 | `.gitignore`       | Git ignore patterns and exclusions           |
+| `.styleci.yml`     | StyleCI configuration                         |
🤖 Fix all issues with AI agents
In `@composer.json`:
- Around line 18-21: The PSR-4 autoload mapping currently uses an absolute root
path ("/") for the "PHPForge\\CodingStandard\\" namespace which breaks
autoloading; update the value in the "autoload" → "psr-4" mapping for
"PHPForge\\CodingStandard\\" to a package-root relative path (use "" or "./") so
Composer resolves classes relative to the package root, then regenerate autoload
files (composer dump-autoload).

In `@README.md`:
- Around line 51-65: Update the PHP doc type for the variable returned by the
shared config to reflect the actual return type: replace the incorrect
\Symplify\EasyCodingStandard\Configuration\ECSConfigBuilder annotation with
\Symplify\EasyCodingStandard\Config\ECSConfig for the $ecsConfigBuilder variable
(the value returned from config/ecs.php) so the docblock matches the real type
used with the ->withPaths(...) call.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c3a5546 and 40c0ea9.

⛔ Files ignored due to path filters (2)
  • docs/svgs/features-mobile.svg is excluded by !**/*.svg
  • docs/svgs/features.svg is excluded by !**/*.svg
📒 Files selected for processing (16)
  • .github/linters/actionlint.yml
  • .github/workflows/build.yml
  • .github/workflows/dependency-check.yml
  • .github/workflows/mutation.yml
  • .github/workflows/static.yml
  • CHANGELOG.md
  • README.md
  • composer.json
  • config/ecs.php
  • config/rector.php
  • docs/development.md
  • docs/testing.md
  • ecs.php
  • phpstan.neon
  • phpunit.xml.dist
  • rector.php
💤 Files with no reviewable changes (7)
  • phpstan.neon
  • .github/workflows/build.yml
  • .github/workflows/static.yml
  • .github/linters/actionlint.yml
  • .github/workflows/dependency-check.yml
  • .github/workflows/mutation.yml
  • phpunit.xml.dist
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: terabytesoftw
Repo: php-forge/foxy PR: 115
File: composer.json:68-77
Timestamp: 2026-01-23T11:09:15.771Z
Learning: In the php-forge organization repositories, terabytesoftw prefers using the main branch reference in composer.json sync-metadata scripts when downloading configuration files from external template repositories, rather than pinning to specific commit SHAs or tags, even though pinning provides more stability and prevents unexpected changes.
Learnt from: terabytesoftw
Repo: php-forge/actions PR: 67
File: .github/workflows/phpstan.yml:13-16
Timestamp: 2025-09-29T14:58:04.095Z
Learning: In the php-forge/actions repository, the maintainer prefers using "composer update" as the default command in CI workflows to ensure the latest dependencies are always installed, rather than using "composer install" for reproducibility.
Learnt from: terabytesoftw
Repo: php-forge/foxy PR: 115
File: tests/Fallback/AssetFallbackTest.php:158-189
Timestamp: 2026-01-23T11:22:07.261Z
Learning: User terabytesoftw prefers not to use aliases when importing classes in PHP. They are comfortable with either fully-qualified class names or direct imports without aliases.
Learnt from: terabytesoftw
Repo: php-forge/support PR: 12
File: src/TestSupport.php:0-0
Timestamp: 2025-08-18T20:13:33.518Z
Learning: User terabytesoftw prefers clean trait-based designs over maintaining backward compatibility wrappers when refactoring utility classes in the php-forge/support project.
Learnt from: terabytesoftw
Repo: php-forge/actions PR: 65
File: .github/workflows/composer-require-checker.yml:80-83
Timestamp: 2025-09-28T15:12:48.345Z
Learning: The user terabytesoftw prefers using floating tags like v1 for third-party actions in GitHub workflows instead of pinning to specific commit SHAs, even when it's a security best practice to pin to immutable commits.
📚 Learning: 2026-01-23T14:44:05.604Z
Learnt from: terabytesoftw
Repo: php-forge/foxy PR: 115
File: ecs.php:81-95
Timestamp: 2026-01-23T14:44:05.604Z
Learning: In symplify/easy-coding-standard (ECS), the `withPhpCsFixerSets()` method converts PHP-CS-Fixer rule set names to camelCase parameter names by removing special characters. For example, `PER-CS3x0` becomes `perCS30` (not `perCS3x0`), and `PER-CS2x0` becomes `perCS20`.

Applied to files:

  • ecs.php
  • config/ecs.php
📚 Learning: 2025-09-29T14:58:04.095Z
Learnt from: terabytesoftw
Repo: php-forge/actions PR: 67
File: .github/workflows/phpstan.yml:13-16
Timestamp: 2025-09-29T14:58:04.095Z
Learning: In the php-forge/actions repository, the maintainer prefers using "composer update" as the default command in CI workflows to ensure the latest dependencies are always installed, rather than using "composer install" for reproducibility.

Applied to files:

  • composer.json
📚 Learning: 2026-01-23T11:09:15.771Z
Learnt from: terabytesoftw
Repo: php-forge/foxy PR: 115
File: composer.json:68-77
Timestamp: 2026-01-23T11:09:15.771Z
Learning: In the php-forge organization repositories, terabytesoftw prefers using the main branch reference in composer.json sync-metadata scripts when downloading configuration files from external template repositories, rather than pinning to specific commit SHAs or tags, even though pinning provides more stability and prevents unexpected changes.

Applied to files:

  • composer.json
📚 Learning: 2025-08-18T16:13:31.606Z
Learnt from: terabytesoftw
Repo: php-forge/support PR: 11
File: phpstan.neon:1-3
Timestamp: 2025-08-18T16:13:31.606Z
Learning: In the php-forge/support project, PHPStan is intended to be used as a PHAR installation rather than as a Composer dependency, even though the composer.json was updated to include phpstan/phpstan as a dependency.

Applied to files:

  • composer.json
📚 Learning: 2025-08-18T15:43:30.996Z
Learnt from: terabytesoftw
Repo: php-forge/support PR: 11
File: composer.json:13-16
Timestamp: 2025-08-18T15:43:30.996Z
Learning: Testing helper libraries (packages with "testing" or "support" in keywords/description that provide test utilities) should include PHPUnit and other testing frameworks in the main "require" section rather than "require-dev", as consuming packages need these dependencies to use the testing utilities.

Applied to files:

  • composer.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: linter / Super Linter
  • GitHub Check: linter / Super Linter
🔇 Additional comments (14)
CHANGELOG.md (1)

3-5: Changelog entry aligns with the feature scope.

Looks good and consistent with the PR description.

config/rector.php (1)

11-41: Shared Rector config is clean and self-contained.

No project-specific paths and a clear shared setup.

ecs.php (1)

5-14: Wrapper config is straightforward and consistent.

The delegation to shared config is clear.

config/ecs.php (1)

13-96: Shared ECS configuration is clean and reusable.

Nice separation from project-specific paths.

docs/testing.md (4)

1-12: LGTM!

The introduction and tool references are well-structured, providing clear links to official documentation for each tool in the testing workflow.


13-24: LGTM!

The ECS section correctly documents the command and the shared configuration pattern. The note about consumer repositories creating their own wrapper ecs.php aligns well with the pattern described in README.md.


26-62: LGTM!

The dependency checking, mutation testing, static analysis, and unit test sections are concise and follow a consistent format. The commands align with typical PHP Forge Composer script conventions.


64-78: LGTM!

The "Passing extra arguments" section is a valuable addition. The examples clearly demonstrate how to forward arguments to underlying tools using --, which is a common pattern that users often need guidance on.

README.md (5)

1-20: LGTM!

The header section is well-structured with appropriate branding, badges, and a clear description of the package's purpose.


29-33: LGTM!

The installation command is clear and uses an appropriate version constraint (^0.1) for the initial release.


87-111: LGTM!

The Rector wrapper example correctly demonstrates the import pattern using $rectorConfig->import(). The structure is clear and follows Rector's documented configuration approach.


113-136: LGTM!

Good guidance for Yii2-specific configurations. The recommendation to keep framework-specific rules separate from the generic base is a sound architectural decision that maintains modularity.


138-149: LGTM!

The Composer scripts section provides a clear, conventional pattern that aligns with PHP Forge repository standards.

rector.php (1)

7-15: LGTM!

The root rector.php correctly imports the shared configuration from config/rector.php and appropriately scopes its paths to config/ only. This design aligns with the shared config's explicit intent: "This file intentionally contains no project-specific paths. Consumer repositories should provide their own wrapper rector.php and set paths there." The docblock helpfully guides consumers to import from vendor/php-forge/coding-standard/config/rector.php.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/development.md`:
- Around line 18-23: Update the "Updated Files" table in docs/development.md to
include the two shared config files missing from the list: add rows for
config/ecs.php and config/rector.php with concise Purpose descriptions (e.g.,
"Shared ECS config" and "Shared Rector config" or "Shared config files pulled by
sync") so the table matches the actual sync behavior; ensure formatting matches
the existing Markdown table style used with `.editorconfig`, `.gitattributes`,
and `.gitignore`.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7cda3bb and 62bcb45.

📒 Files selected for processing (2)
  • README.md
  • docs/development.md
🧰 Additional context used
🧠 Learnings (3)
📓 Common learnings
Learnt from: terabytesoftw
Repo: php-forge/foxy PR: 115
File: composer.json:68-77
Timestamp: 2026-01-23T11:09:15.771Z
Learning: In the php-forge organization repositories, terabytesoftw prefers using the main branch reference in composer.json sync-metadata scripts when downloading configuration files from external template repositories, rather than pinning to specific commit SHAs or tags, even though pinning provides more stability and prevents unexpected changes.
Learnt from: terabytesoftw
Repo: php-forge/actions PR: 67
File: .github/workflows/phpstan.yml:13-16
Timestamp: 2025-09-29T14:58:04.095Z
Learning: In the php-forge/actions repository, the maintainer prefers using "composer update" as the default command in CI workflows to ensure the latest dependencies are always installed, rather than using "composer install" for reproducibility.
Learnt from: terabytesoftw
Repo: php-forge/foxy PR: 115
File: tests/Fallback/AssetFallbackTest.php:158-189
Timestamp: 2026-01-23T11:22:07.261Z
Learning: User terabytesoftw prefers not to use aliases when importing classes in PHP. They are comfortable with either fully-qualified class names or direct imports without aliases.
Learnt from: terabytesoftw
Repo: php-forge/support PR: 12
File: src/TestSupport.php:0-0
Timestamp: 2025-08-18T20:13:33.518Z
Learning: User terabytesoftw prefers clean trait-based designs over maintaining backward compatibility wrappers when refactoring utility classes in the php-forge/support project.
Learnt from: terabytesoftw
Repo: php-forge/actions PR: 65
File: .github/workflows/composer-require-checker.yml:80-83
Timestamp: 2025-09-28T15:12:48.345Z
Learning: The user terabytesoftw prefers using floating tags like v1 for third-party actions in GitHub workflows instead of pinning to specific commit SHAs, even when it's a security best practice to pin to immutable commits.
📚 Learning: 2025-09-29T14:58:04.095Z
Learnt from: terabytesoftw
Repo: php-forge/actions PR: 67
File: .github/workflows/phpstan.yml:13-16
Timestamp: 2025-09-29T14:58:04.095Z
Learning: In the php-forge/actions repository, the maintainer prefers using "composer update" as the default command in CI workflows to ensure the latest dependencies are always installed, rather than using "composer install" for reproducibility.

Applied to files:

  • docs/development.md
📚 Learning: 2026-01-23T11:22:07.261Z
Learnt from: terabytesoftw
Repo: php-forge/foxy PR: 115
File: tests/Fallback/AssetFallbackTest.php:158-189
Timestamp: 2026-01-23T11:22:07.261Z
Learning: User terabytesoftw prefers not to use aliases when importing classes in PHP. They are comfortable with either fully-qualified class names or direct imports without aliases.

Applied to files:

  • README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: linter / Super Linter
  • GitHub Check: linter / Super Linter

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@terabytesoftw terabytesoftw added bug Something isn't working enhancement New feature or request and removed Estado: error bug Something isn't working labels Jan 24, 2026
@terabytesoftw terabytesoftw merged commit 2b59c05 into main Jan 24, 2026
17 checks passed
@terabytesoftw terabytesoftw deleted the feature_1 branch January 24, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants