aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/command')
-rw-r--r--crates/shirabe/src/command/about_command.rs7
-rw-r--r--crates/shirabe/src/command/config_command.rs6
-rw-r--r--crates/shirabe/src/command/diagnose_command.rs27
-rw-r--r--crates/shirabe/src/command/init_command.rs2
-rw-r--r--crates/shirabe/src/command/install_command.rs2
-rw-r--r--crates/shirabe/src/command/update_command.rs2
6 files changed, 24 insertions, 22 deletions
diff --git a/crates/shirabe/src/command/about_command.rs b/crates/shirabe/src/command/about_command.rs
index 3a72ac3a..73c466c6 100644
--- a/crates/shirabe/src/command/about_command.rs
+++ b/crates/shirabe/src/command/about_command.rs
@@ -47,12 +47,13 @@ impl Command for AboutCommand {
input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
- let composer_version = composer::get_version();
+ let shirabe_version = composer::SHIRABE_VERSION;
+ let composer_version = composer::VERSION;
let _ = (input, output);
self.get_io().borrow().write(&format!(
- "<info>Composer - Dependency Manager for PHP - version {composer_version}</info>\n\
- <comment>Composer is a dependency manager tracking local dependencies of your projects and libraries.\n\
+ "<info>Shirabe - Dependency Manager for PHP - version {shirabe_version} (based on Composer {composer_version})</info>\n\
+ <comment>Shirabe is a dependency manager tracking local dependencies of your projects and libraries.\n\
See https://getcomposer.org/ for more information.</comment>"
));
diff --git a/crates/shirabe/src/command/config_command.rs b/crates/shirabe/src/command/config_command.rs
index df47d934..3d92de4b 100644
--- a/crates/shirabe/src/command/config_command.rs
+++ b/crates/shirabe/src/command/config_command.rs
@@ -120,7 +120,7 @@ impl ConfigCommand {
.unwrap_or(false)
{
self.get_io().write_error(
- "<info>You are now running Composer with SSL/TLS protection enabled.</info>",
+ "<info>You are now running Shirabe with SSL/TLS protection enabled.</info>",
);
} else if normalized_value.as_bool().unwrap_or(false)
&& !config
@@ -129,7 +129,7 @@ impl ConfigCommand {
.as_bool()
.unwrap_or(false)
{
- self.get_io().write_error("<warning>You are now running Composer with SSL/TLS protection disabled.</warning>");
+ self.get_io().write_error("<warning>You are now running Shirabe with SSL/TLS protection disabled.</warning>");
}
}
@@ -907,7 +907,7 @@ impl Command for ConfigCommand {
.unwrap_or(false)
{
self.get_io().write_error(
- "<info>You are now running Composer with SSL/TLS protection enabled.</info>",
+ "<info>You are now running Shirabe with SSL/TLS protection enabled.</info>",
);
}
diff --git a/crates/shirabe/src/command/diagnose_command.rs b/crates/shirabe/src/command/diagnose_command.rs
index da043a4f..451b051c 100644
--- a/crates/shirabe/src/command/diagnose_command.rs
+++ b/crates/shirabe/src/command/diagnose_command.rs
@@ -177,7 +177,7 @@ impl DiagnoseCommand {
let mut result_list: Vec<PhpMixed> = vec![];
let mut tls_warning: Option<String> = None;
if proto == "https" && config.borrow().get("disable-tls").as_bool() == Some(true) {
- tls_warning = Some("<warning>Composer is configured to disable SSL/TLS protection. This will leave remote HTTPS requests vulnerable to Man-In-The-Middle attacks.</warning>".to_string());
+ tls_warning = Some("<warning>Shirabe is configured to disable SSL/TLS protection. This will leave remote HTTPS requests vulnerable to Man-In-The-Middle attacks.</warning>".to_string());
}
match self
@@ -236,7 +236,7 @@ impl DiagnoseCommand {
let mut tls_warning: Option<String> = None;
if url.starts_with("https://") && config.borrow().get("disable-tls").as_bool() == Some(true)
{
- tls_warning = Some("<warning>Composer is configured to disable SSL/TLS protection. This will leave remote HTTPS requests vulnerable to Man-In-The-Middle attacks.</warning>".to_string());
+ tls_warning = Some("<warning>Shirabe is configured to disable SSL/TLS protection. This will leave remote HTTPS requests vulnerable to Man-In-The-Middle attacks.</warning>".to_string());
}
match self
@@ -964,7 +964,7 @@ impl DiagnoseCommand {
),
other => {
return Err(InvalidArgumentException::new(format!(
- "DiagnoseCommand: Unknown error type \"{}\". Please report at https://github.com/composer/composer/issues/new.",
+ "DiagnoseCommand: Unknown error type \"{}\". Please report at https://github.com/nsfisis/php-shirabe/issues/new.",
other,
))
.into());
@@ -989,7 +989,7 @@ impl DiagnoseCommand {
"zlib" => {
display_ini_message = true;
format!(
- "The zlib extension is not loaded, this can slow down Composer a lot.{}If possible, enable it or recompile php with --with-zlib{}",
+ "The zlib extension is not loaded, this can slow down Shirabe a lot.{}If possible, enable it or recompile php with --with-zlib{}",
PHP_EOL, PHP_EOL
)
}
@@ -1021,29 +1021,29 @@ impl DiagnoseCommand {
)
}
"xdebug_loaded" => format!(
- "The xdebug extension is loaded, this can slow down Composer a little.{} Disabling it when using Composer is recommended.",
+ "The xdebug extension is loaded, this can slow down Shirabe a little.{} Disabling it when using Shirabe is recommended.",
PHP_EOL
),
"xdebug_profile" => {
display_ini_message = true;
format!(
- "The xdebug.profiler_enabled setting is enabled, this can slow down Composer a lot.{}Add the following to the end of your `php.ini` to disable it:{} xdebug.profiler_enabled = 0",
+ "The xdebug.profiler_enabled setting is enabled, this can slow down Shirabe a lot.{}Add the following to the end of your `php.ini` to disable it:{} xdebug.profiler_enabled = 0",
PHP_EOL, PHP_EOL
)
}
"onedrive" => format!(
- "The Windows OneDrive folder is not supported on PHP versions below 7.2.23 and 7.3.10.{}Upgrade your PHP ({}) to use this location with Composer.{}",
+ "The Windows OneDrive folder is not supported on PHP versions below 7.2.23 and 7.3.10.{}Upgrade your PHP ({}) to use this location with Shirabe.{}",
PHP_EOL,
current.as_string().unwrap_or(""),
PHP_EOL
),
"uopz" => format!(
- "The uopz extension ignores exit calls and may not work with all Composer commands.{}Disabling it when using Composer is recommended.",
+ "The uopz extension ignores exit calls and may not work with all Shirabe commands.{}Disabling it when using Shirabe is recommended.",
PHP_EOL
),
other => {
return Err(InvalidArgumentException::new(format!(
- "DiagnoseCommand: Unknown warning type \"{}\". Please report at https://github.com/composer/composer/issues/new.",
+ "DiagnoseCommand: Unknown warning type \"{}\". Please report at https://github.com/nsfisis/php-shirabe/issues/new.",
other,
))
.into());
@@ -1197,17 +1197,18 @@ impl Command for DiagnoseCommand {
let r = self.check_pub_keys(&config.borrow())?;
self.output_result(r);
- io.write_no_newline("Checking Composer version: ");
+ io.write_no_newline("Checking Shirabe version: ");
let r = self.check_version(&config)?;
self.output_result(r);
}
io.write(&format!(
- "Composer version: <comment>{}</comment>",
- composer::get_version()
+ "Shirabe version: <comment>{}</comment> (based on Composer <comment>{}</comment>)",
+ composer::SHIRABE_VERSION,
+ composer::VERSION
));
- io.write_no_newline("Checking Composer and its dependencies for vulnerabilities: ");
+ io.write_no_newline("Checking Shirabe and its dependencies for vulnerabilities: ");
let r = self.check_composer_audit(&config)?;
self.output_result(r);
diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs
index e76f5a94..7e6021a9 100644
--- a/crates/shirabe/src/command/init_command.rs
+++ b/crates/shirabe/src/command/init_command.rs
@@ -878,7 +878,7 @@ impl Command for InitCommand {
"\n{}\n",
formatter.borrow().format_block(
FormatBlockMessages::String(
- "Welcome to the Composer config generator".to_string(),
+ "Welcome to the Shirabe config generator".to_string(),
),
"bg=blue;fg=white",
true,
diff --git a/crates/shirabe/src/command/install_command.rs b/crates/shirabe/src/command/install_command.rs
index 6a5ce8de..f1a6df35 100644
--- a/crates/shirabe/src/command/install_command.rs
+++ b/crates/shirabe/src/command/install_command.rs
@@ -134,7 +134,7 @@ impl Command for InstallCommand {
let composer = crate::composer::composer_full(&composer_handle);
if !composer.get_locker().borrow_mut().is_locked() && !HttpDownloader::is_curl_enabled() {
- io.write_error("<warning>Composer is operating significantly slower than normal because you do not have the PHP curl extension enabled.</warning>");
+ io.write_error("<warning>Shirabe is operating significantly slower than normal because you do not have the PHP curl extension enabled.</warning>");
}
// TODO(plugin): dispatch CommandEvent
diff --git a/crates/shirabe/src/command/update_command.rs b/crates/shirabe/src/command/update_command.rs
index b961b3a0..38a79e30 100644
--- a/crates/shirabe/src/command/update_command.rs
+++ b/crates/shirabe/src/command/update_command.rs
@@ -345,7 +345,7 @@ impl Command for UpdateCommand {
if !HttpDownloader::is_curl_enabled() {
io.write_error3(
- "<warning>Composer is operating significantly slower than normal because you do not have the PHP curl extension enabled.</warning>",
+ "<warning>Shirabe is operating significantly slower than normal because you do not have the PHP curl extension enabled.</warning>",
true,
io_interface::NORMAL,
);