aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/plugin/plugin_manager.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-08-16 00:59:54 +0900
committernsfisis <nsfisis@gmail.com>2026-08-16 01:03:45 +0900
commit3a388b98a9aa6a14b1c7f7dc909c109cf9837800 (patch)
tree593e342313c6e6bd3ec2943a1690b8798e0a83ae /crates/shirabe/src/plugin/plugin_manager.rs
parentaad468e8b75ffc3e87ea6dfa22c53a8299fc08da (diff)
downloadphp-shirabe-3a388b98a9aa6a14b1c7f7dc909c109cf9837800.tar.gz
php-shirabe-3a388b98a9aa6a14b1c7f7dc909c109cf9837800.tar.zst
php-shirabe-3a388b98a9aa6a14b1c7f7dc909c109cf9837800.zip
refactor: narrow pub(crate) items to private
Porting mapped every PHP `protected` member onto `pub(crate)`, which is wider than nearly all of them need. Each item demoted here is reached only from the module that defines it, so the crate-wide visibility conveyed nothing. Every `pub(crate)` that survives has at least one reader in another module of the same crate. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/plugin/plugin_manager.rs')
-rw-r--r--crates/shirabe/src/plugin/plugin_manager.rs18
1 files changed, 9 insertions, 9 deletions
diff --git a/crates/shirabe/src/plugin/plugin_manager.rs b/crates/shirabe/src/plugin/plugin_manager.rs
index 9f569af7..b02a702d 100644
--- a/crates/shirabe/src/plugin/plugin_manager.rs
+++ b/crates/shirabe/src/plugin/plugin_manager.rs
@@ -36,15 +36,15 @@ use shirabe_semver::constraint::SimpleConstraint;
#[derive(Debug)]
pub struct PluginManager {
- pub(crate) composer: ComposerWeakHandle,
- pub(crate) io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
- pub(crate) global_composer: Option<PartialComposerHandle>,
- pub(crate) version_parser: VersionParser,
- pub(crate) disable_plugins: DisablePlugins,
+ composer: ComposerWeakHandle,
+ io: std::rc::Rc<std::cell::RefCell<dyn IOInterface>>,
+ global_composer: Option<PartialComposerHandle>,
+ version_parser: VersionParser,
+ disable_plugins: DisablePlugins,
// PHP stores the same plugin instance in both $plugins and $registeredPlugins (reference
// semantics); shared handles preserve the identity comparisons that relies on.
- pub(crate) plugins: Vec<std::rc::Rc<std::cell::RefCell<dyn PluginInterface>>>,
- pub(crate) registered_plugins: IndexMap<String, Vec<PluginOrInstaller>>,
+ plugins: Vec<std::rc::Rc<std::cell::RefCell<dyn PluginInterface>>>,
+ registered_plugins: IndexMap<String, Vec<PluginOrInstaller>>,
allow_plugin_rules: Option<IndexMap<String, bool>>,
allow_global_plugin_rules: Option<IndexMap<String, bool>>,
running_in_global_dir: bool,
@@ -696,7 +696,7 @@ impl PluginManager {
}
/// Returns the version of the internal composer-plugin-api package.
- pub(crate) fn get_plugin_api_version(&self) -> String {
+ fn get_plugin_api_version(&self) -> String {
match &self.plugin_api_version_override {
Some(version) => version.clone(),
None => plugin_interface::PLUGIN_API_VERSION.to_string(),
@@ -996,7 +996,7 @@ impl PluginManager {
.get_install_path(package)
}
- pub(crate) fn get_capability_implementation_class_name(
+ fn get_capability_implementation_class_name(
&self,
plugin: &dyn PluginInterface,
capability: &str,