-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat(coding-standard): Added shared configuration files under config/ for Composer-based reuse.
#1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…/` for Composer-based reuse.
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughRepository repurposed from a Yii2 template to a shared PHP coding-standard package: CI workflows removed, centralized ECS and Rector configs added under Changes
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
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ 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. Comment |
There was a problem hiding this 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.ymlthat is still synced.The
sync-metadatascript 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
⛔ Files ignored due to path filters (2)
docs/svgs/features-mobile.svgis excluded by!**/*.svgdocs/svgs/features.svgis 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.ymlCHANGELOG.mdREADME.mdcomposer.jsonconfig/ecs.phpconfig/rector.phpdocs/development.mddocs/testing.mdecs.phpphpstan.neonphpunit.xml.distrector.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.phpconfig/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.phpaligns 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.phpcorrectly imports the shared configuration fromconfig/rector.phpand appropriately scopes its paths toconfig/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 fromvendor/php-forge/coding-standard/config/rector.php.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
There was a problem hiding this 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
📒 Files selected for processing (2)
README.mddocs/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.
Pull Request