aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/command
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-07-11 16:33:05 +0900
committernsfisis <nsfisis@gmail.com>2026-07-11 16:33:05 +0900
commit27d00055df8691a6bd99aaf38633a7338b16cc6a (patch)
tree4af17ccff5f8c2d09156fa62c559e60e3e683dac /crates/shirabe/src/command
parent1ec2220def43e37e5a65b96dde93c19b493258f4 (diff)
downloadphp-shirabe-27d00055df8691a6bd99aaf38633a7338b16cc6a.tar.gz
php-shirabe-27d00055df8691a6bd99aaf38633a7338b16cc6a.tar.zst
php-shirabe-27d00055df8691a6bd99aaf38633a7338b16cc6a.zip
chore: use fully-qualified name for Rc/RefCell
Diffstat (limited to 'crates/shirabe/src/command')
-rw-r--r--crates/shirabe/src/command/about_command.rs10
-rw-r--r--crates/shirabe/src/command/archive_command.rs14
-rw-r--r--crates/shirabe/src/command/audit_command.rs10
-rw-r--r--crates/shirabe/src/command/base_command.rs71
-rw-r--r--crates/shirabe/src/command/bump_command.rs10
-rw-r--r--crates/shirabe/src/command/check_platform_reqs_command.rs10
-rw-r--r--crates/shirabe/src/command/clear_cache_command.rs10
-rw-r--r--crates/shirabe/src/command/create_project_command.rs6
-rw-r--r--crates/shirabe/src/command/depends_command.rs10
-rw-r--r--crates/shirabe/src/command/diagnose_command.rs6
-rw-r--r--crates/shirabe/src/command/dump_autoload_command.rs10
-rw-r--r--crates/shirabe/src/command/exec_command.rs14
-rw-r--r--crates/shirabe/src/command/fund_command.rs10
-rw-r--r--crates/shirabe/src/command/global_command.rs15
-rw-r--r--crates/shirabe/src/command/home_command.rs10
-rw-r--r--crates/shirabe/src/command/init_command.rs14
-rw-r--r--crates/shirabe/src/command/install_command.rs10
-rw-r--r--crates/shirabe/src/command/licenses_command.rs10
-rw-r--r--crates/shirabe/src/command/outdated_command.rs13
-rw-r--r--crates/shirabe/src/command/prohibits_command.rs10
-rw-r--r--crates/shirabe/src/command/reinstall_command.rs14
-rw-r--r--crates/shirabe/src/command/remove_command.rs10
-rw-r--r--crates/shirabe/src/command/repository_command.rs6
-rw-r--r--crates/shirabe/src/command/require_command.rs10
-rw-r--r--crates/shirabe/src/command/run_script_command.rs19
-rw-r--r--crates/shirabe/src/command/script_alias_command.rs10
-rw-r--r--crates/shirabe/src/command/search_command.rs10
-rw-r--r--crates/shirabe/src/command/self_update_command.rs10
-rw-r--r--crates/shirabe/src/command/show_command.rs10
-rw-r--r--crates/shirabe/src/command/status_command.rs10
-rw-r--r--crates/shirabe/src/command/suggests_command.rs10
-rw-r--r--crates/shirabe/src/command/update_command.rs10
-rw-r--r--crates/shirabe/src/command/validate_command.rs10
33 files changed, 182 insertions, 230 deletions
diff --git a/crates/shirabe/src/command/about_command.rs b/crates/shirabe/src/command/about_command.rs
index 7983a580..386beebb 100644
--- a/crates/shirabe/src/command/about_command.rs
+++ b/crates/shirabe/src/command/about_command.rs
@@ -7,8 +7,6 @@ use crate::composer;
use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct AboutCommand {
@@ -43,8 +41,8 @@ impl Command for AboutCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ 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 _ = (input, output);
@@ -60,8 +58,8 @@ impl Command for AboutCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/archive_command.rs b/crates/shirabe/src/command/archive_command.rs
index 741847a7..2a099c89 100644
--- a/crates/shirabe/src/command/archive_command.rs
+++ b/crates/shirabe/src/command/archive_command.rs
@@ -28,14 +28,12 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{LogicException, get_debug_type};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct ArchiveCommand {
base_command_data: BaseCommandData,
/// For testing only: partial-mock seam mirroring PHPUnit `onlyMethods(['initialize', 'archive'])`.
- test_hooks: RefCell<ArchiveCommandTestHooks>,
+ test_hooks: std::cell::RefCell<ArchiveCommandTestHooks>,
}
/// For testing only: records and stubs for the `ArchiveCommand` partial-mock seam.
@@ -70,7 +68,7 @@ impl ArchiveCommand {
pub fn new() -> Self {
let command = ArchiveCommand {
base_command_data: BaseCommandData::new(None),
- test_hooks: RefCell::new(ArchiveCommandTestHooks::default()),
+ test_hooks: std::cell::RefCell::new(ArchiveCommandTestHooks::default()),
};
command
.configure()
@@ -104,8 +102,8 @@ impl Command for ArchiveCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.try_composer(None, None);
@@ -206,8 +204,8 @@ impl Command for ArchiveCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
if self.test_hooks.borrow().skip_initialize {
return Ok(());
diff --git a/crates/shirabe/src/command/audit_command.rs b/crates/shirabe/src/command/audit_command.rs
index 236ecdc0..fb56169e 100644
--- a/crates/shirabe/src/command/audit_command.rs
+++ b/crates/shirabe/src/command/audit_command.rs
@@ -19,8 +19,6 @@ use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{
InvalidArgumentException, PhpMixed, UnexpectedValueException, implode, in_array,
};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct AuditCommand {
@@ -116,8 +114,8 @@ impl Command for AuditCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
let packages = self.get_packages(&composer, input.clone())?;
@@ -220,8 +218,8 @@ impl Command for AuditCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/base_command.rs b/crates/shirabe/src/command/base_command.rs
index 33864964..b80cb2b4 100644
--- a/crates/shirabe/src/command/base_command.rs
+++ b/crates/shirabe/src/command/base_command.rs
@@ -30,8 +30,6 @@ use shirabe_php_shim::{
InvalidArgumentException, LogicException, PhpMixed, RuntimeException, UnexpectedValueException,
count, explode, in_array, is_string,
};
-use std::cell::RefCell;
-use std::rc::Rc;
pub const SUCCESS: i64 = 0;
pub const FAILURE: i64 = 1;
@@ -42,16 +40,16 @@ pub const INVALID: i64 = 2;
#[derive(Debug)]
pub struct BaseCommandData {
inner: CommandData,
- pub(crate) composer: RefCell<Option<PartialComposerHandle>>,
- pub(crate) io: RefCell<Option<Rc<RefCell<dyn IOInterface>>>>,
+ pub(crate) composer: std::cell::RefCell<Option<PartialComposerHandle>>,
+ pub(crate) io: std::cell::RefCell<Option<std::rc::Rc<std::cell::RefCell<dyn IOInterface>>>>,
}
impl BaseCommandData {
pub fn new(name: Option<String>) -> Self {
BaseCommandData {
inner: CommandData::new(name),
- composer: RefCell::new(None),
- io: RefCell::new(None),
+ composer: std::cell::RefCell::new(None),
+ io: std::cell::RefCell::new(None),
}
}
@@ -152,15 +150,15 @@ pub trait BaseCommand: Command {
/// Removes the cached composer instance
fn reset_composer(&self) -> anyhow::Result<()>;
- fn get_io(&self) -> Rc<RefCell<dyn IOInterface>>;
+ fn get_io(&self) -> std::rc::Rc<std::cell::RefCell<dyn IOInterface>>;
- fn set_io(&self, io: Rc<RefCell<dyn IOInterface>>);
+ fn set_io(&self, io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>);
/// Calls {@see Factory::create()} with the given arguments, taking into account flags and default states for disabling scripts and plugins
fn create_composer_instance(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- io: Rc<RefCell<dyn IOInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
config: Option<IndexMap<String, PhpMixed>>,
disable_plugins: bool,
disable_scripts: Option<bool>,
@@ -170,14 +168,14 @@ pub trait BaseCommand: Command {
fn get_preferred_install_options(
&self,
config: &Config,
- input: Rc<RefCell<dyn InputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
keep_vcs_requires_prefer_source: bool,
) -> anyhow::Result<(bool, bool)>;
fn get_platform_requirement_filter(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- ) -> anyhow::Result<Rc<dyn PlatformRequirementFilterInterface>>;
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ ) -> anyhow::Result<std::rc::Rc<dyn PlatformRequirementFilterInterface>>;
/// @param array<string> $requirements
///
@@ -196,7 +194,11 @@ pub trait BaseCommand: Command {
) -> anyhow::Result<Vec<IndexMap<String, String>>>;
/// @param array<TableSeparator|mixed[]> $table
- fn render_table(&self, table: Vec<PhpMixed>, output: Rc<RefCell<dyn OutputInterface>>);
+ fn render_table(
+ &self,
+ table: Vec<PhpMixed>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
+ );
fn get_terminal_width(&self) -> i64;
@@ -205,7 +207,7 @@ pub trait BaseCommand: Command {
/// @return Auditor::FORMAT_*
fn get_audit_format(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
opt_name: &str,
) -> anyhow::Result<String>;
@@ -213,7 +215,7 @@ pub trait BaseCommand: Command {
fn create_audit_config(
&self,
config: &mut Config,
- input: Rc<RefCell<dyn InputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
) -> anyhow::Result<AuditConfig>;
}
@@ -327,7 +329,7 @@ impl BaseCommand for BaseCommandData {
Ok(())
}
- fn get_io(&self) -> Rc<RefCell<dyn IOInterface>> {
+ fn get_io(&self) -> std::rc::Rc<std::cell::RefCell<dyn IOInterface>> {
if self.io.borrow().is_none() {
match self.get_application() {
Some(application) => {
@@ -343,7 +345,8 @@ impl BaseCommand for BaseCommandData {
*self.io.borrow_mut() = Some(io);
}
None => {
- *self.io.borrow_mut() = Some(Rc::new(RefCell::new(NullIO::new())));
+ *self.io.borrow_mut() =
+ Some(std::rc::Rc::new(std::cell::RefCell::new(NullIO::new())));
}
}
}
@@ -351,14 +354,14 @@ impl BaseCommand for BaseCommandData {
self.io.borrow().clone().unwrap()
}
- fn set_io(&self, io: Rc<RefCell<dyn IOInterface>>) {
+ fn set_io(&self, io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>) {
*self.io.borrow_mut() = Some(io);
}
fn create_composer_instance(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- io: Rc<RefCell<dyn IOInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
config: Option<IndexMap<String, PhpMixed>>,
disable_plugins: bool,
disable_scripts: Option<bool>,
@@ -387,7 +390,7 @@ impl BaseCommand for BaseCommandData {
fn get_preferred_install_options(
&self,
config: &Config,
- input: Rc<RefCell<dyn InputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
keep_vcs_requires_prefer_source: bool,
) -> anyhow::Result<(bool, bool)> {
let mut prefer_source = false;
@@ -510,8 +513,8 @@ impl BaseCommand for BaseCommandData {
fn get_platform_requirement_filter(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- ) -> anyhow::Result<Rc<dyn PlatformRequirementFilterInterface>> {
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ ) -> anyhow::Result<std::rc::Rc<dyn PlatformRequirementFilterInterface>> {
if !input.borrow().has_option("ignore-platform-reqs")
|| !input.borrow().has_option("ignore-platform-req")
{
@@ -577,7 +580,11 @@ impl BaseCommand for BaseCommandData {
parser.parse_name_version_pairs(requirements)
}
- fn render_table(&self, table: Vec<PhpMixed>, output: Rc<RefCell<dyn OutputInterface>>) {
+ fn render_table(
+ &self,
+ table: Vec<PhpMixed>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
+ ) {
let mut renderer = Table::new(output);
renderer
.set_style("compact".into())
@@ -604,7 +611,7 @@ impl BaseCommand for BaseCommandData {
fn get_audit_format(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
opt_name: &str,
) -> anyhow::Result<String> {
if !input.borrow().has_option(opt_name) {
@@ -641,7 +648,7 @@ impl BaseCommand for BaseCommandData {
fn create_audit_config(
&self,
config: &mut Config,
- input: Rc<RefCell<dyn InputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
) -> anyhow::Result<AuditConfig> {
// Handle both --audit and --no-audit flags
let audit = if input.borrow().has_option("audit") {
@@ -700,7 +707,11 @@ impl BaseCommand for BaseCommandData {
/// (same for `getDisableScriptsByDefault()`), ORed into the caller's flags.
fn apply_application_defaults(
application: Option<
- Rc<RefCell<dyn shirabe_external_packages::symfony::console::application::Application>>,
+ std::rc::Rc<
+ std::cell::RefCell<
+ dyn shirabe_external_packages::symfony::console::application::Application,
+ >,
+ >,
>,
mut disable_plugins: bool,
mut disable_scripts: bool,
@@ -725,8 +736,8 @@ fn apply_application_defaults(
/// future overrides) bind correctly.
pub fn base_command_initialize(
cmd: &dyn BaseCommand,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
// initialize a plugin-enabled Composer instance, either local or global
let disable_plugins = input
diff --git a/crates/shirabe/src/command/bump_command.rs b/crates/shirabe/src/command/bump_command.rs
index e3dac8a2..e6c565c1 100644
--- a/crates/shirabe/src/command/bump_command.rs
+++ b/crates/shirabe/src/command/bump_command.rs
@@ -20,8 +20,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{PhpMixed, file_get_contents, file_put_contents, is_writable, strtolower};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct BumpCommand {
@@ -388,8 +386,8 @@ impl Command for BumpCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let packages_filter: Vec<String> = input
.borrow()
@@ -430,8 +428,8 @@ impl Command for BumpCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/check_platform_reqs_command.rs b/crates/shirabe/src/command/check_platform_reqs_command.rs
index 4f53e79a..0f310ea4 100644
--- a/crates/shirabe/src/command/check_platform_reqs_command.rs
+++ b/crates/shirabe/src/command/check_platform_reqs_command.rs
@@ -17,8 +17,6 @@ use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{PhpMixed, array_merge_map, strip_tags};
use shirabe_semver::constraint::AnyConstraint;
use shirabe_semver::constraint::SimpleConstraint;
-use std::cell::RefCell;
-use std::rc::Rc;
struct CheckResult {
platform_package: String,
@@ -189,8 +187,8 @@ impl Command for CheckPlatformReqsCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
let composer = crate::composer::composer_full(&composer);
@@ -394,8 +392,8 @@ impl Command for CheckPlatformReqsCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/clear_cache_command.rs b/crates/shirabe/src/command/clear_cache_command.rs
index 2e414125..054ea8b1 100644
--- a/crates/shirabe/src/command/clear_cache_command.rs
+++ b/crates/shirabe/src/command/clear_cache_command.rs
@@ -12,8 +12,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::realpath;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct ClearCacheCommand {
@@ -62,8 +60,8 @@ impl Command for ClearCacheCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.try_composer(None, None);
// composer.getConfig() yields an Rc<RefCell<Config>>; Factory::createConfig() an owned
@@ -180,8 +178,8 @@ impl Command for ClearCacheCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs
index 755590f6..4544cb63 100644
--- a/crates/shirabe/src/command/create_project_command.rs
+++ b/crates/shirabe/src/command/create_project_command.rs
@@ -44,9 +44,7 @@ use shirabe_php_shim::{
UnexpectedValueException, array_pop, chdir, explode_with_limit, file_exists, getcwd, implode,
is_dir, is_file, mkdir, realpath, rtrim, strtolower, unlink,
};
-use std::cell::RefCell;
use std::path::PathBuf;
-use std::rc::Rc;
/// Install a package as new project into new directory.
#[derive(Debug)]
@@ -257,8 +255,8 @@ impl Command for CreateProjectCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/depends_command.rs b/crates/shirabe/src/command/depends_command.rs
index 00b5abcb..4c6f85b5 100644
--- a/crates/shirabe/src/command/depends_command.rs
+++ b/crates/shirabe/src/command/depends_command.rs
@@ -9,8 +9,6 @@ use crate::console::input::InputOption;
use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct DependsCommand {
@@ -101,16 +99,16 @@ impl Command for DependsCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
self.do_execute(input, output, false)
}
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/diagnose_command.rs b/crates/shirabe/src/command/diagnose_command.rs
index 0c50d695..e7fb9c74 100644
--- a/crates/shirabe/src/command/diagnose_command.rs
+++ b/crates/shirabe/src/command/diagnose_command.rs
@@ -47,8 +47,6 @@ use shirabe_php_shim::{
is_array, is_string, ob_get_clean, ob_start, phpinfo, rtrim, str_contains, str_replace,
str_starts_with, strpos, strstr, strtolower, trim, version_compare,
};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct DiagnoseCommand {
@@ -441,8 +439,8 @@ impl Command for DiagnoseCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/dump_autoload_command.rs b/crates/shirabe/src/command/dump_autoload_command.rs
index de917b5d..906185b0 100644
--- a/crates/shirabe/src/command/dump_autoload_command.rs
+++ b/crates/shirabe/src/command/dump_autoload_command.rs
@@ -11,8 +11,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{InvalidArgumentException, PhpMixed, file_exists};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct DumpAutoloadCommand {
@@ -64,8 +62,8 @@ impl Command for DumpAutoloadCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
let composer = crate::composer::composer_full(&composer);
@@ -313,8 +311,8 @@ impl Command for DumpAutoloadCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/exec_command.rs b/crates/shirabe/src/command/exec_command.rs
index 659b8f75..3eaee5a9 100644
--- a/crates/shirabe/src/command/exec_command.rs
+++ b/crates/shirabe/src/command/exec_command.rs
@@ -11,8 +11,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{PhpMixed, RuntimeException, basename, chdir, getcwd, glob};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct ExecCommand {
@@ -98,8 +96,8 @@ impl Command for ExecCommand {
fn interact(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) {
let _ = (|| -> anyhow::Result<()> {
let binaries = self.get_binaries(false)?;
@@ -140,8 +138,8 @@ impl Command for ExecCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
@@ -236,8 +234,8 @@ impl Command for ExecCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/fund_command.rs b/crates/shirabe/src/command/fund_command.rs
index 5c980314..65ae2c94 100644
--- a/crates/shirabe/src/command/fund_command.rs
+++ b/crates/shirabe/src/command/fund_command.rs
@@ -17,8 +17,6 @@ use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::PhpMixed;
use shirabe_semver::constraint::AnyConstraint;
use shirabe_semver::constraint::MatchAllConstraint;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct FundCommand {
@@ -97,8 +95,8 @@ impl Command for FundCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
let composer = crate::composer::composer_full(&composer);
@@ -217,8 +215,8 @@ impl Command for FundCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/global_command.rs b/crates/shirabe/src/command/global_command.rs
index b0a3542d..a1f5f72e 100644
--- a/crates/shirabe/src/command/global_command.rs
+++ b/crates/shirabe/src/command/global_command.rs
@@ -16,9 +16,7 @@ use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::input::StringInput;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{LogicException, RuntimeException, chdir};
-use std::cell::RefCell;
use std::path::Path;
-use std::rc::Rc;
#[derive(Debug)]
pub struct GlobalCommand {
@@ -67,7 +65,7 @@ impl GlobalCommand {
fn prepare_subcommand_input(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
quiet: bool,
) -> anyhow::Result<StringInput> {
if Platform::get_env("COMPOSER").is_some() {
@@ -152,8 +150,8 @@ impl Command for GlobalCommand {
fn run(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let tokens = Preg::split(r"{\s+}", &Self::input_to_string(&*input.borrow())?);
let mut args: Vec<String> = vec![];
@@ -171,7 +169,8 @@ impl Command for GlobalCommand {
}
let sub_input = self.prepare_subcommand_input(input, false)?;
- let sub_input: Rc<RefCell<dyn InputInterface>> = Rc::new(RefCell::new(sub_input));
+ let sub_input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>> =
+ std::rc::Rc::new(std::cell::RefCell::new(sub_input));
let application = {
let application = self
@@ -190,8 +189,8 @@ impl Command for GlobalCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/home_command.rs b/crates/shirabe/src/command/home_command.rs
index 8ff43f39..5a823d8b 100644
--- a/crates/shirabe/src/command/home_command.rs
+++ b/crates/shirabe/src/command/home_command.rs
@@ -16,8 +16,6 @@ use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::PhpMixed;
use shirabe_php_shim::filter_var_url;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct HomeCommand {
@@ -178,8 +176,8 @@ impl Command for HomeCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let repos = self.initialize_repos()?;
let io = self.get_io().clone();
@@ -256,8 +254,8 @@ impl Command for HomeCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs
index 4a2e9a3d..f0f07a56 100644
--- a/crates/shirabe/src/command/init_command.rs
+++ b/crates/shirabe/src/command/init_command.rs
@@ -31,8 +31,6 @@ use shirabe_php_shim::{
is_string, preg_quote, realpath, str_replace, strpos, strtolower, trim, ucwords,
};
use shirabe_spdx_licenses::SpdxLicenses;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct InitCommand {
@@ -116,8 +114,8 @@ impl Command for InitCommand {
/// @throws \Seld\JsonLint\ParsingException
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let io = self.get_io();
@@ -402,8 +400,8 @@ impl Command for InitCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input.clone(), output.clone())?;
@@ -430,8 +428,8 @@ impl Command for InitCommand {
fn interact(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) {
let _ = (|| -> anyhow::Result<()> {
let io = self.get_io();
diff --git a/crates/shirabe/src/command/install_command.rs b/crates/shirabe/src/command/install_command.rs
index 11929689..635c1461 100644
--- a/crates/shirabe/src/command/install_command.rs
+++ b/crates/shirabe/src/command/install_command.rs
@@ -15,8 +15,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::PhpMixed;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct InstallCommand {
@@ -84,8 +82,8 @@ impl Command for InstallCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let io = self.get_io().clone();
@@ -265,8 +263,8 @@ impl Command for InstallCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/licenses_command.rs b/crates/shirabe/src/command/licenses_command.rs
index 52f7d2fa..be467a13 100644
--- a/crates/shirabe/src/command/licenses_command.rs
+++ b/crates/shirabe/src/command/licenses_command.rs
@@ -20,8 +20,6 @@ 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};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct LicensesCommand {
@@ -91,8 +89,8 @@ impl Command for LicensesCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer_handle = self.require_composer(None, None)?;
@@ -330,8 +328,8 @@ impl Command for LicensesCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/outdated_command.rs b/crates/shirabe/src/command/outdated_command.rs
index 73f191d2..e0892692 100644
--- a/crates/shirabe/src/command/outdated_command.rs
+++ b/crates/shirabe/src/command/outdated_command.rs
@@ -11,8 +11,6 @@ use shirabe_external_packages::symfony::console::input::ArrayInput;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::PhpMixed;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct OutdatedCommand {
@@ -74,8 +72,8 @@ impl Command for OutdatedCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let mut args: IndexMap<String, PhpMixed> = IndexMap::new();
args.insert("command".to_string(), PhpMixed::String("show".to_string()));
@@ -206,7 +204,8 @@ impl Command for OutdatedCommand {
None,
)?;
- let input: Rc<RefCell<dyn InputInterface>> = Rc::new(RefCell::new(input));
+ let input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>> =
+ std::rc::Rc::new(std::cell::RefCell::new(input));
let application = {
let application = self
@@ -225,8 +224,8 @@ impl Command for OutdatedCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/prohibits_command.rs b/crates/shirabe/src/command/prohibits_command.rs
index 9f9b0eea..49c8a19b 100644
--- a/crates/shirabe/src/command/prohibits_command.rs
+++ b/crates/shirabe/src/command/prohibits_command.rs
@@ -8,8 +8,6 @@ use crate::console::input::InputOption;
use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct ProhibitsCommand {
@@ -108,16 +106,16 @@ impl Command for ProhibitsCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
self.do_execute(input, output, true)
}
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/reinstall_command.rs b/crates/shirabe/src/command/reinstall_command.rs
index b28f6168..c2c3ab18 100644
--- a/crates/shirabe/src/command/reinstall_command.rs
+++ b/crates/shirabe/src/command/reinstall_command.rs
@@ -20,8 +20,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::InvalidArgumentException;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct ReinstallCommand {
@@ -79,8 +77,8 @@ impl Command for ReinstallCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
let composer = crate::composer::composer_full(&composer);
@@ -243,9 +241,9 @@ impl Command for ReinstallCommand {
indexmap::IndexMap::new(),
);
- let uninstall_operations: Vec<Rc<dyn OperationInterface>> = uninstall_operations
+ let uninstall_operations: Vec<std::rc::Rc<dyn OperationInterface>> = uninstall_operations
.into_iter()
- .map(|op| Rc::new(op) as Rc<dyn OperationInterface>)
+ .map(|op| std::rc::Rc::new(op) as std::rc::Rc<dyn OperationInterface>)
.collect();
{
let mut local_repo_ref = local_repo.borrow_mut();
@@ -356,8 +354,8 @@ impl Command for ReinstallCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/remove_command.rs b/crates/shirabe/src/command/remove_command.rs
index aa8f7723..e7686efd 100644
--- a/crates/shirabe/src/command/remove_command.rs
+++ b/crates/shirabe/src/command/remove_command.rs
@@ -21,8 +21,6 @@ use shirabe_external_packages::symfony::console::exception::InvalidArgumentExcep
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{PhpMixed, UnexpectedValueException, strtolower};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct RemoveCommand {
@@ -175,8 +173,8 @@ impl Command for RemoveCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
if input
.borrow()
@@ -713,8 +711,8 @@ impl Command for RemoveCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/repository_command.rs b/crates/shirabe/src/command/repository_command.rs
index 89fb84b4..06ecfb4f 100644
--- a/crates/shirabe/src/command/repository_command.rs
+++ b/crates/shirabe/src/command/repository_command.rs
@@ -17,8 +17,6 @@ use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{
InvalidArgumentException, PHP_URL_HOST, PhpMixed, RuntimeException, parse_url, strtolower,
};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct RepositoryCommand {
@@ -494,8 +492,8 @@ impl Command for RepositoryCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
<Self as crate::command::base_config_command::BaseConfigCommand>::initialize(
self, input, output,
diff --git a/crates/shirabe/src/command/require_command.rs b/crates/shirabe/src/command/require_command.rs
index 952f8d89..219ad3d8 100644
--- a/crates/shirabe/src/command/require_command.rs
+++ b/crates/shirabe/src/command/require_command.rs
@@ -40,8 +40,6 @@ use shirabe_php_shim::{
array_merge, array_unique, empty, file_exists, file_get_contents, file_put_contents, filesize,
implode, is_writable, strtolower, unlink,
};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct RequireCommand {
@@ -633,15 +631,15 @@ impl Command for RequireCommand {
fn interact(
&self,
- _input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ _input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) {
}
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/run_script_command.rs b/crates/shirabe/src/command/run_script_command.rs
index 7fc9703f..c256eea2 100644
--- a/crates/shirabe/src/command/run_script_command.rs
+++ b/crates/shirabe/src/command/run_script_command.rs
@@ -18,8 +18,6 @@ use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::PhpMixed;
use shirabe_php_shim::{InvalidArgumentException, RuntimeException};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct RunScriptCommand {
@@ -59,7 +57,10 @@ impl RunScriptCommand {
command
}
- fn list_scripts(&self, output: Rc<RefCell<dyn OutputInterface>>) -> anyhow::Result<i64> {
+ fn list_scripts(
+ &self,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
+ ) -> anyhow::Result<i64> {
let scripts = self.get_scripts()?;
if scripts.is_empty() {
return Ok(0);
@@ -181,8 +182,8 @@ impl Command for RunScriptCommand {
fn interact(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) {
let _ = (|| -> anyhow::Result<()> {
let scripts = self.get_scripts()?;
@@ -223,8 +224,8 @@ impl Command for RunScriptCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
if input
.borrow()
@@ -323,8 +324,8 @@ impl Command for RunScriptCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/script_alias_command.rs b/crates/shirabe/src/command/script_alias_command.rs
index ff1fd3d2..17629162 100644
--- a/crates/shirabe/src/command/script_alias_command.rs
+++ b/crates/shirabe/src/command/script_alias_command.rs
@@ -11,8 +11,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{InvalidArgumentException, LogicException, PhpMixed, is_string};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct ScriptAliasCommand {
@@ -108,8 +106,8 @@ impl Command for ScriptAliasCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
let dispatcher = crate::composer::composer_full(&composer)
@@ -164,8 +162,8 @@ impl Command for ScriptAliasCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/search_command.rs b/crates/shirabe/src/command/search_command.rs
index 89abddd7..6709613c 100644
--- a/crates/shirabe/src/command/search_command.rs
+++ b/crates/shirabe/src/command/search_command.rs
@@ -18,8 +18,6 @@ use shirabe_external_packages::symfony::console::formatter::OutputFormatter;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{InvalidArgumentException, PhpMixed, implode, in_array, preg_quote};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct SearchCommand {
@@ -104,8 +102,8 @@ impl Command for SearchCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let platform_repo = PlatformRepository::new4(vec![], IndexMap::new(), None, None)?;
let io = self.get_io();
@@ -271,8 +269,8 @@ impl Command for SearchCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/self_update_command.rs b/crates/shirabe/src/command/self_update_command.rs
index 35a1374b..87efd4b9 100644
--- a/crates/shirabe/src/command/self_update_command.rs
+++ b/crates/shirabe/src/command/self_update_command.rs
@@ -11,8 +11,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::PhpMixed;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct SelfUpdateCommand {
@@ -72,8 +70,8 @@ impl Command for SelfUpdateCommand {
/// been published yet. The command is therefore disabled.
fn execute(
&self,
- _input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ _input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let io = self.get_io();
io.write_error3(
@@ -87,8 +85,8 @@ impl Command for SelfUpdateCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/show_command.rs b/crates/shirabe/src/command/show_command.rs
index 68b42e68..a63e08cf 100644
--- a/crates/shirabe/src/command/show_command.rs
+++ b/crates/shirabe/src/command/show_command.rs
@@ -47,8 +47,6 @@ use shirabe_php_shim::{
use shirabe_semver::Semver;
use shirabe_semver::constraint::AnyConstraint;
use shirabe_spdx_licenses::SpdxLicenses;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct ShowCommand {
@@ -209,8 +207,8 @@ impl Command for ShowCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
*self.version_parser.borrow_mut() = VersionParser::new();
if input.borrow().get_option("tree")?.as_bool() == Some(true) {
@@ -1443,8 +1441,8 @@ impl Command for ShowCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/status_command.rs b/crates/shirabe/src/command/status_command.rs
index 3b3445b6..b527d5aa 100644
--- a/crates/shirabe/src/command/status_command.rs
+++ b/crates/shirabe/src/command/status_command.rs
@@ -16,8 +16,6 @@ use indexmap::IndexMap;
use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct StatusCommand {
@@ -335,8 +333,8 @@ impl Command for StatusCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer_rc = self.require_composer(None, None)?;
{
@@ -381,8 +379,8 @@ impl Command for StatusCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/suggests_command.rs b/crates/shirabe/src/command/suggests_command.rs
index f7b04142..e42f20ba 100644
--- a/crates/shirabe/src/command/suggests_command.rs
+++ b/crates/shirabe/src/command/suggests_command.rs
@@ -15,8 +15,6 @@ use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
use shirabe_php_shim::{PhpMixed, empty, in_array};
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct SuggestsCommand {
@@ -109,8 +107,8 @@ impl Command for SuggestsCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- _output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ _output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let composer = self.require_composer(None, None)?;
let composer = crate::composer::composer_full(&composer);
@@ -215,8 +213,8 @@ impl Command for SuggestsCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/update_command.rs b/crates/shirabe/src/command/update_command.rs
index 366cf8bb..0163f6bc 100644
--- a/crates/shirabe/src/command/update_command.rs
+++ b/crates/shirabe/src/command/update_command.rs
@@ -35,8 +35,6 @@ use shirabe_php_shim::{
};
use shirabe_semver::Intervals;
use shirabe_semver::constraint::MultiConstraint;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct UpdateCommand {
@@ -124,8 +122,8 @@ impl Command for UpdateCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let io = self.get_io().clone();
if input.borrow().get_option("dev")?.as_bool().unwrap_or(false) {
@@ -572,8 +570,8 @@ impl Command for UpdateCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}
diff --git a/crates/shirabe/src/command/validate_command.rs b/crates/shirabe/src/command/validate_command.rs
index bceaa991..12e28188 100644
--- a/crates/shirabe/src/command/validate_command.rs
+++ b/crates/shirabe/src/command/validate_command.rs
@@ -16,8 +16,6 @@ use crate::util::Filesystem;
use shirabe_external_packages::symfony::console::command::command::Command;
use shirabe_external_packages::symfony::console::input::InputInterface;
use shirabe_external_packages::symfony::console::output::OutputInterface;
-use std::cell::RefCell;
-use std::rc::Rc;
#[derive(Debug)]
pub struct ValidateCommand {
@@ -132,8 +130,8 @@ impl Command for ValidateCommand {
fn execute(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<i64> {
let file = input
.borrow()
@@ -303,8 +301,8 @@ impl Command for ValidateCommand {
fn initialize(
&self,
- input: Rc<RefCell<dyn InputInterface>>,
- output: Rc<RefCell<dyn OutputInterface>>,
+ input: std::rc::Rc<std::cell::RefCell<dyn InputInterface>>,
+ output: std::rc::Rc<std::cell::RefCell<dyn OutputInterface>>,
) -> anyhow::Result<()> {
base_command_initialize(self, input, output)
}