aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/console
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-22 21:37:17 +0900
committernsfisis <nsfisis@gmail.com>2026-08-22 21:37:17 +0900
commit88b5c4b9c5f7941292b918b6eefe54947c4a0d96 (patch)
tree2de6acb706d893f440e3afea1478faf9a0f680ca /crates/shirabe/src/console
parent3185a4da1246bee5c564394a20874835b5d8def1 (diff)
downloadphp-shirabe-88b5c4b9c5f7941292b918b6eefe54947c4a0d96.tar.gz
php-shirabe-88b5c4b9c5f7941292b918b6eefe54947c4a0d96.tar.zst
php-shirabe-88b5c4b9c5f7941292b918b6eefe54947c4a0d96.zip
chore(todo): tag or drop the TODO markers that carry no tag
`fund_command.rs` claimed `CompleteAliasPackage` still had to be handled, but `as_complete()` resolves through `is_complete()`, which already covers `CompleteAliasPackage` and `RootAliasPackage` — the same set PHP's `instanceof CompletePackageInterface` matches. The preceding alias guard rules those out anyway, so both markers went away; the first condition is now a single chain, matching the shape of the PHP original. `Application::find()` skips commands it cannot borrow, where Symfony registers the aliases of every command unconditionally. That is a real divergence, so it gets `TODO(port)`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/console')
-rw-r--r--crates/shirabe/src/console/application.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs
index b4d98054..24aee249 100644
--- a/crates/shirabe/src/console/application.rs
+++ b/crates/shirabe/src/console/application.rs
@@ -1012,12 +1012,13 @@ impl Application {
let commands_snapshot: Vec<std::rc::Rc<std::cell::RefCell<dyn SymfonyCommand>>> =
self.commands.values().cloned().collect();
for command in &commands_snapshot {
+ // TODO(port): Symfony registers the aliases of every command here, while this pass
+ // skips any command that cannot be borrowed.
// A command's run() can re-enter find() (e.g. HelpCommand looks up the command it
// describes). That command is mutably borrowed for the duration of its run(), so it
- // cannot be borrowed here. It is safe to skip: find() always completes this alias pass
- // before returning a command, so any command currently executing already had its
+ // cannot be borrowed here. Skipping it is safe: find() always completes this alias
+ // pass before returning a command, so any command currently executing already had its
// aliases registered in the earlier find() call that located it.
- // TODO: this work-around could be solved.
let Ok(borrowed) = command.try_borrow() else {
continue;
};