diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-24 20:23:42 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-24 20:23:42 +0900 |
| commit | 90d9b1dc0035a70dab76d520b9dcd14ec57273ad (patch) | |
| tree | 30f6576fddcd4b6fb6fc883c28610b324a15b3cc /crates/shirabe/tests/common/config_stub.rs | |
| parent | 4a8f5a83b933a06974916b102da673f2a88aebe8 (diff) | |
| download | php-shirabe-90d9b1dc0035a70dab76d520b9dcd14ec57273ad.tar.gz php-shirabe-90d9b1dc0035a70dab76d520b9dcd14ec57273ad.tar.zst php-shirabe-90d9b1dc0035a70dab76d520b9dcd14ec57273ad.zip | |
fix(event-dispatcher): invoke Closure listeners instead of always failing is_callable
RequireCommand registers an inline listener on InstallerEvents::PRE_OPERATIONS_EXEC
to track dependency_resolution_completed, mirroring PHP's `function () use
(&$dependencyResolutionCompleted) { ... }`. This is Composer's own code, not a
Plugin subscriber, but it went through the shared non-string-callable path, which
checked is_callable() against a hardcoded PhpMixed::Null and always failed,
breaking every `require` that reaches the install step.
Callable::Closure now carries the actual Rc<dyn Fn> instead of being a data-less
placeholder, and is invoked directly (Closures are always callable in PHP). The
ArrayCallable path used by future Plugin subscribers is untouched.
Un-ignoring the two require_command_test cases that cited this bug reveals two
separate, pre-existing issues (a missing ext-requirement warning message, and a
RefCell re-entrancy panic in ConsoleIO::ask_question); their #[ignore] reasons
are updated to describe the real current blocker instead of the now-fixed one.
Diffstat (limited to 'crates/shirabe/tests/common/config_stub.rs')
0 files changed, 0 insertions, 0 deletions
