Skip to content

Conversation

@jrfnl
Copy link
Collaborator

@jrfnl jrfnl commented Nov 24, 2025

The PHPCS native Generic.PHP.DeprecatedFunctions sniff will flag calls to deprecated functions.

As of PHP 8.5, PHP has deprecated a number of functions related to previously done resource to object migrations.

For the purposes of this package, we are testing the assertClosedResource() polyfill. These tests use a number of deprecated functions, but these tests will only ever be run on PHP versions where the return value from the involved extension was still a resource.

In other words, the PHP 8.5 deprecations will never be hit and the PHPCS sniff flagging them can be ignored.

The PHPCS native `Generic.PHP.DeprecatedFunctions` sniff will flag calls to deprecated functions.

As of PHP 8.5, PHP has deprecated a number of functions related to previously done resource to object migrations.

For the purposes of this package, we are testing the `assertClosedResource()` polyfill. These tests use a number of deprecated functions, but these tests will only ever be run on PHP versions where the return value from the involved extension was still a resource.

In other words, the PHP 8.5 deprecations will never be hit and the PHPCS sniff flagging them can be ignored.
@jrfnl jrfnl added this to the 1.x Next milestone Nov 24, 2025
@coveralls
Copy link

Coverage Status

coverage: 96.408%. remained the same
when pulling c14709f on feature/phpcs-ignore-one-rule
into 4eadd8b on 1.x.

@jrfnl jrfnl merged commit e4bfd79 into 1.x Nov 24, 2025
179 checks passed
@jrfnl jrfnl deleted the feature/phpcs-ignore-one-rule branch November 24, 2025 23:48
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.

2 participants