Problem/Motivation
The Reflection*::setAccessible() is deprecated and throws deprecation warning since PHP 8.5 beta1.
General usage was removed in #3224941: Remove usage of setAccessible() when core requires PHP 8.1 and #3540525: Remove remaining usage of setAccessible()
Steps to reproduce
drupal$ git grep setAccessible
core/tests/Drupal/Tests/Core/Theme/Icon/IconPackManagerTest.php:91: $method->setAccessible(TRUE);
Proposed resolution
- remove remaining usage
Remaining tasks
MR, review, commit
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3551109
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3551109-remove-last-usage
changes, plain diff MR !13439
Comments
Comment #3
andypostComment #4
mstrelan commentedTest still passes after this is removed.
Can confirm this is the only remaining usage.
Sorry if this has been discussed already, but should we be running phpstan analysis for 8.5? I see this in the output:
Presumably IconPackManagerTest would have failed phpstan if it was running on 8.5. But then we might not catch issues for 8.3, so it's a double edged sword unless we run it for all supported versions.
Comment #5
catchI think we've tended to run against the minimum supported version (e.g. 8.3). We can definitely run against 8.5 once Drupal 12 is open (in a couple of months-ish). Running phpstan against multiple versions is probably worth an issue, I guess it will be OK if we don't need to worry about different baselines.
Committed/pushed to 11.x, thanks!