Repository navigation
Commit 8863a59
committed
perf: fast-path for default Composer namespaces loading in Autoloader
When Config\Modules::$composerPackages has no filters defined (the default
behavior in almost all applications), all PSR-4 prefixes from Composer
belong to installed packages.
Skip the expensive InstalledVersions::getAllRawData() scanning, versions
array_merge, and triple-nested str_starts_with matching loop when neither
'only' nor 'exclude' is configured. When package filtering is configured,
the original full validation logic is preserved with zero BC breaks.1 parent 27a1e6a commit 8863a59
2 files changed
Lines changed: 45 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
407 | 430 | | |
408 | 431 | | |
409 | 432 | | |
410 | 433 | | |
411 | 434 | | |
412 | 435 | | |
413 | 436 | | |
| 437 | + | |
414 | 438 | | |
415 | 439 | | |
416 | 440 | | |
| |||
419 | 443 | | |
420 | 444 | | |
421 | 445 | | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
429 | 446 | | |
430 | 447 | | |
| 448 | + | |
431 | 449 | | |
432 | 450 | | |
433 | 451 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
420 | 440 | | |
421 | 441 | | |
422 | 442 | | |
| |||
0 commit comments