[April 2023] Remove usage of setAccessible() when core requires PHP 8.1

Created on 22 July 2021, almost 4 years ago
Updated 11 July 2023, almost 2 years ago

Problem/Motivation

Since PHP 8.1 setAccessible() method is no-op
https://github.com/php/php-src/blob/php-8.1.0beta1/UPGRADING#L486-L490
It's widely used in tests

Steps to reproduce

visit
- https://github.com/php/php-src/blob/php-8.1.0beta1/ext/reflection/php_re...
- https://github.com/php/php-src/blob/php-8.1.0beta1/ext/reflection/php_re...

Proposed resolution

Clean-up usage of the method when core require PHP 8.1

Remaining tasks

- agree and patch
- commit

User interface changes

no

API changes

no

Data model changes

no

Release notes snippet

Usage of ReflectionProperty::setAccessible() and ReflectionMethod::setAccessible() is removed

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Base 

Last updated about 13 hours ago

Created by

🇫🇷France andypost

Live updates comments and jobs are added and updated live.
  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024