Skip to content

Conversation

@gomzyakov
Copy link
Owner

  • Renamed package from gomzyakov/php-cs-fixer-config to gomzyakov/code-style.
  • Updated class names and namespaces in the configuration files to reflect the new package structure.
  • Added new classes: CodeStyleConfig, CodeStyleFinder, and CodeStyleRules for better organization and functionality.
  • Modified README.md to reflect the new package name and usage instructions.
  • Updated composer.json scripts and autoloading to align with the new structure.

- Renamed package from `gomzyakov/php-cs-fixer-config` to `gomzyakov/code-style`.
- Updated class names and namespaces in the configuration files to reflect the new package structure.
- Added new classes: `CodeStyleConfig`, `CodeStyleFinder`, and `CodeStyleRules` for better organization and functionality.
- Modified README.md to reflect the new package name and usage instructions.
- Updated composer.json scripts and autoloading to align with the new structure.
- Changed job name from "Test & Upload coverage.xml to Codecov" to "Run tests".
- Removed coverage generation and Codecov upload steps for a more streamlined testing process.
- Retained the step to run PHPUnit tests and display the coverage.xml file.
@coderabbitai
Copy link

coderabbitai bot commented Oct 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR renames the package from gomzyakov/php-cs-fixer-config to gomzyakov/code-style, updates composer metadata (name, homepage, PSR-4 mapping from Gomzyakov\CS\ to Gomzyakov) and renames the composer script (cs-fix → fix). Public classes/namespaces moved from Gomzyakov\CS to Gomzyakov and renamed: Config → CodeStyleConfig, Finder → CodeStyleFinder, Rules → CodeStyleRules. .php-cs-fixer.dist.php and tests updated to use the new class names and factories. CodeStyleConfig now sets a parallel config via ParallelConfigFactory::detect() and sources rules from CodeStyleRules. README badges/URLs updated. CI workflow simplified to run phpunit without coverage/Codecov steps.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly summarizes the primary change by stating the refactoring of the code style configuration and the package name update, which directly reflects the main modifications introduced in the pull request.
Description Check ✅ Passed The description outlines the specific changes made, including renaming the package, updating class names and namespaces, adding new classes, and modifying README and composer.json, which directly corresponds to the modifications in the changeset.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b64b31e and 2e5aa64.

📒 Files selected for processing (1)
  • .github/workflows/phpunit.yml (1 hunks)

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

🧹 Nitpick comments (2)
composer.json (1)

39-39: Consider backward compatibility for script rename.

Renaming the script from cs-fix to fix will break existing CI/CD pipelines and developer workflows that reference composer cs-fix.

For better backward compatibility, consider keeping both scripts:

 "scripts": {
     "fix": "@php ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php",
+    "cs-fix": "@fix",
     "cs-check": "@php ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --dry-run",

This allows a gradual migration path for users while maintaining backward compatibility.

README.md (1)

1-80: Consider adding migration guidance for existing users.

While the documentation is thorough for new users, existing users of gomzyakov/php-cs-fixer-config would benefit from a migration guide. Consider adding a section that documents:

  1. The package name change
  2. The namespace change (from Gomzyakov\CS\ to Gomzyakov\)
  3. The class renames (e.g., ConfigCodeStyleConfig)
  4. The script rename (cs-fixfix)
  5. Required steps to migrate existing installations

This could be added as a new section in the README or as a separate MIGRATION.md file.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9402bfa and b928091.

📒 Files selected for processing (9)
  • .php-cs-fixer.dist.php (1 hunks)
  • README.md (4 hunks)
  • composer.json (4 hunks)
  • src/CodeStyleConfig.php (2 hunks)
  • src/CodeStyleFinder.php (1 hunks)
  • src/CodeStyleRules.php (2 hunks)
  • tests/CodeStyleConfigTest.php (1 hunks)
  • tests/CodeStyleFinderTest.php (1 hunks)
  • tests/CodeStyleRulesTest.php (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (5)
tests/CodeStyleRulesTest.php (1)
src/CodeStyleRules.php (2)
  • CodeStyleRules (15-33)
  • getRules (22-32)
.php-cs-fixer.dist.php (2)
src/CodeStyleFinder.php (2)
  • CodeStyleFinder (9-27)
  • createWithRoutes (18-26)
src/CodeStyleConfig.php (2)
  • CodeStyleConfig (11-29)
  • createWithFinder (21-28)
tests/CodeStyleConfigTest.php (1)
src/CodeStyleConfig.php (2)
  • CodeStyleConfig (11-29)
  • createWithFinder (21-28)
src/CodeStyleConfig.php (1)
src/CodeStyleRules.php (2)
  • CodeStyleRules (15-33)
  • getRules (22-32)
tests/CodeStyleFinderTest.php (1)
src/CodeStyleFinder.php (2)
  • CodeStyleFinder (9-27)
  • createWithRoutes (18-26)
🔇 Additional comments (5)
.php-cs-fixer.dist.php (2)

5-6: LGTM! Class imports updated correctly.

The imports reflect the new namespace structure (Gomzyakov) and class names (CodeStyleFinder, CodeStyleConfig) as intended by this refactoring.


11-11: LGTM! Usage updated to match new API.

The method calls correctly use the renamed classes and are consistent with the method signatures shown in the source files.

README.md (3)

3-6: LGTM! Badges updated to reflect new package.

All badge URLs correctly reference the new package name gomzyakov/code-style and repository structure.


17-17: LGTM! Installation and usage examples updated.

The installation command and code examples correctly reference the new package name and class names (CodeStyleFinder, CodeStyleConfig).

Also applies to: 27-28, 33-33


54-67: LGTM! Configuration examples updated consistently.

All documentation examples correctly use the renamed classes and methods throughout.

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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b928091 and 0aad0cb.

📒 Files selected for processing (1)
  • .github/workflows/phpunit.yml (2 hunks)

…parallel configuration

- Updated various dependencies in composer.lock, including phpunit, phpstan, and symfony packages, to their latest versions.
- Added parallel configuration support in CodeStyleConfig to enhance performance during code style checks.
- Modified the job name to include the PHP version being used.
- Implemented a matrix strategy to run tests on PHP versions 8.3 and 8.4.
- Simplified the PHP setup step to dynamically use the specified PHP version from the matrix.
@gomzyakov gomzyakov changed the title Refactor code style configuration and update package name Update package name & refactor code style configuration Oct 5, 2025
@gomzyakov gomzyakov merged commit 2f77717 into main Oct 5, 2025
4 checks passed
@gomzyakov gomzyakov deleted the unarchive-reporitory branch October 5, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants