Skip to content

Conversation

@deluxetom
Copy link
Contributor

@deluxetom deluxetom commented Jan 6, 2026

Summary

Remove the deprecated ReflectionProperty::setAccessible() call that causes a deprecation warning in PHP 8.5.

Background

  • ReflectionProperty::setAccessible() is deprecated since PHP 8.5
  • The method has had no effect since PHP 8.1 (reflection can access private/protected members without it)
  • CI already tests PHP 8.5 via the external workflow zenstruck/.github/.github/workflows/php-test-symfony.yml

Note

Errors in the tests aren't related to this change

Copy link
Member

@kbond kbond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks @deluxetom!

@kbond kbond merged commit 1831b54 into zenstruck:1.x Jan 8, 2026
3 of 16 checks passed
@deluxetom deluxetom deleted the fix/php85-setaccessible-deprecation branch January 8, 2026 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

PHP 8.5 deprecation ReflectionProperty::setAccessible()

2 participants