Skip to content

Fix CI failures on 5.x (PHP 8.3 regex, phpcs, phpstan)#280

Merged
dereuromark merged 1 commit into
5.xfrom
5.x-ci-fixes
Jun 22, 2026
Merged

Fix CI failures on 5.x (PHP 8.3 regex, phpcs, phpstan)#280
dereuromark merged 1 commit into
5.xfrom
5.x-ci-fixes

Conversation

@dereuromark

Copy link
Copy Markdown
Member

CI is red on 5.x, which also blocks unrelated PRs such as the Dependabot actions/checkout bump (#279). Three independent failures:

1. PHP 8.3+ test failure - IrValidation::numeric()
The regex /[^\x{06F0}-\x{06F9}\x]+/u contains a stray \x with no hex digits. PCRE2 (PHP 8.3+) rejects it with Compilation failed: digits missing after \x, so preg_match() returns false and every input is treated as valid. Removing the stray \x restores the intended "anything that is not a Persian digit" class.

2. CodeSniffer failure - RsValidation
The deprecated // @codingStandardsIgnoreStart / End comment 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 - FiValidation
A stale @phpstan-ignore-next-line no 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.

- 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
@dereuromark dereuromark merged commit b270382 into 5.x Jun 22, 2026
10 checks passed
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.

1 participant