Skip to content

Clamp wait delays before integer conversion - #20

Merged
ceckoslab merged 5 commits into
mainfrom
codex/fix-delay-float-overflow
Nov 12, 2026
Merged

ceckoslab merged 5 commits into
mainfrom
codex/fix-delay-float-overflow

Conversation

@ceckoslab

@ceckoslab ceckoslab commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

A delay configured as a large float (for example 1e20 in env.php) triggers a PHP 8.5 warning during the integer cast. Magento converts that warning into an exception, preventing runtime configuration from being generated even when Wait After Onload is disabled.

Clamp numeric values to 0–30000 before converting to an integer, and normalize INF, -INF, and NAN to zero. Add regression coverage for numeric extremes, overflowing numeric strings, fractions, and invalid inputs through the normalizer, save backend, and disabled-delay runtime path. The tests promote PHP warnings into exceptions.

This fix should merge before #19 enables PHP 8.5 installation.

Validation:

  • Confirmed the new regression test fails on the previous implementation under PHP 8.5.10.
  • All 19 focused test groups pass on PHP 8.2.33, 8.3.33, 8.4.25, and 8.5.10.
  • Changed PHP files pass syntax checks on all four runtimes.
  • PHPStan level 8 and Magento coding standards pass on PHP 8.5.6.
  • git diff --check passes.

CI prerequisite: #21 repairs the native Magento baseline after an unrelated Flysystem security advisory blocked fresh 2.4.7 installs. That branch is included here for combined validation and will merge first, leaving this PR with the delay fix and its regression tests.

@ceckoslab
ceckoslab merged commit 9ac0843 into main Nov 12, 2026
25 checks passed
ceckoslab added a commit that referenced this pull request Nov 12, 2026
Allow PHP 8.5 after the delay normalization fix in #20 and the native CI baseline update in #21.

All 16 PR checks passed against the refreshed merge with main, including PHP 8.5 validation, lowest/stable component quality checks, and the Magento 2.4.8-p5/PHP 8.3 native gate.
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