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/base_command.rs4
-rw-r--r--crates/shirabe/src/command/create_project_command.rs4
-rw-r--r--crates/shirabe/src/command/init_command.rs5
-rw-r--r--crates/shirabe/src/command/package_discovery_trait.rs4
-rw-r--r--crates/shirabe/src/command/require_command.rs5
5 files changed, 13 insertions, 9 deletions
diff --git a/crates/shirabe/src/command/base_command.rs b/crates/shirabe/src/command/base_command.rs
index f806854..501915b 100644
--- a/crates/shirabe/src/command/base_command.rs
+++ b/crates/shirabe/src/command/base_command.rs
@@ -221,7 +221,7 @@ pub trait BaseCommand {
fn get_platform_requirement_filter(
&self,
input: &dyn InputInterface,
- ) -> Result<Box<dyn PlatformRequirementFilterInterface>>;
+ ) -> Result<std::rc::Rc<dyn PlatformRequirementFilterInterface>>;
/// @param array<string> $requirements
///
@@ -585,7 +585,7 @@ impl<C: HasBaseCommandData> BaseCommand for C {
fn get_platform_requirement_filter(
&self,
input: &dyn InputInterface,
- ) -> Result<Box<dyn PlatformRequirementFilterInterface>> {
+ ) -> Result<std::rc::Rc<dyn PlatformRequirementFilterInterface>> {
if !input.has_option("ignore-platform-reqs") || !input.has_option("ignore-platform-req") {
return Err(LogicException {
message:
diff --git a/crates/shirabe/src/command/create_project_command.rs b/crates/shirabe/src/command/create_project_command.rs
index 1667ac1..076d7cd 100644
--- a/crates/shirabe/src/command/create_project_command.rs
+++ b/crates/shirabe/src/command/create_project_command.rs
@@ -222,7 +222,7 @@ impl CreateProjectCommand {
disable_scripts: bool,
no_progress: bool,
no_install: bool,
- platform_requirement_filter: Option<Box<dyn PlatformRequirementFilterInterface>>,
+ platform_requirement_filter: Option<std::rc::Rc<dyn PlatformRequirementFilterInterface>>,
secure_http: bool,
add_repository: bool,
) -> Result<i64> {
@@ -389,7 +389,7 @@ impl CreateProjectCommand {
.set_prefer_source(prefer_source)
.set_prefer_dist(prefer_dist)
.set_dev_mode(install_dev_packages)
- .set_platform_requirement_filter(platform_requirement_filter.clone_box())
+ .set_platform_requirement_filter(platform_requirement_filter.clone())
.set_suggested_packages_reporter(SuggestedPackagesReporter::new(io.clone()))
.set_optimize_autoloader(
config
diff --git a/crates/shirabe/src/command/init_command.rs b/crates/shirabe/src/command/init_command.rs
index 053df36..e401534 100644
--- a/crates/shirabe/src/command/init_command.rs
+++ b/crates/shirabe/src/command/init_command.rs
@@ -73,8 +73,9 @@ impl PackageDiscoveryTrait for InitCommand {
fn get_platform_requirement_filter(
&self,
input: &dyn InputInterface,
- ) -> Box<dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface>
- {
+ ) -> std::rc::Rc<
+ dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface,
+ > {
todo!()
}
diff --git a/crates/shirabe/src/command/package_discovery_trait.rs b/crates/shirabe/src/command/package_discovery_trait.rs
index 197636c..eba6b8b 100644
--- a/crates/shirabe/src/command/package_discovery_trait.rs
+++ b/crates/shirabe/src/command/package_discovery_trait.rs
@@ -50,7 +50,9 @@ pub trait PackageDiscoveryTrait {
fn get_platform_requirement_filter(
&self,
input: &dyn InputInterface,
- ) -> Box<dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface>;
+ ) -> std::rc::Rc<
+ dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface,
+ >;
fn normalize_requirements(&self, requires: Vec<String>) -> Vec<IndexMap<String, String>>;
diff --git a/crates/shirabe/src/command/require_command.rs b/crates/shirabe/src/command/require_command.rs
index fa9a3dc..cfa7bba 100644
--- a/crates/shirabe/src/command/require_command.rs
+++ b/crates/shirabe/src/command/require_command.rs
@@ -88,8 +88,9 @@ impl PackageDiscoveryTrait for RequireCommand {
fn get_platform_requirement_filter(
&self,
input: &dyn InputInterface,
- ) -> Box<dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface>
- {
+ ) -> std::rc::Rc<
+ dyn crate::filter::platform_requirement_filter::PlatformRequirementFilterInterface,
+ > {
todo!()
}