Commit 3b48e30
committed
[BUGFIX] Fix RoundViewHelper with symfony/polyfill-php84 (#1373)
symfony/polyfill-php84 1.33.0->1.34.0 adds RoundingMode stub [1].
round() in PHP < 8.4 allows int as third argument only, and
has been extended with php 8.4 to allow int|RoundingMode.
The 'class_exists()' check in RoundViewHelper now suddenly
returns true when latest symfony/polyfill-php84 is loaded,
and then feeds \RoundingMode enum to round() in php < 8.4,
which fails with type error. Yay.
The patch switches to a straight version check to trigger
the PHP < 8.4 callback chain avoiding RoundingMode enum
altogether, to avoid the symfony/polyfill-php84 influence.
[1] symfony/polyfill-php84@e4e3f1c1 parent fc09cff commit 3b48e30
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| |||
0 commit comments