Skip to content

Drop no-op ReflectionProperty::setAccessible() (PHP 8.5 forward-compat)#289

Merged
fabiodalez-dev merged 2 commits into
mainfrom
chore/php85-reflection-deprecation
Jul 24, 2026
Merged

Drop no-op ReflectionProperty::setAccessible() (PHP 8.5 forward-compat)#289
fabiodalez-dev merged 2 commits into
mainfrom
chore/php85-reflection-deprecation

Conversation

@fabiodalez-dev

Copy link
Copy Markdown
Owner

PluginManager::pluginHasMethod() calls setAccessible(true) before reading a wrapper object's instance property. Since PHP 8.1 that call is a no-op — reflection reads non-public members without it — and under PHP 8.5 it emits a deprecation notice.

With display_errors on (dev), that notice is printed before the page HTML, corrupting every rendered admin/frontend page (broken DataTables init, missing action bars, <html lang> shifted, etc.). Production (PHP 8.3) is unaffected, but it makes local PHP 8.5 unusable for browser testing.

Removing the call is behaviour-preserving on 8.1–8.4 and clears the deprecation on 8.5; getValue() already reads the property without it. PHPStan level 5 clean.

…compat)

PluginManager::pluginHasMethod() called setAccessible(true) before reading a
wrapper's `instance` property. Since PHP 8.1 that call is a no-op (reflection
reads non-public members without it), and under PHP 8.5 it emits a deprecation
notice. With display_errors on (dev), that notice is printed before the page
HTML, corrupting every rendered admin/frontend page. Removing the call is
behaviour-preserving on 8.1-8.4 and clears the deprecation on 8.5; getValue()
already works without it.
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@fabiodalez-dev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fefaf3e0-ac8f-4321-ac4f-33f818419c9c

📥 Commits

Reviewing files that changed from the base of the PR and between 5128fd2 and f71f49a.

📒 Files selected for processing (1)
  • app/Support/PluginManager.php
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/php85-reflection-deprecation

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.

@fabiodalez-dev

Copy link
Copy Markdown
Owner Author

Code review

Branch: chore/php85-reflection-deprecationmain
PR: #289 (open)
Review ID: rev_20260724T112517Zb5542c
Base freshness: local main was behind origin/main at run start; fast-forwarded before review
Fix threshold: not yet set (run /adamsreview:fix [threshold] to apply fixes)
Sub-agent tokens: 282,192 across 3 invocations

Found 1 finding across all lanes:


Deep lane — correctness & security


🤖 Generated with Adam's Claude Code Review Command

@fabiodalez-dev
fabiodalez-dev merged commit f22f2a3 into main Jul 24, 2026
6 checks passed
fabiodalez-dev added a commit that referenced this pull request Jul 24, 2026
The What's New section only described the Danish-language PR; this release
also bundles bulk loan extension (#281), the mobile catalogue language
filter (#282), the home available-count + responsive related-books fix
(#288), Book Club external-book reconciliation (#138), PHP 8.5 compat
(#289), and the genre-key rename (#286/#290). Documented each user-facing
change.
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.

1 participant