Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP 8.3 | ReportWidthTest: fix deprecation notices for ReflectionProperty::setValue() #77

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Nov 11, 2023

Description

Recreation of upstream PR squizlabs/PHP_CodeSniffer#3858:

The ReflectionProperty::setValue() method supports three method signatures, two of which are deprecated as of PHP 8.3.

This adjusts the call to ReflectionProperty::setValue() in the Core/Config/ReportWidthTest to pass null as the "object" for setting the value of a static property to make the method call cross-version compatible.

Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#reflectionpropertysetvalue

Suggested changelog entry

N/A test only change

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
    • This change is only breaking for integrators, not for external standards or end-users.
  • Documentation improvement

…erty::setValue()

The `ReflectionProperty::setValue()` method supports three method signatures, two of which are deprecated as of PHP 8.3.

This adjusts the call to `ReflectionProperty::setValue()` in the `Core/Config/ReportWidthTest` to pass `null` as the "object" for setting the value of a static property to make the method call cross-version compatible.

Ref: https://wiki.php.net/rfc/deprecate_functions_with_overloaded_signatures#reflectionpropertysetvalue
@jrfnl jrfnl force-pushed the php-8.3/reportwidthtest-fix-deprecation-notice branch from 2b0862d to d906762 Compare December 4, 2023 11:37
@jrfnl jrfnl merged commit d11632a into master Dec 4, 2023
57 checks passed
@jrfnl jrfnl deleted the php-8.3/reportwidthtest-fix-deprecation-notice branch December 4, 2023 11:40
jrfnl added a commit that referenced this pull request Dec 4, 2023
jrfnl added a commit that referenced this pull request Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant