aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src')
-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
-rw-r--r--crates/shirabe/src/composer.rs10
-rw-r--r--crates/shirabe/src/console/application.rs41
-rw-r--r--crates/shirabe/src/dependency_resolver/pool_builder.rs2
-rw-r--r--crates/shirabe/src/dependency_resolver/solver_bug_exception.rs2
-rw-r--r--crates/shirabe/src/downloader/path_downloader.rs4
-rw-r--r--crates/shirabe/src/factory.rs6
-rw-r--r--crates/shirabe/src/filter/platform_requirement_filter/platform_requirement_filter_factory.rs2
-rw-r--r--crates/shirabe/src/json/json_manipulator.rs2
-rw-r--r--crates/shirabe/src/lib.rs2
-rw-r--r--crates/shirabe/src/package/loader/root_package_loader.rs2
-rw-r--r--crates/shirabe/src/plugin/plugin_manager.rs4
-rw-r--r--crates/shirabe/src/repository/composer_repository.rs2
-rw-r--r--crates/shirabe/src/util/github.rs2
19 files changed, 69 insertions, 58 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,
);
diff --git a/crates/shirabe/src/composer.rs b/crates/shirabe/src/composer.rs
index e714f85d..1c6bbaed 100644
--- a/crates/shirabe/src/composer.rs
+++ b/crates/shirabe/src/composer.rs
@@ -14,13 +14,21 @@ use crate::util::r#loop::Loop;
use shirabe_pcre::Preg;
use shirabe_php_shim::php_regex;
-// TODO(distribution): change this information to Shirabe version.
+/// The Composer version this port tracks. Kept as-is so `Composer::VERSION`, the `composer`
+/// platform package and the HTTP User-Agent keep reporting a value plugins and servers can
+/// interpret. What Shirabe calls itself is `SHIRABE_VERSION`.
pub const VERSION: &str = "2.9.7";
pub const BRANCH_ALIAS_VERSION: &str = "";
pub const RELEASE_DATE: &str = "2026-04-14 13:31:52";
pub const SOURCE_VERSION: &str = "";
pub const RUNTIME_API_VERSION: &str = "2.2.2";
+pub const SHIRABE_VERSION: &str = env!("CARGO_PKG_VERSION");
+
+/// The UTC date of the commit this build was made from. Baked in by `build.rs`, the way Composer's
+/// Compiler stamps `RELEASE_DATE` when it builds the phar.
+pub const SHIRABE_RELEASE_DATE: &str = include!(concat!(env!("OUT_DIR"), "/release_date.rs"));
+
/// The deadline after which a development build reports itself as outdated, or `None` for a build
/// made from a tagged revision. Baked in by `build.rs`.
///
diff --git a/crates/shirabe/src/console/application.rs b/crates/shirabe/src/console/application.rs
index 9bb810f7..3e4a746b 100644
--- a/crates/shirabe/src/console/application.rs
+++ b/crates/shirabe/src/console/application.rs
@@ -141,17 +141,16 @@ pub struct Application {
}
impl Application {
- const LOGO: &'static str = r#" ______
- / ____/___ ____ ___ ____ ____ ________ _____
- / / / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
-/ /___/ /_/ / / / / / / /_/ / /_/ (__ ) __/ /
-\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
- /_/
+ const LOGO: &'static str = r#" _____ __ _ __
+ / ___// /_ (_)________ _/ /_ ___
+ \__ \/ __ \/ / ___/ __ `/ __ \/ _ \
+ ___/ / / / / / / / /_/ / /_/ / __/
+/____/_/ /_/_/_/ \__,_/_.___/\___/
"#;
pub fn new(name: String, mut version: String) -> Self {
if version.is_empty() {
- version = composer::get_version();
+ version = composer::SHIRABE_VERSION.to_string();
}
if function_exists("ini_set") && extension_loaded("xdebug") {
ini_set("xdebug.show_exception_trace", "0");
@@ -525,11 +524,12 @@ impl Application {
}
format!(
- "<info>{}</info> version <comment>{}{}</comment> {}",
+ "<info>{}</info> version <comment>{}{}</comment> (based on Composer {}) {}",
self.get_name(),
self.get_version(),
branch_alias_string,
- composer::RELEASE_DATE,
+ composer::VERSION,
+ composer::SHIRABE_RELEASE_DATE,
)
}
@@ -2176,7 +2176,7 @@ impl ApplicationHandle {
// at this point plugins are needed, so if we are running as root and it is not allowed we need to prompt
// if interactive, and abort otherwise
if is_non_allowed_root {
- io.write_error("<warning>Do not run Composer as root/super user! See https://getcomposer.org/root for details</warning>");
+ io.write_error("<warning>Do not run Shirabe as root/super user! See https://getcomposer.org/root for details</warning>");
if io.is_interactive()
&& io.ask_confirmation(
@@ -2200,7 +2200,7 @@ impl ApplicationHandle {
let cmd_name = command.borrow().get_name().unwrap_or_default();
if application.borrow_mut().has(&cmd_name) {
let cls = command.borrow().php_class_name();
- io.write_error(&format!("<warning>Plugin command {} ({}) would override a Composer command and has been skipped</warning>", cmd_name, cls));
+ io.write_error(&format!("<warning>Plugin command {} ({}) would override a Shirabe command and has been skipped</warning>", cmd_name, cls));
} else {
self.add(command)?;
}
@@ -2259,9 +2259,10 @@ impl ApplicationHandle {
if !is_proxy_command {
io.write_error3(
&format!(
- "Running {} ({}) with PHP {} on {}",
- composer::get_version(),
- composer::RELEASE_DATE,
+ "Running Shirabe {} ({}, based on Composer {}) with PHP {} on {}",
+ composer::SHIRABE_VERSION,
+ composer::SHIRABE_RELEASE_DATE,
+ composer::VERSION,
shirabe_php_rpc::get_php_version().version,
(if function_exists("php_uname") {
format!("{} / {}", php_uname("s"), php_uname("r"))
@@ -2274,13 +2275,13 @@ impl ApplicationHandle {
);
if shirabe_php_rpc::get_php_version().version_id < 70205 {
- io.write_error(&format!("<warning>Composer supports PHP 7.2.5 and above, you will most likely encounter problems with your PHP {}. Upgrading is strongly recommended but you can use Composer 2.2.x LTS as a fallback.</warning>", shirabe_php_rpc::get_php_version().version));
+ io.write_error(&format!("<warning>Shirabe supports PHP 7.2.5 and above, you will most likely encounter problems with your PHP {}. Upgrading is strongly recommended but you can use Composer 2.2.x LTS as a fallback.</warning>", shirabe_php_rpc::get_php_version().version));
}
if shirabe_php_rpc::xdebug::is_xdebug_active()
&& Platform::get_env("COMPOSER_DISABLE_XDEBUG_WARN").is_none()
{
- io.write_error("<warning>Composer is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug</warning>");
+ io.write_error("<warning>Shirabe is operating slower than normal because you have Xdebug enabled. See https://getcomposer.org/xdebug</warning>");
}
let dev_warning_time = application.borrow().dev_warning_time;
@@ -2290,7 +2291,7 @@ impl ApplicationHandle {
&& time() > dev_warning_time
{
io.write_error(&format!(
- "<warning>Warning: This development build of Composer is over 60 days old. It is recommended to update it by running \"{} self-update\" to get the latest version.</warning>",
+ "<warning>Warning: This development build of Shirabe is over 60 days old. It is recommended to update it by running \"{} self-update\" to get the latest version.</warning>",
shirabe_php_shim::PHP_SERVER
.lock()
.unwrap()
@@ -2305,7 +2306,7 @@ impl ApplicationHandle {
&& command_name.as_deref() != Some("selfupdate")
&& command_name.as_deref() != Some("_complete")
{
- io.write_error("<warning>Do not run Composer as root/super user! See https://getcomposer.org/root for details</warning>");
+ io.write_error("<warning>Do not run Shirabe as root/super user! See https://getcomposer.org/root for details</warning>");
if io.is_interactive()
&& !io.ask_confirmation(
@@ -2336,7 +2337,7 @@ impl ApplicationHandle {
&& unlink(&tempfile).is_ok()
&& !file_exists(&tempfile))
{
- return Ok(Some(format!("<error>PHP temp directory ({}) does not exist or is not writable to Composer. Set sys_temp_dir in your php.ini</error>", sys_get_temp_dir())));
+ return Ok(Some(format!("<error>PHP temp directory ({}) does not exist or is not writable to Shirabe. Set sys_temp_dir in your php.ini</error>", sys_get_temp_dir())));
}
Ok(None)
})
@@ -2362,7 +2363,7 @@ impl ApplicationHandle {
);
if !defined(&script_event_const) {
if application.borrow_mut().has(script) {
- io.write_error(&format!("<warning>A script named {} would override a Composer command and has been skipped</warning>", script));
+ io.write_error(&format!("<warning>A script named {} would override a Shirabe command and has been skipped</warning>", script));
} else {
let mut description = format!(
"Runs the {} script as defined in composer.json",
diff --git a/crates/shirabe/src/dependency_resolver/pool_builder.rs b/crates/shirabe/src/dependency_resolver/pool_builder.rs
index 27ae409b..7dd40c4b 100644
--- a/crates/shirabe/src/dependency_resolver/pool_builder.rs
+++ b/crates/shirabe/src/dependency_resolver/pool_builder.rs
@@ -829,7 +829,7 @@ impl PoolBuilder {
}
if matched_platform_package {
self.io.write_error(&format!(
- "<warning>Pattern \"{}\" listed for update matches platform packages, but these cannot be updated by Composer.</warning>",
+ "<warning>Pattern \"{}\" listed for update matches platform packages, but these cannot be updated by Shirabe.</warning>",
pattern
));
} else if strpos(pattern, "*").is_some() {
diff --git a/crates/shirabe/src/dependency_resolver/solver_bug_exception.rs b/crates/shirabe/src/dependency_resolver/solver_bug_exception.rs
index 9c47d99b..5234108f 100644
--- a/crates/shirabe/src/dependency_resolver/solver_bug_exception.rs
+++ b/crates/shirabe/src/dependency_resolver/solver_bug_exception.rs
@@ -9,7 +9,7 @@ impl SolverBugException {
pub fn new(message: String) -> Self {
let full_message = format!(
"{}\nThis exception was most likely caused by a bug in Composer.\n\
- Please report the command you ran, the exact error you received, and your composer.json on https://github.com/composer/composer/issues - thank you!\n",
+ Please report the command you ran, the exact error you received, and your composer.json on https://github.com/nsfisis/php-shirabe/issues - thank you!\n",
message
);
SolverBugException(RuntimeException::new(full_message))
diff --git a/crates/shirabe/src/downloader/path_downloader.rs b/crates/shirabe/src/downloader/path_downloader.rs
index 8586de3d..44940fef 100644
--- a/crates/shirabe/src/downloader/path_downloader.rs
+++ b/crates/shirabe/src/downloader/path_downloader.rs
@@ -153,7 +153,7 @@ impl PathDownloader {
&& !self.safe_junctions()
{
if !allowed_strategies.contains(&Self::STRATEGY_MIRROR) {
- return Err(RuntimeException::new("You are on an old Windows / old PHP combo which does not allow Composer to use junctions/symlinks and this path repository has symlink:true in its options so copying is not allowed".to_string())
+ return Err(RuntimeException::new("You are on an old Windows / old PHP combo which does not allow Shirabe to use junctions/symlinks and this path repository has symlink:true in its options so copying is not allowed".to_string())
.into());
}
current_strategy = Self::STRATEGY_MIRROR;
@@ -166,7 +166,7 @@ impl PathDownloader {
&& !function_exists("symlink")
{
if !allowed_strategies.contains(&Self::STRATEGY_MIRROR) {
- return Err(RuntimeException::new("Your PHP has the symlink() function disabled which does not allow Composer to use symlinks and this path repository has symlink:true in its options so copying is not allowed".to_string())
+ return Err(RuntimeException::new("Your PHP has the symlink() function disabled which does not allow Shirabe to use symlinks and this path repository has symlink:true in its options so copying is not allowed".to_string())
.into());
}
current_strategy = Self::STRATEGY_MIRROR;
diff --git a/crates/shirabe/src/factory.rs b/crates/shirabe/src/factory.rs
index 4fe248c5..fe5a0ec8 100644
--- a/crates/shirabe/src/factory.rs
+++ b/crates/shirabe/src/factory.rs
@@ -450,9 +450,9 @@ impl Factory {
if !file.exists() {
let message = if path == "./composer.json" || path == "composer.json" {
- format!("Composer could not find a composer.json file in {}", cwd)
+ format!("Shirabe could not find a composer.json file in {}", cwd)
} else {
- format!("Composer could not find the config file: {}", path)
+ format!("Shirabe could not find the config file: {}", path)
};
let instructions = if full_load {
"To initialize a project, please create a composer.json file. See https://getcomposer.org/basic-usage"
@@ -1445,7 +1445,7 @@ impl Factory {
{
if !unsafe { WARNED } {
io.write_error3(
- "<warning>You are running Composer with SSL/TLS protection disabled.</warning>",
+ "<warning>You are running Shirabe with SSL/TLS protection disabled.</warning>",
true,
crate::io::NORMAL,
);
diff --git a/crates/shirabe/src/filter/platform_requirement_filter/platform_requirement_filter_factory.rs b/crates/shirabe/src/filter/platform_requirement_filter/platform_requirement_filter_factory.rs
index 7f08e8dd..f71afb1b 100644
--- a/crates/shirabe/src/filter/platform_requirement_filter/platform_requirement_filter_factory.rs
+++ b/crates/shirabe/src/filter/platform_requirement_filter/platform_requirement_filter_factory.rs
@@ -39,7 +39,7 @@ impl PlatformRequirementFilterFactory {
)?))
}
other => Err(InvalidArgumentException::new(format!(
- "PlatformRequirementFilter: Unknown $boolOrList parameter {}. Please report at https://github.com/composer/composer/issues/new.",
+ "PlatformRequirementFilter: Unknown $boolOrList parameter {}. Please report at https://github.com/nsfisis/php-shirabe/issues/new.",
shirabe_php_shim::get_debug_type(&other)
)).into()),
}
diff --git a/crates/shirabe/src/json/json_manipulator.rs b/crates/shirabe/src/json/json_manipulator.rs
index bbd032e7..2fa4fe8f 100644
--- a/crates/shirabe/src/json/json_manipulator.rs
+++ b/crates/shirabe/src/json/json_manipulator.rs
@@ -939,7 +939,7 @@ impl JsonManipulator {
children_clean = Some(children.clone());
}
- let children_clean = children_clean.ok_or_else(|| InvalidArgumentException::new("JsonManipulator: $childrenClean is not defined. Please report at https://github.com/composer/composer/issues/new.".to_string()))?;
+ let children_clean = children_clean.ok_or_else(|| InvalidArgumentException::new("JsonManipulator: $childrenClean is not defined. Please report at https://github.com/nsfisis/php-shirabe/issues/new.".to_string()))?;
// no child data left, $name was the only key in
let mut empty_match: IndexMap<String, String> = IndexMap::new();
diff --git a/crates/shirabe/src/lib.rs b/crates/shirabe/src/lib.rs
index 009db5a0..9daf2188 100644
--- a/crates/shirabe/src/lib.rs
+++ b/crates/shirabe/src/lib.rs
@@ -43,7 +43,7 @@ pub fn run(argv: Vec<String>) -> anyhow::Result<i32> {
.unwrap_or_default(),
);
- let application = ApplicationHandle::new("Composer".to_string(), String::new())?;
+ let application = ApplicationHandle::new("Shirabe".to_string(), String::new())?;
let input = std::rc::Rc::new(std::cell::RefCell::new(ArgvInput::new(Some(argv), None)?));
application.run(Some(input), None)
}
diff --git a/crates/shirabe/src/package/loader/root_package_loader.rs b/crates/shirabe/src/package/loader/root_package_loader.rs
index 5f35843e..0ee355f0 100644
--- a/crates/shirabe/src/package/loader/root_package_loader.rs
+++ b/crates/shirabe/src/package/loader/root_package_loader.rs
@@ -112,7 +112,7 @@ impl RootPackageLoader {
let package_type = config.get("type").and_then(|v| v.as_string()).unwrap_or("");
if name != "__root__" && package_type != "project" {
io.warning(&format!(
- "Composer could not detect the root package ({}) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version",
+ "Shirabe could not detect the root package ({}) version, defaulting to '1.0.0'. See https://getcomposer.org/root-version",
name
), &[]);
}
diff --git a/crates/shirabe/src/plugin/plugin_manager.rs b/crates/shirabe/src/plugin/plugin_manager.rs
index 75852348..9f569af7 100644
--- a/crates/shirabe/src/plugin/plugin_manager.rs
+++ b/crates/shirabe/src/plugin/plugin_manager.rs
@@ -250,7 +250,7 @@ impl PluginManager {
if requires_composer.get_pretty_string() == self.get_plugin_api_version() {
self.io.write_error(&format!("<warning>The \"{}\" plugin requires composer-plugin-api {}, this *WILL* break in the future and it should be fixed ASAP (require ^{} instead for example).</warning>", package.get_name(), self.get_plugin_api_version(), self.get_plugin_api_version()));
} else if !requires_composer.matches(&current_plugin_api_constraint.into()) {
- self.io.write_error(&format!("<warning>The \"{}\" plugin {}was skipped because it requires a Plugin API version (\"{}\") that does not match your Composer installation (\"{}\"). You may need to run composer update with the \"--no-plugins\" option.</warning>",
+ self.io.write_error(&format!("<warning>The \"{}\" plugin {}was skipped because it requires a Plugin API version (\"{}\") that does not match your Shirabe installation (\"{}\"). You may need to run shirabe update with the \"--no-plugins\" option.</warning>",
package.get_name(),
if is_global_plugin || self.running_in_global_dir { "(installed globally) " } else { "" },
requires_composer.get_pretty_string(),
@@ -1347,7 +1347,7 @@ impl PluginManager {
}
Err(PluginBlockedException::new(format!(
- "{}{} contains a Composer plugin which is blocked by your allow-plugins config. You may add it to the list if you consider it safe.\nYou can run \"composer {}config --no-plugins allow-plugins.{} [true|false]\" to enable it (true) or disable it explicitly and suppress this exception (false)\nSee https://getcomposer.org/allow-plugins",
+ "{}{} contains a Composer plugin which is blocked by your allow-plugins config. You may add it to the list if you consider it safe.\nYou can run \"shirabe {}config --no-plugins allow-plugins.{} [true|false]\" to enable it (true) or disable it explicitly and suppress this exception (false)\nSee https://getcomposer.org/allow-plugins",
package,
if is_global_plugin || self.running_in_global_dir { " (installed globally)" } else { "" },
if is_global_plugin || self.running_in_global_dir { "global " } else { "" },
diff --git a/crates/shirabe/src/repository/composer_repository.rs b/crates/shirabe/src/repository/composer_repository.rs
index fe8faf48..33944c8f 100644
--- a/crates/shirabe/src/repository/composer_repository.rs
+++ b/crates/shirabe/src/repository/composer_repository.rs
@@ -2915,7 +2915,7 @@ impl ComposerRepository {
match data {
Some(d) => Ok(d),
- None => Err(LogicException::new("ComposerRepository: Undefined $data. Please report at https://github.com/composer/composer/issues/new.".to_string()).into()),
+ None => Err(LogicException::new("ComposerRepository: Undefined $data. Please report at https://github.com/nsfisis/php-shirabe/issues/new.".to_string()).into()),
}
}
diff --git a/crates/shirabe/src/util/github.rs b/crates/shirabe/src/util/github.rs
index 10a30159..26756ed0 100644
--- a/crates/shirabe/src/util/github.rs
+++ b/crates/shirabe/src/util/github.rs
@@ -88,7 +88,7 @@ impl GitHub {
self.io.write_error3(msg, true, io_interface::NORMAL);
}
- let mut note = "Composer".to_string();
+ let mut note = "Shirabe".to_string();
let expose_hostname = self
.config
.borrow_mut()