[
https://issues.apache.org/jira/browse/THRIFT-5934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18110696#comment-18110696
]
Volodymyr Panivko commented on THRIFT-5934:
-------------------------------------------
Current master already includes this work. Commit 9f1fb7a66 updated
lib/php/test/Unit/Lib/ReflectionHelper.php so setAccessible() is only called
for PHP versions earlier than 8.1, which addresses the deprecated
ReflectionProperty and ReflectionMethod usage in the PHP tests. As of
2026-09-02 this issue appears stale-open, so I am closing it as Implemented.
> Fix deprecated usage of ReflectionProperty::setAccessible() in PHP tests
> ------------------------------------------------------------------------
>
> Key: THRIFT-5934
> URL: https://issues.apache.org/jira/browse/THRIFT-5934
> Project: Thrift
> Issue Type: Bug
> Components: PHP - Library
> Reporter: Pavel Kvach
> Assignee: Pavel Kvach
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Running PHPUnit tests on PHP 8.5 produces deprecation warnings related to
> usage of {{ReflectionProperty::setAccessible().}}
> Example failure:
> PHP Deprecated: Method ReflectionProperty::setAccessible() is deprecated
> since 8.5, as it has no effect since PHP 8.1
>
> According to official PHP documentation,
> {{ReflectionProperty::setAccessible()}} is deprecated as of PHP 8.5 and has
> had no effect since PHP 8.1, where all properties are accessible by default.
> [https://www.php.net/manual/en/reflectionproperty.setaccessible.php]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)