aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/autoload
diff options
context:
space:
mode:
Diffstat (limited to 'crates/shirabe/src/autoload')
-rw-r--r--crates/shirabe/src/autoload/autoload_generator.rs28
-rw-r--r--crates/shirabe/src/autoload/class_loader.rs3
-rw-r--r--crates/shirabe/src/autoload/mod.rs5
3 files changed, 14 insertions, 22 deletions
diff --git a/crates/shirabe/src/autoload/autoload_generator.rs b/crates/shirabe/src/autoload/autoload_generator.rs
index 133348c..e7acb0a 100644
--- a/crates/shirabe/src/autoload/autoload_generator.rs
+++ b/crates/shirabe/src/autoload/autoload_generator.rs
@@ -1,20 +1,5 @@
//! ref: composer/src/Composer/Autoload/AutoloadGenerator.php
-use indexmap::IndexMap;
-
-use shirabe_class_map_generator::class_map::ClassMap;
-use shirabe_class_map_generator::class_map_generator::ClassMapGenerator;
-use shirabe_external_packages::composer::pcre::{CaptureKey, Preg};
-use shirabe_external_packages::symfony::console::formatter::OutputFormatter;
-use shirabe_php_shim::{
- InvalidArgumentException, PhpMixed, array_keys, array_map, array_merge_map,
- array_merge_recursive, array_shift, array_slice_strs, array_unique, bin2hex, explode,
- file_exists, file_get_contents, hash, implode, is_array, ksort, ltrim, preg_quote,
- random_bytes, realpath, str_contains, str_replace, str_starts_with, strlen, strpos, strtr,
- substr, substr_count, trim, unlink, var_export,
-};
-use shirabe_semver::constraint::Bound;
-
use crate::autoload::ClassLoader;
use crate::config::Config;
use crate::event_dispatcher::EventDispatcher;
@@ -34,6 +19,19 @@ use crate::script::ScriptEvents;
use crate::util::Filesystem;
use crate::util::PackageSorter;
use crate::util::Platform;
+use indexmap::IndexMap;
+use shirabe_class_map_generator::class_map::ClassMap;
+use shirabe_class_map_generator::class_map_generator::ClassMapGenerator;
+use shirabe_external_packages::composer::pcre::{CaptureKey, Preg};
+use shirabe_external_packages::symfony::console::formatter::OutputFormatter;
+use shirabe_php_shim::{
+ InvalidArgumentException, PhpMixed, array_keys, array_map, array_merge_map,
+ array_merge_recursive, array_shift, array_slice_strs, array_unique, bin2hex, explode,
+ file_exists, file_get_contents, hash, implode, is_array, ksort, ltrim, preg_quote,
+ random_bytes, realpath, str_contains, str_replace, str_starts_with, strlen, strpos, strtr,
+ substr, substr_count, trim, unlink, var_export,
+};
+use shirabe_semver::constraint::Bound;
#[derive(Debug)]
pub struct AutoloadGenerator {
diff --git a/crates/shirabe/src/autoload/class_loader.rs b/crates/shirabe/src/autoload/class_loader.rs
index 3889ca0..3ebb7a7 100644
--- a/crates/shirabe/src/autoload/class_loader.rs
+++ b/crates/shirabe/src/autoload/class_loader.rs
@@ -1,13 +1,12 @@
//! ref: composer/src/Composer/Autoload/ClassLoader.php
use indexmap::IndexMap;
-use std::sync::{LazyLock, Mutex};
-
use shirabe_php_shim::{
DIRECTORY_SEPARATOR, InvalidArgumentException, PhpMixed, defined, file_exists, include_file,
spl_autoload_register, spl_autoload_unregister, stream_resolve_include_path, strlen, strpos,
strrpos, strtr, substr,
};
+use std::sync::{LazyLock, Mutex};
/// @var array<string, self>
static REGISTERED_LOADERS: LazyLock<Mutex<IndexMap<String, ClassLoader>>> =
diff --git a/crates/shirabe/src/autoload/mod.rs b/crates/shirabe/src/autoload/mod.rs
deleted file mode 100644
index d5758b2..0000000
--- a/crates/shirabe/src/autoload/mod.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-pub mod autoload_generator;
-pub mod class_loader;
-
-pub use autoload_generator::*;
-pub use class_loader::*;