PHP 8.1 | RemovedConstants: account for PHP 8.1 changes#1319
Merged
Conversation
> The `FILE_BINARY` and `FILE_TEXT` constants have been deprecated. They never had any effect. Includes unit tests. Refs: * https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.standard * https://wiki.php.net/rfc/deprecations_php_8_1#file_binary_and_file_text_constants * php/php-src@92f6e21
> The `FILTER_SANITIZE_STRING` and `FILTER_SANITIZE_STRIPPED` filters are deprecated. Includes unit tests. Refs: * https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.filter * https://wiki.php.net/rfc/deprecations_php_8_1#filter_sanitize_string * php/php-src@bf94010
> The `NIL` constant has been deprecated. Use 0 instead. Includes unit tests. Refs: * https://www.php.net/manual/en/migration81.deprecated.php#migration81.deprecated.imap * https://wiki.php.net/rfc/deprecations_php_8_1#nil_constant_defined_by_the_imap_extension * php/php-src@2bc23cc
Not mentioned anywhere in the changelogs or migration guide. Still happened. Includes unit tests. Refs: * php/php-src#6850 * php/php-src@b7a298b
> * The `MYSQLI_STMT_ATTR_UPDATE_MAX_LENGTH` option no longer has an effect. > * The `MYSQLI_STORE_RESULT_COPY_DATA` option no longer has an effect. While these constants aren't formally deprecated, they no longer have any effect, so they are _effectively_ (soft) deprecated. As this isn't a formal category, I'd like to suggest to treat them for the purpose of PHPCompatibility as deprecated. Alternatively, we could add a new notice to the sniff for non-deprecated constants, which no longer have any effect. Includes unit tests. Refs: * https://github.com/php/php-src/blob/f67986a9218f4889d9352a87c29337a5b6eaa4bd/UPGRADING#L99-L100 * php/php-src@890e4ca * php/php-src@33e9049
47 tasks
wimg
approved these changes
Mar 9, 2022
This was referenced Aug 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHP 8.1 | RemovedConstants: handle deprecated FILE_* constants
Includes unit tests.
Refs:
PHP 8.1 | RemovedConstants: handle deprecated FILTER_* constants
Includes unit tests.
Refs:
PHP 8.1 | RemovedConstants: handle deprecated NIL constant
Includes unit tests.
Refs:
PHP 8.1 | RemovedConstants: handle deprecated MySqli constants
Not mentioned anywhere in the changelogs or migration guide. Still happened.
Includes unit tests.
Refs:
PHP 8.1 | RemovedConstants: handle (soft) deprecated MySqli constants
While these constants aren't formally deprecated, they no longer have any effect, so they are effectively (soft) deprecated.
As this isn't a formal category, I'd like to suggest to treat them for the purpose of PHPCompatibility as deprecated.
Alternatively, we could add a new notice to the sniff for non-deprecated constants, which no longer have any effect.
Includes unit tests.
Refs:
Related to #1299