aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts/plugin-stub-generator/composer.json
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-07 20:51:59 +0900
committernsfisis <nsfisis@gmail.com>2026-08-07 20:51:59 +0900
commitcd9e4a2b67cdea258e1daa2d9d830b7643bc19bb (patch)
treee3dd09ac9f471b3c3900f61a6e5d58d9636dab45 /scripts/plugin-stub-generator/composer.json
parent427e059e4ffc6ce5ff130c803f9e533b7c125089 (diff)
downloadphp-shirabe-cd9e4a2b67cdea258e1daa2d9d830b7643bc19bb.tar.gz
php-shirabe-cd9e4a2b67cdea258e1daa2d9d830b7643bc19bb.tar.zst
php-shirabe-cd9e4a2b67cdea258e1daa2d9d830b7643bc19bb.zip
fix(autoload-generator): survive listeners that re-enter dump()
AutoloadGenerator::dump dispatches PRE_AUTOLOAD_DUMP / POST_AUTOLOAD_DUMP, and EventDispatcher::make_autoloader answers those by walking back into the Composer graph -- the local repository, the installation manager, and the generator itself. Installer::run held mutable borrows of all three across the dump call, so any plugin subscribing to either event panicked with "RefCell already borrowed" before its listener ran. dump() and build_package_map() now take the local repository, the installation manager and the locker as shared handles instead of &mut dyn, and the borrow is taken where it is used. The generator itself is re-entered, not just borrowed twice: PHP listeners reach it through Composer::getAutoloadGenerator() and call setDevMode() while dump() is running, and make_autoloader asks the same object for a package map. That is not expressible behind &mut self, so the mutable state moves into Cell/RefCell fields and the whole AutoloadGeneratorInterface takes &self. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'scripts/plugin-stub-generator/composer.json')
0 files changed, 0 insertions, 0 deletions