Repository navigation
Update Rector - #59
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR updates Rector to a newer release, aligns its configuration with modern PHP sets and formatting, and refactors test PDO initialization to use concise null-coalescing assignment while preserving connection behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #59 +/- ##
===========================================
Coverage 100.00% 100.00%
Complexity 6 6
===========================================
Files 2 2
Lines 23 23
===========================================
Hits 23 23 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="rector.php" line_range="13" />
<code_context>
+ __DIR__ . '/tests',
])
- ->withPhp74Sets()
+ ->withPhpSets()
->withSets([
SetList::YII_CORE,
</code_context>
<issue_to_address>
**Local Rector targets newer PHP**
When rector is run locally with PHP 8.x, `withPhpSets()` uses the PHP version running Rector when no target is specified, so running it locally on PHP 8.x enables upgrades that can make the code incompatible with the package's PHP 7.4 minimum; callers then see failures on PHP 7.4.
Set the PHP-set target explicitly to the minimum supported PHP version, or derive it from a deliberate project target rather than the runtime.
</issue_to_address>Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: rector.php:13
| __DIR__ . '/tests', | ||
| ]) | ||
| ->withPhp74Sets() | ||
| ->withPhpSets() |
There was a problem hiding this comment.
🟡 Medium · Local Rector targets newer PHP
When rector is run locally with PHP 8.x, withPhpSets() uses the PHP version running Rector when no target is specified, so running it locally on PHP 8.x enables upgrades that can make the code incompatible with the package's PHP 7.4 minimum; callers then see failures on PHP 7.4.
Set the PHP-set target explicitly to the minimum supported PHP version, or derive it from a deliberate project target rather than the runtime.
Prompt for AI agents
In `rector.php` at line 13:
**Local Rector targets newer PHP**
When rector is run locally with PHP 8.x, `withPhpSets()` uses the PHP version running Rector when no target is specified, so running it locally on PHP 8.x enables upgrades that can make the code incompatible with the package's PHP 7.4 minimum; callers then see failures on PHP 7.4.
Set the PHP-set target explicitly to the minimum supported PHP version, or derive it from a deliberate project target rather than the runtime.
Summary by Sourcery
Update Rector tooling and modernize the related project configuration and test setup.
Enhancements: