Fix CI failures on 5.x (PHP 8.3 regex, phpcs, phpstan)#280
Merged
Conversation
- IrValidation::numeric(): remove stray \x from the regex character class, which made preg_match() fail to compile on PHP 8.3+ (PCRE2) - RsValidation: replace removed @codingStandardsIgnoreStart/End markers with phpcs:disable/enable so the deprecated snake_case methods stay suppressed - FiValidation: drop a stale @phpstan-ignore-next-line that no longer matches any reported error
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.
CI is red on
5.x, which also blocks unrelated PRs such as the Dependabotactions/checkoutbump (#279). Three independent failures:1. PHP 8.3+ test failure -
IrValidation::numeric()The regex
/[^\x{06F0}-\x{06F9}\x]+/ucontains a stray\xwith no hex digits. PCRE2 (PHP 8.3+) rejects it withCompilation failed: digits missing after \x, sopreg_match()returnsfalseand every input is treated as valid. Removing the stray\xrestores the intended "anything that is not a Persian digit" class.2. CodeSniffer failure -
RsValidationThe deprecated
// @codingStandardsIgnoreStart/Endcomment markers are no longer honored by the current sniffer, so the intentionally-kept snake_case deprecated methods (address_code,postal_number) get flagged. Switched to the modern// phpcs:disable PSR1.Methods.CamelCapsMethodName/enable.3. PHPStan failure -
FiValidationA stale
@phpstan-ignore-next-lineno longer matches any reported error (No error to ignore is reported on line 89). Removed it.All 130 tests pass and phpcs is clean locally.