aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/factory.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-10 02:41:34 +0900
committernsfisis <nsfisis@gmail.com>2026-06-10 02:46:18 +0900
commit2d474e91e49c7343d28198eff2b5bbbed9afbcee (patch)
tree8c1ab321dfa5ddc1ca9d2871eb06a6fde6b2970b /crates/shirabe/src/factory.rs
parente583112899cbea7494ffdd73d7de380dd5f808c4 (diff)
downloadphp-shirabe-2d474e91e49c7343d28198eff2b5bbbed9afbcee.tar.gz
php-shirabe-2d474e91e49c7343d28198eff2b5bbbed9afbcee.tar.zst
php-shirabe-2d474e91e49c7343d28198eff2b5bbbed9afbcee.zip
feat(phase-c): resolve cross-module phase-b TODOs
Diffstat (limited to 'crates/shirabe/src/factory.rs')
-rw-r--r--crates/shirabe/src/factory.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/crates/shirabe/src/factory.rs b/crates/shirabe/src/factory.rs
index 101e4cd..f1c66ce 100644
--- a/crates/shirabe/src/factory.rs
+++ b/crates/shirabe/src/factory.rs
@@ -6,11 +6,11 @@ use shirabe_external_packages::symfony::console::formatter::OutputFormatter;
use shirabe_external_packages::symfony::console::formatter::OutputFormatterStyle;
use shirabe_external_packages::symfony::console::output::ConsoleOutput;
use shirabe_php_shim::{
- InvalidArgumentException, PATHINFO_EXTENSION, PHP_EOL, Phar, PhpMixed, RuntimeException,
- UnexpectedValueException, ZipArchive, array_keys, array_replace_recursive, class_exists,
- dirname, extension_loaded, file_exists, file_get_contents, file_put_contents, implode,
- in_array, is_array, is_dir, is_file, is_string, json_decode, pathinfo, realpath, str_replace,
- strpos, strtr, substr, trim,
+ InvalidArgumentException, PATHINFO_EXTENSION, PHP_EOL, PHP_OS, Phar, PhpMixed,
+ RuntimeException, UnexpectedValueException, ZipArchive, array_keys, array_replace_recursive,
+ class_exists, dirname, extension_loaded, file_exists, file_get_contents, file_put_contents,
+ implode, in_array, is_array, is_dir, is_file, is_string, json_decode, mkdir, pathinfo,
+ realpath, str_replace, strpos, strtr, substr, trim,
};
use crate::autoload::AutoloadGenerator;
@@ -175,7 +175,7 @@ impl Factory {
}
let user_dir = Self::get_user_dir()?;
- if Platform::php_os() == "Darwin" {
+ if PHP_OS == "Darwin" {
// Migrate existing cache dir in old location if present
if is_dir(&format!("{}/cache", home))
&& !is_dir(&format!("{}/Library/Caches/composer", user_dir))
@@ -309,7 +309,7 @@ impl Factory {
if !is_dir(dir) {
let dir_owned = dir.clone();
let _ = Silencer::call(|| {
- Ok::<bool, anyhow::Error>(Platform::mkdir(&dir_owned, 0o777, true))
+ Ok::<bool, anyhow::Error>(mkdir(&dir_owned, 0o777, true))
});
}
let path = format!("{}/.htaccess", dir);