Drop no-op ReflectionProperty::setAccessible() (PHP 8.5 forward-compat)#289
Conversation
…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.
|
Warning Review limit reached
Next review available in: 15 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
✨ 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 |
Code reviewBranch: Found 1 finding across all lanes: Deep lane — correctness & security🤖 Generated with Adam's Claude Code Review Command |
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.
PluginManager::pluginHasMethod()callssetAccessible(true)before reading a wrapper object'sinstanceproperty. 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_errorson (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.