diff options
Diffstat (limited to 'crates/shirabe/src/autoload')
| -rw-r--r-- | crates/shirabe/src/autoload/autoload_generator.rs | 30 | ||||
| -rw-r--r-- | crates/shirabe/src/autoload/class_map_generator.rs | 21 | ||||
| -rw-r--r-- | crates/shirabe/src/autoload/mod.rs | 2 |
3 files changed, 6 insertions, 47 deletions
diff --git a/crates/shirabe/src/autoload/autoload_generator.rs b/crates/shirabe/src/autoload/autoload_generator.rs index 6505510..54f67a5 100644 --- a/crates/shirabe/src/autoload/autoload_generator.rs +++ b/crates/shirabe/src/autoload/autoload_generator.rs @@ -7,12 +7,12 @@ use shirabe_class_map_generator::class_map_generator::ClassMapGenerator; use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_external_packages::symfony::component::console::formatter::OutputFormatter; use shirabe_php_shim::{ - E_USER_DEPRECATED, InvalidArgumentException, PhpMixed, RuntimeException, array_filter, - array_keys, array_map, array_merge, array_merge_map, array_merge_recursive, array_reverse, - array_shift, array_slice, array_slice_strs, array_unique, bin2hex, explode, file_exists, - file_get_contents, hash, implode, in_array, is_array, krsort, ksort, ltrim, preg_quote, - random_bytes, realpath, sprintf, str_contains, str_replace, str_starts_with, strlen, strpos, - strtr, substr, substr_count, trigger_error, trim, unlink, var_export, + InvalidArgumentException, PhpMixed, RuntimeException, array_filter, array_keys, array_map, + array_merge, array_merge_map, array_merge_recursive, array_reverse, array_shift, array_slice, + array_slice_strs, array_unique, bin2hex, explode, file_exists, file_get_contents, hash, + implode, in_array, is_array, krsort, ksort, ltrim, preg_quote, random_bytes, realpath, sprintf, + str_contains, str_replace, str_starts_with, strlen, strpos, strtr, substr, substr_count, trim, + unlink, var_export, }; use shirabe_semver::constraint::AnyConstraint; use shirabe_semver::constraint::Bound; @@ -97,24 +97,6 @@ impl AutoloadGenerator { self.dry_run = dry_run; } - /// Whether platform requirements should be ignored. - /// - /// If this is set to true, the platform check file will not be generated - /// If this is set to false, the platform check file will be generated with all requirements - /// If this is set to string[], those packages will be ignored from the platform check file - /// - /// Deprecated: use setPlatformRequirementFilter instead - pub fn set_ignore_platform_requirements(&mut self, ignore_platform_reqs: PhpMixed) { - trigger_error( - "AutoloadGenerator::setIgnorePlatformRequirements is deprecated since Composer 2.2, use setPlatformRequirementFilter instead.", - E_USER_DEPRECATED, - ); - - self.set_platform_requirement_filter( - PlatformRequirementFilterFactory::from_bool_or_list(ignore_platform_reqs).unwrap(), - ); - } - pub fn set_platform_requirement_filter( &mut self, platform_requirement_filter: std::rc::Rc<dyn PlatformRequirementFilterInterface>, diff --git a/crates/shirabe/src/autoload/class_map_generator.rs b/crates/shirabe/src/autoload/class_map_generator.rs deleted file mode 100644 index 06dc34d..0000000 --- a/crates/shirabe/src/autoload/class_map_generator.rs +++ /dev/null @@ -1,21 +0,0 @@ -//! ref: composer/src/Composer/Autoload/ClassMapGenerator.php - -/// `Composer\Autoload\ClassMapGenerator`. -/// -/// Deprecated since Composer 2.4.0 in favor of the composer/class-map-generator -/// package (`shirabe-class-map-generator`), which Composer itself now uses -/// directly. Composer's own code no longer references this class, so its -/// `dump` / `createMap` methods are intentionally left unported. -/// -/// Even though it is deprecated, plugins may still use it, so this type will -/// eventually have to be implemented alongside plugin API support. It is left -/// here intentionally so that implementation is not forgotten. -/// -/// TODO(plugin): implement `dump` / `createMap` for plugins still relying on -/// this deprecated class. -#[derive(Debug)] -#[deprecated( - since = "Composer 2.4.0", - note = "use the composer/class-map-generator package (shirabe-class-map-generator) instead" -)] -pub struct ClassMapGenerator; diff --git a/crates/shirabe/src/autoload/mod.rs b/crates/shirabe/src/autoload/mod.rs index cb0be1c..d5758b2 100644 --- a/crates/shirabe/src/autoload/mod.rs +++ b/crates/shirabe/src/autoload/mod.rs @@ -1,7 +1,5 @@ pub mod autoload_generator; pub mod class_loader; -pub mod class_map_generator; pub use autoload_generator::*; pub use class_loader::*; -pub use class_map_generator::*; |
