Skip to content

Conversation

@jackd248
Copy link
Owner

@jackd248 jackd248 commented Nov 24, 2025

Summary by CodeRabbit

  • Chores

    • Updated minimum PHP version requirement to 8.2; PHP 8.1 is no longer supported.
    • Updated CI/CD workflows and development dependencies to align with new PHP version support.
  • Refactor

    • Adjusted internal class structure for improved flexibility and maintainability.

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

@coderabbitai
Copy link

coderabbitai bot commented Nov 24, 2025

Walkthrough

The PR bumps minimum PHP version from 8.1 to 8.2 across workflows and project configuration, removes the readonly modifier from DocBlockHeader class properties, and updates development dependency constraints to match the new PHP floor.

Changes

Cohort / File(s) Summary
GitHub Workflows
.github/workflows/cgl.yml, .github/workflows/tests.yml
Added PHP 8.2 input to cgl workflow; removed PHP 8.1 from tested versions list in tests workflow
Project Configuration
composer.json, rector.php
Updated PHP version constraint from ~8.1.0 to ~8.2.0 minimum; updated Rector target to PHP 8.2 and UP_TO_PHP_82 level; bumped armin/editorconfig-cli and phpunit/phpunit dev dependencies
Source Code
src/Generators/DocBlockHeader.php
Removed readonly modifier from class and all promoted constructor properties (annotations, preserveExisting, separate, addStructureName), converting properties from immutable to mutable

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Note: The DocBlockHeader property mutability change warrants careful review to ensure downstream code does not depend on immutability guarantees or patterns.

Poem

🐰 From eight-point-one we hop away,
To eight-point-two, a brighter day!
Properties now mutable, set them free,
Workflows updated, dependencies agree!
thump thump

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: migrating minimum PHP version to 8.2 across multiple configuration files and dependencies.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch min-php-8.2

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.

@coveralls
Copy link

coveralls commented Nov 24, 2025

Pull Request Test Coverage Report for Build 19637145653

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 19637001004: 0.0%
Covered Lines: 264
Relevant Lines: 264

💛 - Coveralls

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 792d266 and 1267f21.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • .github/workflows/cgl.yml (1 hunks)
  • .github/workflows/tests.yml (1 hunks)
  • composer.json (1 hunks)
  • rector.php (1 hunks)
  • src/Generators/DocBlockHeader.php (1 hunks)
🧰 Additional context used
🪛 GitHub Actions: CGL
composer.json

[error] 1-1: PHP 8.2.29 is not compatible with required PHP >=8.3 by phpunit/phpunit and sebastian/diff; consider upgrading PHP or relaxing package constraints (e.g., phpunit/phpunit to a version compatible with PHP 8.2).

🔇 Additional comments (6)
rector.php (1)

24-26: LGTM! Rector configuration correctly updated for PHP 8.2.

The PHP version target and level set are properly aligned with the PHP 8.2 migration objective.

.github/workflows/cgl.yml (1)

10-11: LGTM! Workflow correctly configured for PHP 8.2.

The explicit PHP version parameter ensures the CGL workflow runs on PHP 8.2.

composer.json (2)

24-24: LGTM! PHP version constraint correctly updated.

The constraint properly enforces PHP 8.2 as the minimum version while allowing future PHP 8.x versions.


29-29: armin/editorconfig-cli ^2.0 is compatible with PHP 8.2.

The package requires PHP 8.2, 8.3 or 8.4, confirming compatibility with the new minimum PHP version.

.github/workflows/tests.yml (1)

11-11: LGTM! Test matrix correctly updated.

Removing PHP 8.1 from the test matrix aligns with the updated PHP version constraints in composer.json.

src/Generators/DocBlockHeader.php (1)

32-40: LGTM! Excellent use of PHP 8.2 readonly class feature.

The refactor correctly leverages PHP 8.2's readonly class modifier. When a class is marked readonly, all its properties implicitly become readonly, so removing the explicit readonly modifiers on individual properties is correct and cleaner. The immutability behavior remains unchanged.

"phpstan/phpstan-phpunit": "^2.0",
"phpstan/phpstan-symfony": "^2.0",
"phpunit/phpunit": "^10.2 || ^11.0 || ^12.0",
"phpunit/phpunit": "^11.0 || ^12.0",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Critical: PHPUnit constraint incompatible with PHP 8.2.

The pipeline failure confirms that PHPUnit 12 requires PHP 8.3+. The constraint ^11.0 || ^12.0 allows Composer to install PHPUnit 12, which is incompatible with PHP 8.2.

Please verify the PHP version requirements for PHPUnit 11 and 12:


🌐 Web query:

What are the minimum PHP version requirements for PHPUnit 11 and PHPUnit 12?

💡 Result:

  • PHPUnit 11: requires PHP 8.2 or later. [1]
  • PHPUnit 12: requires PHP 8.3 or later. [2]

Sources: PHPUnit 11 announcement / docs and PHPUnit 12 announcement. [1] https://phpunit.de/announcements/phpunit-11.html [2] https://phpunit.de/announcements/phpunit-12.html


Critical: PHPUnit constraint breaks PHP 8.2 compatibility.

PHPUnit 11 requires PHP 8.2 or later, while PHPUnit 12 requires PHP 8.3 or later. The constraint ^11.0 || ^12.0 allows Composer to install PHPUnit 12, which is incompatible with PHP 8.2.

If PHP 8.2 support is intended, change the constraint to ^11.0 to prevent PHPUnit 12 installation. If the project is dropping PHP 8.2 support in favor of 8.3+, this constraint is acceptable but should be documented as a breaking change in the project's PHP version policy.

🤖 Prompt for AI Agents
In composer.json around line 35, the dev dependency constraint
"phpunit/phpunit": "^11.0 || ^12.0" can allow PHPUnit 12 which requires PHP 8.3
and thus breaks PHP 8.2 compatibility; if you must keep PHP 8.2 support, change
the constraint to "phpunit/phpunit": "^11.0" in composer.json, run composer
update --lock or composer update phpunit/phpunit to update the lockfile and CI,
and if instead you intend to drop PHP 8.2 support, leave the constraint but
update project documentation/CI to state PHP 8.3+ as a breaking change.

@jackd248 jackd248 merged commit d7a1369 into main Nov 24, 2025
10 of 12 checks passed
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.

3 participants