diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-26 01:14:19 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-26 01:14:19 +0900 |
| commit | ae221675090675604411ce460c7053dba8bd8ec4 (patch) | |
| tree | c6e033569b87bc1facab51abcfe98e1a44ec34a4 /crates/shirabe/tests | |
| parent | 36ee45a9aaa5c13ce3e7f7abcce4374e25536224 (diff) | |
| download | php-shirabe-ae221675090675604411ce460c7053dba8bd8ec4.tar.gz php-shirabe-ae221675090675604411ce460c7053dba8bd8ec4.tar.zst php-shirabe-ae221675090675604411ce460c7053dba8bd8ec4.zip | |
fix(dump-autoload-command): borrow Composer immutably in execute
execute only calls &self getters on the Composer, but borrowed it via
composer_full_mut. The held RefMut deadlocked the re-entrant shared borrow
taken by EventDispatcher::dispatch -> get_script_listeners ->
PartialComposerHandle::borrow_partial, panicking on every invocation.
Un-ignores all 12 DumpAutoloadCommandTest cases.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests')
| -rw-r--r-- | crates/shirabe/tests/command/dump_autoload_command_test.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/crates/shirabe/tests/command/dump_autoload_command_test.rs b/crates/shirabe/tests/command/dump_autoload_command_test.rs index 1d302f5..c21b13d 100644 --- a/crates/shirabe/tests/command/dump_autoload_command_test.rs +++ b/crates/shirabe/tests/command/dump_autoload_command_test.rs @@ -8,7 +8,6 @@ use shirabe_php_shim::PhpMixed; /// ref: DumpAutoloadCommandTest::testDumpAutoload #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_dump_autoload() { let tear_down = init_temp_composer(None, None, None, true); @@ -31,7 +30,6 @@ fn test_dump_autoload() { /// ref: DumpAutoloadCommandTest::testDumpDevAutoload #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_dump_dev_autoload() { let tear_down = init_temp_composer(None, None, None, true); @@ -57,7 +55,6 @@ fn test_dump_dev_autoload() { /// ref: DumpAutoloadCommandTest::testDumpNoDevAutoload #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_dump_no_dev_autoload() { let tear_down = init_temp_composer(None, None, None, true); @@ -83,7 +80,6 @@ fn test_dump_no_dev_autoload() { /// ref: DumpAutoloadCommandTest::testUsingOptimizeAndStrictPsr #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_using_optimize_and_strict_psr() { let tear_down = init_temp_composer(None, None, None, true); @@ -111,7 +107,6 @@ fn test_using_optimize_and_strict_psr() { /// ref: DumpAutoloadCommandTest::testFailsUsingStrictPsrIfClassMapViolationsAreFound #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_fails_using_strict_psr_if_class_map_violations_are_found() { let tear_down = init_temp_composer( Some(&serde_json::json!({ @@ -159,7 +154,6 @@ fn test_fails_using_strict_psr_if_class_map_violations_are_found() { /// ref: DumpAutoloadCommandTest::testUsingClassmapAuthoritative #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_using_classmap_authoritative() { let tear_down = init_temp_composer(None, None, None, true); @@ -191,7 +185,6 @@ fn test_using_classmap_authoritative() { /// ref: DumpAutoloadCommandTest::testUsingClassmapAuthoritativeAndStrictPsr #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_using_classmap_authoritative_and_strict_psr() { let tear_down = init_temp_composer(None, None, None, true); @@ -224,7 +217,6 @@ fn test_using_classmap_authoritative_and_strict_psr() { /// ref: DumpAutoloadCommandTest::testStrictPsrDoesNotWorkWithoutOptimizedAutoloader #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_strict_psr_does_not_work_without_optimized_autoloader() { let tear_down = init_temp_composer(None, None, None, true); @@ -248,7 +240,6 @@ fn test_strict_psr_does_not_work_without_optimized_autoloader() { /// ref: DumpAutoloadCommandTest::testDevAndNoDevCannotBeCombined #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_dev_and_no_dev_cannot_be_combined() { let tear_down = init_temp_composer(None, None, None, true); @@ -274,7 +265,6 @@ fn test_dev_and_no_dev_cannot_be_combined() { /// ref: DumpAutoloadCommandTest::testWithCustomAutoloaderSuffix #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_with_custom_autoloader_suffix() { let tear_down = init_temp_composer( Some(&serde_json::json!({ @@ -306,7 +296,6 @@ fn test_with_custom_autoloader_suffix() { /// ref: DumpAutoloadCommandTest::testWithExistingComposerLockAndAutoloaderSuffix #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_with_existing_composer_lock_and_autoloader_suffix() { let tear_down = init_temp_composer( Some(&serde_json::json!({ @@ -355,7 +344,6 @@ fn test_with_existing_composer_lock_and_autoloader_suffix() { /// ref: DumpAutoloadCommandTest::testWithExistingComposerLockWithoutAutoloaderSuffix #[test] #[serial] -#[ignore = "DumpAutoloadCommand::execute panics: composer_full_mut() holds a mut borrow of the composer RefCell across get_event_dispatcher().dispatch(), which re-enters via EventDispatcher::get_script_listeners -> PartialComposerHandle::borrow_partial (composer.rs:446) -> RefCell already mutably borrowed. Source bug in event_dispatcher.rs:1004 / dump_autoload_command.rs:88-91, not fixable from the test"] fn test_with_existing_composer_lock_without_autoloader_suffix() { let tear_down = init_temp_composer( Some(&serde_json::json!({ |
