aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command/licenses_command.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-12 01:01:35 +0900
committernsfisis <nsfisis@gmail.com>2026-06-12 01:01:43 +0900
commit1e44f5723e4c0e0903d00a61f254901e612fe5e1 (patch)
tree9c2e1eec364bbf6418a4072ee7767b04c3df0297 /crates/shirabe/src/command/licenses_command.rs
parentddf0a624145b618c05c2ee47414545b99b685f37 (diff)
downloadphp-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.tar.gz
php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.tar.zst
php-shirabe-1e44f5723e4c0e0903d00a61f254901e612fe5e1.zip
feat(symfony-console): port Symfony Console and make the workspace compile
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/command/licenses_command.rs')
-rw-r--r--crates/shirabe/src/command/licenses_command.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/crates/shirabe/src/command/licenses_command.rs b/crates/shirabe/src/command/licenses_command.rs
index b8fa01d..5be2b41 100644
--- a/crates/shirabe/src/command/licenses_command.rs
+++ b/crates/shirabe/src/command/licenses_command.rs
@@ -8,6 +8,7 @@ use shirabe_external_packages::symfony::console::formatter::OutputFormatter;
use shirabe_external_packages::symfony::console::helper::Table;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
+use shirabe_external_packages::symfony::console::style::StyleInterface;
use shirabe_external_packages::symfony::console::style::SymfonyStyle;
use shirabe_php_shim::{PhpMixed, RuntimeException, UnexpectedValueException};
@@ -98,7 +99,7 @@ impl LicensesCommand {
let packages = if input
.borrow()
- .get_option("locked")
+ .get_option("locked")?
.as_bool()
.unwrap_or(false)
{
@@ -112,7 +113,7 @@ impl LicensesCommand {
}
let no_dev = input
.borrow()
- .get_option("no-dev")
+ .get_option("no-dev")?
.as_bool()
.unwrap_or(false);
let repo = locker.get_locked_repository(!no_dev)?;
@@ -124,7 +125,7 @@ impl LicensesCommand {
if input
.borrow()
- .get_option("no-dev")
+ .get_option("no-dev")?
.as_bool()
.unwrap_or(false)
{
@@ -146,7 +147,7 @@ impl LicensesCommand {
let format = input
.borrow()
- .get_option("format")
+ .get_option("format")?
.as_string()
.unwrap_or("text")
.to_string();
@@ -171,7 +172,7 @@ impl LicensesCommand {
io.write("");
let mut table = Table::new(output);
- table.set_style("compact");
+ table.set_style(shirabe_php_shim::PhpMixed::from("compact"))??;
table.set_headers(vec![
PhpMixed::String("Name".to_string()),
PhpMixed::String("Version".to_string()),
@@ -182,7 +183,7 @@ impl LicensesCommand {
let name = if let Some(link) = link {
format!(
"<href={}>{}</>",
- OutputFormatter::escape(&link),
+ OutputFormatter::escape(&link)?,
package.get_pretty_name()
)
} else {