diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-02 19:46:36 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-02 19:46:36 +0900 |
| commit | 7db937af313d857d0f66bebaf8ac72d518559bac (patch) | |
| tree | b213d5dfe962abc67c1a06188b5cbf6db8b940db /scripts | |
| parent | 97b5211ab3a41d63ea50d0ca1ecfde6ad3323525 (diff) | |
| download | php-shirabe-7db937af313d857d0f66bebaf8ac72d518559bac.tar.gz php-shirabe-7db937af313d857d0f66bebaf8ac72d518559bac.tar.zst php-shirabe-7db937af313d857d0f66bebaf8ac72d518559bac.zip | |
fix(repository): restore late-bound initialize in ComposerRepository fallthroughs
findPackage()/findPackages()/search() delegate their non-lazy, non-provider
fallthrough to the inner ArrayRepository, whose self-initialization froze the
packages array before ComposerRepository::initialize could read the root file,
so a plain v1-style repo (inline "packages" in packages.json) always answered
empty. Guard the delegations with the same is_initialized() check used by
count()/hasPackage().
getProviders() had the inverse defect: PHP reads the raw $this->packages
property, but the port went through count(), whose initialize poisoned the
initialization flag so the root file would never load afterwards. Check the
raw field for non-empty instead, matching PHP's truthiness test.
Same defect class as 97b5211a and the 3e367f78 downloader fix.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions
