Skip to content

Conversation

@terabytesoftw
Copy link
Contributor

Pull Request

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

@terabytesoftw terabytesoftw added the enhancement New feature or request label Jan 26, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 26, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Chores

    • Standardized and tightened development coding standards enforcement via StyleCI and a dedicated coding-standards package
    • Simplified development tooling/configuration and metadata sync
  • Documentation

    • Added changelog entry for the update
    • Updated README link formatting and refreshed development/testing guides with simplified command usage and new refactoring instructions

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

Walkthrough

Updates to coding‑standard tooling and documentation: StyleCI rule phpdoc_param_order enabled; composer dev dependencies changed to include php-forge/coding-standard and remove ECS/Rector entries; ECS and Rector configs simplified to import external standards; docs and scripts updated to new command syntax.

Changes

Cohort / File(s) Summary
StyleCI config
\.styleci\.yml
Enabled phpdoc_param_order rule (added one rule).
Coding-standard configurations
ecs.php, rector.php
ecs.php: removed detailed in-file rules, replaced with minimal builder-based paths-only return. rector.php: switched from inline config/sets to importing external Rector config and adjusted function signature/import.
Project metadata & dev dependencies
composer.json, CHANGELOG.md
composer.json: added php-forge/coding-standard to require-dev, removed previous ecs/rector entries, adjusted keywords and sync-metadata scripts to fetch .styleci.yml. CHANGELOG.md: added entry documenting coding-standard addition.
Documentation & scripts
README.md, docs/development.md, docs/testing.md
README.md: emoji-prefixed documentation links. docs/development.md: updated composer sync-metadata invocation and updated files table (removed ecs/rector, added .styleci.yml). docs/testing.md: added Rector refactoring section and changed examples from composer run <script> to composer <script>; updated PHPUnit coverage example.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐇 I nibbled old rules and found a new guide,
A tiny .styleci now keeps docs in stride,
Composer swapped boxes and configs grew light,
I hop through the changes — tidy, polite! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding php-forge/coding-standard to development dependencies for code quality checks, which is reflected throughout the changeset.
Description check ✅ Passed The description relates to the changeset by identifying it as a new feature rather than a bugfix and confirming no breaking changes, which aligns with the core change of adding development dependencies.
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.


📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f5b5d3 and fc914e7.

📒 Files selected for processing (1)
  • CHANGELOG.md
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
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: 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`.
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.
⏰ 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.


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)
composer.json (1)

49-52: The ecs and rector scripts will fail—php-forge/coding-standard is not a valid Packagist package.

The composer.json requires php-forge/coding-standard (^0.1) as a replacement, but this package does not exist on Packagist. As a result:

  • The package cannot be resolved in composer.lock
  • The transitive dependencies (if any) are not installed
  • The binaries ./vendor/bin/ecs and ./vendor/bin/rector are missing
  • Running the ecs and rector scripts (lines 49 and 52) will fail

Either restore the original symplify/easy-coding-standard and rector/rector packages, or replace with a valid package that provides these tools.

🤖 Fix all issues with AI agents
In `@CHANGELOG.md`:
- Line 5: Update the CHANGELOG.md entry that currently reads "Bug `#17`: Add
`php-forge/coding-standard` to development dependencies for code quality checks
(`@terabytesoftw`)" to use the correct type/prefix for a new feature/enhancement
(e.g., change "Bug `#17`" to "Enhancement `#17`" or "Feature `#17`") so the changelog
matches the PR metadata; locate the exact string in CHANGELOG.md and replace the
prefix only, keeping the rest of the entry intact.

In `@rector.php`:
- Around line 5-8: Confirm the correct package name/path for the external config
(the referenced php-forge/coding-standard package seems incorrect) and update
the import string in the returned static function accordingly; if the external
config is optional, guard the call to $rectorConfig->import by checking that the
target file exists (e.g., is_file on the resolved path) and skip or log a clear
message when missing so Rector won't fail at runtime when the
vendor/…/rector.php file is absent.
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3906008 and 3f5b5d3.

📒 Files selected for processing (8)
  • .styleci.yml
  • CHANGELOG.md
  • README.md
  • composer.json
  • docs/development.md
  • docs/testing.md
  • ecs.php
  • rector.php
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
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
📚 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/testing.md
  • 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:

  • docs/development.md
  • 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
📚 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
⏰ 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). (7)
  • GitHub Check: phpunit / PHP 8.5-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.2-windows-2022
  • GitHub Check: phpunit / PHP 8.3-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.4-ubuntu-latest
  • GitHub Check: phpunit / PHP 8.3-windows-2022
  • GitHub Check: linter / Super Linter
  • GitHub Check: mutation / PHP 8.5-ubuntu-latest
🔇 Additional comments (8)
docs/development.md (1)

11-11: LGTM!

The documentation updates are consistent with the PR changes:

  • The simplified composer sync-metadata command syntax is valid (equivalent to composer run sync-metadata)
  • The Updated Files table correctly reflects the addition of .styleci.yml and removal of ecs.php/rector.php from the sync-metadata script

Also applies to: 23-23

.styleci.yml (1)

58-58: LGTM!

The phpdoc_param_order rule is a sensible addition that enforces PHPDoc @param tags to match the order of function parameters. The placement maintains the alphabetical ordering convention used in this configuration file.

README.md (1)

302-303: LGTM!

The emoji prefixes add helpful visual context to distinguish the documentation links. The underlying links remain correct.

composer.json (2)

19-19: LGTM - Development dependency added correctly.

The php-forge/coding-standard package is properly added to require-dev with a caret constraint allowing minor version updates.


54-61: LGTM - Sync-metadata scripts updated consistently.

The script changes align with the PR's shift to using .styleci.yml for style configuration, and the removal of ecs.php and rector.php fetches is consistent with the new approach of delegating to the php-forge/coding-standard package.

Based on learnings, the use of main branch references in sync-metadata scripts aligns with the maintainer's preference for this organization.

ecs.php (1)

5-13: LGTM - Clean delegation to centralized coding standards.

The configuration cleanly delegates to the php-forge/coding-standard package, which centralizes rule management across projects. The builder pattern allows project-specific path configuration while inheriting standardized rules.

Verify that the php-forge/coding-standard package exports the expected ecs.php configuration file:

#!/bin/bash
# Check if the coding-standard package contains the expected ECS config
# First, check if the package is available and examine its structure

# Search for any documentation about the config structure
fd -t f -e md . | xargs grep -l "ecs.php" 2>/dev/null || echo "No documentation found referencing ecs.php"

# Check if composer.lock exists and contains the package
if [ -f composer.lock ]; then
    jq '.packages[] | select(.name == "php-forge/coding-standard") | {name, version}' composer.lock 2>/dev/null || \
    jq '.packages-dev[] | select(.name == "php-forge/coding-standard") | {name, version}' composer.lock 2>/dev/null
fi
docs/testing.md (2)

27-81: Docs update to Composer shorthand and extra-args examples looks good.

The switch to composer <script> and the updated forwarding examples are clear and consistent.


12-20: The composer rector script is properly defined in composer.json, so the documentation is accurate and will not mislead users.

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

@terabytesoftw terabytesoftw merged commit 9805af1 into main Jan 26, 2026
32 checks passed
@terabytesoftw terabytesoftw deleted the fix_mini_4 branch January 26, 2026 14: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