Adds support for PHP8.5#43
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds PHP 8.5 support by widening the Composer PHP version constraint and updating ClassReferenceFinder to treat "resource" as a non-class reference, aligning with PHP 8.5 stubs and fixing a failing test. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
👮 Files not reviewed due to content moderation or server errors (2)
📝 Walkthrough
✨ Finishing Touches🧪 Generate unit tests (beta)
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.
Hey - I've left some high level feedback:
- Consider adding a short comment or reference next to the
'resource'entry explaining why it is treated as a reserved name (e.g., linking to the PHP 8.5 stubs or RFC), so future maintainers understand why it is special-cased. - The PHP version constraint list is becoming long and repetitive; consider simplifying it (e.g., using a range like
^8.0or similar) if compatible with your support policy, to avoid needing to update this line on every minor PHP release.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Consider adding a short comment or reference next to the `'resource'` entry explaining why it is treated as a reserved name (e.g., linking to the PHP 8.5 stubs or RFC), so future maintainers understand why it is special-cased.
- The PHP version constraint list is becoming long and repetitive; consider simplifying it (e.g., using a range like `^8.0` or similar) if compatible with your support policy, to avoid needing to update this line on every minor PHP release.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
This PR updates the package’s declared compatibility to include PHP 8.5 and aligns class reference detection with PHP 8.5 stub behavior by treating resource as a built-in (non-class) reference.
Changes:
- Extend
composer.jsonPHP requirement to allow8.5.*. - Update
ClassReferenceFinder::$ignoreRefsto ignoreresourcereferences.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/ClassReferenceFinder.php | Adds resource to the built-in/ignored reference list so it won’t be collected as a class-like reference. |
| composer.json | Expands the PHP version constraint to include PHP 8.5. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Adds support for PHP8.5
Updates Composer PHP Constraint
Updates ClassReferenceFinder to ignore "resource" ref, per stub, to fix failing test
Summary by Sourcery
Add support for running the library on PHP 8.5 by updating version constraints and aligning class reference handling with PHP 8.5 stubs.
New Features:
Bug Fixes: