Commit 1570544
Extract auto-index condition into private method and handle PHP 8.0+ array literal behavior
PHP 8.0 changed array literals to update the auto-increment key for
negative values, while imperative assignment only got this fix in PHP 8.3.
Extract the condition into shouldUpdateAutoIndexForOffset() for readability
and add isLiteralArray flag to ConstantArrayTypeBuilder to distinguish the
two cases.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 483652a commit 1570544
File tree
3 files changed
+24
-1
lines changed- src
- Php
- Reflection
- Type/Constant
3 files changed
+24
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
516 | 516 | | |
517 | 517 | | |
518 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
519 | 524 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
639 | 639 | | |
640 | 640 | | |
641 | 641 | | |
| 642 | + | |
642 | 643 | | |
643 | 644 | | |
644 | 645 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
| |||
63 | 65 | | |
64 | 66 | | |
65 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
426 | 433 | | |
427 | 434 | | |
428 | 435 | | |
429 | | - | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
430 | 447 | | |
431 | 448 | | |
432 | 449 | | |
0 commit comments