Skip to content

Add explicit nullable to Preg::replaceCallbackStrictGroups for PHP 8.4 compatibility#22

Merged
Seldaek merged 1 commit intocomposer:mainfrom
GromNaN:patch-1
May 27, 2024
Merged

Add explicit nullable to Preg::replaceCallbackStrictGroups for PHP 8.4 compatibility#22
Seldaek merged 1 commit intocomposer:mainfrom
GromNaN:patch-1

Conversation

@GromNaN
Copy link
Copy Markdown
Contributor

@GromNaN GromNaN commented Apr 29, 2024

Explicit nullable type have been added to the branch 2.x in 28fb502, then merged into main.
But the method Preg::replaceCallbackStrictGroups was introduced in version 3.x (main branch) by 317c8a5

This is the last occurrence.

$ php -l **/*.php
No syntax errors detected in ./tests/RegexTests/ReplaceCallbackTest.php
No syntax errors detected in ./tests/RegexTests/MatchAllTest.php
No syntax errors detected in ./tests/RegexTests/ReplaceCallbackArrayTest.php
No syntax errors detected in ./tests/RegexTests/ReplaceTest.php
No syntax errors detected in ./tests/RegexTests/MatchWithOffsetsTest.php
No syntax errors detected in ./tests/RegexTests/MatchTest.php
No syntax errors detected in ./tests/RegexTests/MatchAllWithOffsetsTest.php
No syntax errors detected in ./tests/RegexTests/IsMatchTest.php
No syntax errors detected in ./tests/PregTests/ReplaceCallbackTest.php
No syntax errors detected in ./tests/PregTests/MatchAllTest.php
No syntax errors detected in ./tests/PregTests/ReplaceCallbackArrayTest.php
No syntax errors detected in ./tests/PregTests/IsMatchWithOffsetsTest.php
No syntax errors detected in ./tests/PregTests/ReplaceTest.php
No syntax errors detected in ./tests/PregTests/SplitTest.php
No syntax errors detected in ./tests/PregTests/IsMatchAllTest.php
No syntax errors detected in ./tests/PregTests/GrepTest.php
No syntax errors detected in ./tests/PregTests/MatchTest.php
No syntax errors detected in ./tests/PregTests/IsMatchAllWithOffsetsTest.php
No syntax errors detected in ./tests/PregTests/SplitWithOffsetsTest.php
No syntax errors detected in ./tests/PregTests/IsMatchTest.php
No syntax errors detected in ./tests/phpstan-locate-phpunit-autoloader.php
No syntax errors detected in ./tests/BaseTestCase.php
No syntax errors detected in ./src/MatchResult.php
No syntax errors detected in ./src/Regex.php
No syntax errors detected in ./src/MatchAllWithOffsetsResult.php
No syntax errors detected in ./src/MatchWithOffsetsResult.php
No syntax errors detected in ./src/MatchAllStrictGroupsResult.php
No syntax errors detected in ./src/UnexpectedNullMatchException.php
No syntax errors detected in ./src/MatchStrictGroupsResult.php
No syntax errors detected in ./src/MatchAllResult.php
No syntax errors detected in ./src/ReplaceResult.php
PHP Deprecated:  Composer\Pcre\Preg::replaceCallbackStrictGroups(): Implicitly marking parameter $count as nullable is deprecated, the explicit nullable type must be used instead in ./src/Preg.php on line 206

Deprecated: Composer\Pcre\Preg::replaceCallbackStrictGroups(): Implicitly marking parameter $count as nullable is deprecated, the explicit nullable type must be used instead in ./src/Preg.php on line 206
No syntax errors detected in ./src/Preg.php
No syntax errors detected in ./src/PcreException.php

@Seldaek
Copy link
Copy Markdown
Member

Seldaek commented May 27, 2024

Oh good catch thanks

@Seldaek Seldaek merged commit 04229f1 into composer:main May 27, 2024
@GromNaN GromNaN deleted the patch-1 branch June 4, 2024 07:41
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.

2 participants