Skip to content

Conversation

@9007967
Copy link
Contributor

@9007967 9007967 commented Oct 26, 2025

修复在PHP8.5下异常报错
Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect PHP 8.1 及之后,PHP 引入了属性访问的新机制,反射访问私有属性不再需要通过 setAccessible(true) 开启,该方法的调用变得多余,因此在 PHP 8.5 中被正式弃用。 通过版本判断兼容版本低于PHP8.1的使用环境。

修复在PHP8.5下异常报错
Method ReflectionProperty::setAccessible() is deprecated since 8.5, as it has no effect
PHP 8.1 及之后,PHP 引入了属性访问的新机制,反射访问私有属性不再需要通过 setAccessible(true) 开启,该方法的调用变得多余,因此在 PHP 8.5 中被正式弃用。
通过版本判断兼容版本低于PHP8.1的使用环境。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant