aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-05-17 18:13:52 +0900
committernsfisis <nsfisis@gmail.com>2026-05-17 18:15:02 +0900
commitdb5b360d5f1ddfdc6ba7cce6704b41310b715f70 (patch)
treef4eac54a88ce2ffb6cf7c1812fb5f54884a8b638 /crates
parent189b0ffcf2f28e4e51cb28c79d834e94cf57d216 (diff)
downloadphp-shirabe-db5b360d5f1ddfdc6ba7cce6704b41310b715f70.tar.gz
php-shirabe-db5b360d5f1ddfdc6ba7cce6704b41310b715f70.tar.zst
php-shirabe-db5b360d5f1ddfdc6ba7cce6704b41310b715f70.zip
fix(compile): add missing PackageInterface and RepositoryInterface impls
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'crates')
-rw-r--r--crates/shirabe/src/installer.rs12
-rw-r--r--crates/shirabe/src/package/package.rs170
-rw-r--r--crates/shirabe/src/package/root_alias_package.rs171
-rw-r--r--crates/shirabe/src/package/root_package.rs177
-rw-r--r--crates/shirabe/src/repository/installed_array_repository.rs63
-rw-r--r--crates/shirabe/src/repository/installed_filesystem_repository.rs63
6 files changed, 648 insertions, 8 deletions
diff --git a/crates/shirabe/src/installer.rs b/crates/shirabe/src/installer.rs
index 0aeb52b..b32e47b 100644
--- a/crates/shirabe/src/installer.rs
+++ b/crates/shirabe/src/installer.rs
@@ -502,10 +502,10 @@ impl Installer {
let platform_repo = self.create_platform_repo(true);
let aliases = self.get_root_aliases(true);
- let mut locked_repository: Option<Box<dyn LockArrayRepository>> = None;
+ let mut locked_repository: Option<Box<LockArrayRepository>> = None;
let try_load_locked =
- || -> anyhow::Result<Result<Option<Box<dyn LockArrayRepository>>, ParsingException>> {
+ || -> anyhow::Result<Result<Option<Box<LockArrayRepository>>, ParsingException>> {
if self.locker.is_locked() {
match self.locker.get_locked_repository(true) {
Ok(r) => Ok(Ok(Some(r))),
@@ -842,7 +842,7 @@ impl Installer {
platform_repo: &PlatformRepository,
aliases: &Vec<IndexMap<String, String>>,
policy: &dyn PolicyInterface,
- locked_repository: Option<&dyn LockArrayRepository>,
+ locked_repository: Option<&LockArrayRepository>,
) -> anyhow::Result<i64> {
if self.package.get_dev_requires().is_empty() {
return Ok(0);
@@ -1296,7 +1296,7 @@ impl Installer {
fn create_policy(
&self,
for_update: bool,
- locked_repo: Option<&dyn LockArrayRepository>,
+ locked_repo: Option<&LockArrayRepository>,
) -> DefaultPolicy {
let mut prefer_stable: Option<bool> = None;
let mut prefer_lowest: Option<bool> = None;
@@ -1343,7 +1343,7 @@ impl Installer {
&self,
root_package: &dyn RootPackageInterface,
platform_repo: &PlatformRepository,
- locked_repository: Option<&dyn LockArrayRepository>,
+ locked_repository: Option<&LockArrayRepository>,
) -> Request {
let mut request = Request::new(locked_repository);
@@ -1389,7 +1389,7 @@ impl Installer {
fn require_packages_for_update(
&self,
request: &mut Request,
- locked_repository: Option<&dyn LockArrayRepository>,
+ locked_repository: Option<&LockArrayRepository>,
include_dev_requires: bool,
) {
// if we're updating mirrors we want to keep exactly the same versions installed which are in the lock file, but we want current remote metadata
diff --git a/crates/shirabe/src/package/package.rs b/crates/shirabe/src/package/package.rs
index ae94a20..b8b6770 100644
--- a/crates/shirabe/src/package/package.rs
+++ b/crates/shirabe/src/package/package.rs
@@ -1,5 +1,6 @@
//! ref: composer/src/Composer/Package/Package.php
+use chrono::{DateTime, Utc};
use indexmap::IndexMap;
use shirabe_external_packages::composer::pcre::preg::Preg;
@@ -8,6 +9,7 @@ use shirabe_php_shim::{E_USER_DEPRECATED, PhpMixed, strpos, trigger_error};
use crate::package::base_package::BasePackage;
use crate::package::link::Link;
+use crate::package::package_interface::PackageInterface;
use crate::package::version::version_parser::VersionParser;
use crate::repository::repository_interface::RepositoryInterface;
@@ -574,3 +576,171 @@ impl BasePackage for Package {
todo!()
}
}
+
+impl std::fmt::Display for Package {
+ fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ todo!()
+ }
+}
+
+impl PackageInterface for Package {
+ fn get_name(&self) -> &str {
+ todo!()
+ }
+ fn get_pretty_name(&self) -> &str {
+ todo!()
+ }
+ fn get_names(&self, _provides: bool) -> Vec<String> {
+ todo!()
+ }
+ fn set_id(&mut self, _id: i64) {
+ todo!()
+ }
+ fn get_id(&self) -> i64 {
+ todo!()
+ }
+ fn is_dev(&self) -> bool {
+ todo!()
+ }
+ fn get_type(&self) -> &str {
+ todo!()
+ }
+ fn get_target_dir(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_extra(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn set_installation_source(&mut self, _type: Option<String>) {
+ todo!()
+ }
+ fn get_installation_source(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_type(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_urls(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_source_reference(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_mirrors(&self) -> Option<Vec<IndexMap<String, PhpMixed>>> {
+ todo!()
+ }
+ fn set_source_mirrors(&mut self, _mirrors: Option<Vec<IndexMap<String, PhpMixed>>>) {
+ todo!()
+ }
+ fn get_dist_type(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_urls(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_dist_reference(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_sha1_checksum(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_mirrors(&self) -> Option<Vec<IndexMap<String, PhpMixed>>> {
+ todo!()
+ }
+ fn set_dist_mirrors(&mut self, _mirrors: Option<Vec<IndexMap<String, PhpMixed>>>) {
+ todo!()
+ }
+ fn get_version(&self) -> &str {
+ todo!()
+ }
+ fn get_pretty_version(&self) -> &str {
+ todo!()
+ }
+ fn get_full_pretty_version(&self, _truncate: bool, _display_mode: i64) -> String {
+ todo!()
+ }
+ fn get_release_date(&self) -> Option<DateTime<Utc>> {
+ todo!()
+ }
+ fn get_stability(&self) -> &str {
+ todo!()
+ }
+ fn get_requires(&self) -> IndexMap<String, Link> {
+ todo!()
+ }
+ fn get_conflicts(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_provides(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_replaces(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_dev_requires(&self) -> IndexMap<String, Link> {
+ todo!()
+ }
+ fn get_suggests(&self) -> IndexMap<String, String> {
+ todo!()
+ }
+ fn get_autoload(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn get_dev_autoload(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn get_include_paths(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_php_ext(&self) -> Option<IndexMap<String, PhpMixed>> {
+ todo!()
+ }
+ fn set_repository(&mut self, _repository: Box<dyn RepositoryInterface>) -> anyhow::Result<()> {
+ todo!()
+ }
+ fn get_repository(&self) -> Option<&dyn RepositoryInterface> {
+ todo!()
+ }
+ fn get_binaries(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_unique_name(&self) -> String {
+ todo!()
+ }
+ fn get_notification_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_pretty_string(&self) -> String {
+ todo!()
+ }
+ fn is_default_branch(&self) -> bool {
+ todo!()
+ }
+ fn get_transport_options(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn set_transport_options(&mut self, _options: IndexMap<String, PhpMixed>) {
+ todo!()
+ }
+ fn set_source_reference(&mut self, _reference: Option<String>) {
+ todo!()
+ }
+ fn set_dist_url(&mut self, _url: Option<String>) {
+ todo!()
+ }
+ fn set_dist_type(&mut self, _type: Option<String>) {
+ todo!()
+ }
+ fn set_dist_reference(&mut self, _reference: Option<String>) {
+ todo!()
+ }
+ fn set_source_dist_references(&mut self, _reference: &str) {
+ todo!()
+ }
+}
diff --git a/crates/shirabe/src/package/root_alias_package.rs b/crates/shirabe/src/package/root_alias_package.rs
index cd5f745..703c1f9 100644
--- a/crates/shirabe/src/package/root_alias_package.rs
+++ b/crates/shirabe/src/package/root_alias_package.rs
@@ -1,13 +1,16 @@
//! ref: composer/src/Composer/Package/RootAliasPackage.php
+use chrono::{DateTime, Utc};
use indexmap::IndexMap;
use shirabe_php_shim::PhpMixed;
use crate::package::complete_alias_package::CompleteAliasPackage;
use crate::package::complete_package_interface::CompletePackageInterface;
use crate::package::link::Link;
+use crate::package::package_interface::PackageInterface;
use crate::package::root_package::RootPackage;
use crate::package::root_package_interface::RootPackageInterface;
+use crate::repository::repository_interface::RepositoryInterface;
#[derive(Debug)]
pub struct RootAliasPackage {
@@ -220,3 +223,171 @@ impl CompletePackageInterface for RootAliasPackage {
todo!()
}
}
+
+impl std::fmt::Display for RootAliasPackage {
+ fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ todo!()
+ }
+}
+
+impl PackageInterface for RootAliasPackage {
+ fn get_name(&self) -> &str {
+ todo!()
+ }
+ fn get_pretty_name(&self) -> &str {
+ todo!()
+ }
+ fn get_names(&self, _provides: bool) -> Vec<String> {
+ todo!()
+ }
+ fn set_id(&mut self, _id: i64) {
+ todo!()
+ }
+ fn get_id(&self) -> i64 {
+ todo!()
+ }
+ fn is_dev(&self) -> bool {
+ todo!()
+ }
+ fn get_type(&self) -> &str {
+ todo!()
+ }
+ fn get_target_dir(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_extra(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn set_installation_source(&mut self, _type: Option<String>) {
+ todo!()
+ }
+ fn get_installation_source(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_type(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_urls(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_source_reference(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_mirrors(&self) -> Option<Vec<IndexMap<String, PhpMixed>>> {
+ todo!()
+ }
+ fn set_source_mirrors(&mut self, _mirrors: Option<Vec<IndexMap<String, PhpMixed>>>) {
+ todo!()
+ }
+ fn get_dist_type(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_urls(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_dist_reference(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_sha1_checksum(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_mirrors(&self) -> Option<Vec<IndexMap<String, PhpMixed>>> {
+ todo!()
+ }
+ fn set_dist_mirrors(&mut self, _mirrors: Option<Vec<IndexMap<String, PhpMixed>>>) {
+ todo!()
+ }
+ fn get_version(&self) -> &str {
+ todo!()
+ }
+ fn get_pretty_version(&self) -> &str {
+ todo!()
+ }
+ fn get_full_pretty_version(&self, _truncate: bool, _display_mode: i64) -> String {
+ todo!()
+ }
+ fn get_release_date(&self) -> Option<DateTime<Utc>> {
+ todo!()
+ }
+ fn get_stability(&self) -> &str {
+ todo!()
+ }
+ fn get_requires(&self) -> IndexMap<String, Link> {
+ todo!()
+ }
+ fn get_conflicts(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_provides(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_replaces(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_dev_requires(&self) -> IndexMap<String, Link> {
+ todo!()
+ }
+ fn get_suggests(&self) -> IndexMap<String, String> {
+ todo!()
+ }
+ fn get_autoload(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn get_dev_autoload(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn get_include_paths(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_php_ext(&self) -> Option<IndexMap<String, PhpMixed>> {
+ todo!()
+ }
+ fn set_repository(&mut self, _repository: Box<dyn RepositoryInterface>) -> anyhow::Result<()> {
+ todo!()
+ }
+ fn get_repository(&self) -> Option<&dyn RepositoryInterface> {
+ todo!()
+ }
+ fn get_binaries(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_unique_name(&self) -> String {
+ todo!()
+ }
+ fn get_notification_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_pretty_string(&self) -> String {
+ todo!()
+ }
+ fn is_default_branch(&self) -> bool {
+ todo!()
+ }
+ fn get_transport_options(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn set_transport_options(&mut self, _options: IndexMap<String, PhpMixed>) {
+ todo!()
+ }
+ fn set_source_reference(&mut self, _reference: Option<String>) {
+ todo!()
+ }
+ fn set_dist_url(&mut self, _url: Option<String>) {
+ todo!()
+ }
+ fn set_dist_type(&mut self, _type: Option<String>) {
+ todo!()
+ }
+ fn set_dist_reference(&mut self, _reference: Option<String>) {
+ todo!()
+ }
+ fn set_source_dist_references(&mut self, _reference: &str) {
+ todo!()
+ }
+}
diff --git a/crates/shirabe/src/package/root_package.rs b/crates/shirabe/src/package/root_package.rs
index d0c96aa..2557c8a 100644
--- a/crates/shirabe/src/package/root_package.rs
+++ b/crates/shirabe/src/package/root_package.rs
@@ -1,10 +1,15 @@
//! ref: composer/src/Composer/Package/RootPackage.php
+use chrono::{DateTime, Utc};
+use indexmap::IndexMap;
+use shirabe_php_shim::PhpMixed;
+
use crate::package::complete_package::CompletePackage;
use crate::package::complete_package_interface::CompletePackageInterface;
+use crate::package::link::Link;
+use crate::package::package_interface::PackageInterface;
use crate::package::root_package_interface::RootPackageInterface;
-use indexmap::IndexMap;
-use shirabe_php_shim::PhpMixed;
+use crate::repository::repository_interface::RepositoryInterface;
#[derive(Debug)]
pub struct RootPackage {
@@ -208,3 +213,171 @@ impl CompletePackageInterface for RootPackage {
todo!()
}
}
+
+impl std::fmt::Display for RootPackage {
+ fn fmt(&self, _f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
+ todo!()
+ }
+}
+
+impl PackageInterface for RootPackage {
+ fn get_name(&self) -> &str {
+ todo!()
+ }
+ fn get_pretty_name(&self) -> &str {
+ todo!()
+ }
+ fn get_names(&self, _provides: bool) -> Vec<String> {
+ todo!()
+ }
+ fn set_id(&mut self, _id: i64) {
+ todo!()
+ }
+ fn get_id(&self) -> i64 {
+ todo!()
+ }
+ fn is_dev(&self) -> bool {
+ todo!()
+ }
+ fn get_type(&self) -> &str {
+ todo!()
+ }
+ fn get_target_dir(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_extra(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn set_installation_source(&mut self, _type: Option<String>) {
+ todo!()
+ }
+ fn get_installation_source(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_type(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_urls(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_source_reference(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_source_mirrors(&self) -> Option<Vec<IndexMap<String, PhpMixed>>> {
+ todo!()
+ }
+ fn set_source_mirrors(&mut self, _mirrors: Option<Vec<IndexMap<String, PhpMixed>>>) {
+ todo!()
+ }
+ fn get_dist_type(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_urls(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_dist_reference(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_sha1_checksum(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_dist_mirrors(&self) -> Option<Vec<IndexMap<String, PhpMixed>>> {
+ todo!()
+ }
+ fn set_dist_mirrors(&mut self, _mirrors: Option<Vec<IndexMap<String, PhpMixed>>>) {
+ todo!()
+ }
+ fn get_version(&self) -> &str {
+ todo!()
+ }
+ fn get_pretty_version(&self) -> &str {
+ todo!()
+ }
+ fn get_full_pretty_version(&self, _truncate: bool, _display_mode: i64) -> String {
+ todo!()
+ }
+ fn get_release_date(&self) -> Option<DateTime<Utc>> {
+ todo!()
+ }
+ fn get_stability(&self) -> &str {
+ todo!()
+ }
+ fn get_requires(&self) -> IndexMap<String, Link> {
+ todo!()
+ }
+ fn get_conflicts(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_provides(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_replaces(&self) -> Vec<Link> {
+ todo!()
+ }
+ fn get_dev_requires(&self) -> IndexMap<String, Link> {
+ todo!()
+ }
+ fn get_suggests(&self) -> IndexMap<String, String> {
+ todo!()
+ }
+ fn get_autoload(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn get_dev_autoload(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn get_include_paths(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_php_ext(&self) -> Option<IndexMap<String, PhpMixed>> {
+ todo!()
+ }
+ fn set_repository(&mut self, _repository: Box<dyn RepositoryInterface>) -> anyhow::Result<()> {
+ todo!()
+ }
+ fn get_repository(&self) -> Option<&dyn RepositoryInterface> {
+ todo!()
+ }
+ fn get_binaries(&self) -> Vec<String> {
+ todo!()
+ }
+ fn get_unique_name(&self) -> String {
+ todo!()
+ }
+ fn get_notification_url(&self) -> Option<&str> {
+ todo!()
+ }
+ fn get_pretty_string(&self) -> String {
+ todo!()
+ }
+ fn is_default_branch(&self) -> bool {
+ todo!()
+ }
+ fn get_transport_options(&self) -> IndexMap<String, PhpMixed> {
+ todo!()
+ }
+ fn set_transport_options(&mut self, _options: IndexMap<String, PhpMixed>) {
+ todo!()
+ }
+ fn set_source_reference(&mut self, _reference: Option<String>) {
+ todo!()
+ }
+ fn set_dist_url(&mut self, _url: Option<String>) {
+ todo!()
+ }
+ fn set_dist_type(&mut self, _type: Option<String>) {
+ todo!()
+ }
+ fn set_dist_reference(&mut self, _reference: Option<String>) {
+ todo!()
+ }
+ fn set_source_dist_references(&mut self, _reference: &str) {
+ todo!()
+ }
+}
diff --git a/crates/shirabe/src/repository/installed_array_repository.rs b/crates/shirabe/src/repository/installed_array_repository.rs
index 0b641e2..c30d682 100644
--- a/crates/shirabe/src/repository/installed_array_repository.rs
+++ b/crates/shirabe/src/repository/installed_array_repository.rs
@@ -1,6 +1,16 @@
//! ref: composer/src/Composer/Repository/InstalledArrayRepository.php
+use indexmap::IndexMap;
+use shirabe_php_shim::Countable;
+use shirabe_semver::constraint::constraint_interface::ConstraintInterface;
+
+use crate::package::base_package::BasePackage;
+use crate::package::package_interface::PackageInterface;
+use crate::repository::advisory_provider_interface::AdvisoryProviderInterface;
use crate::repository::installed_repository_interface::InstalledRepositoryInterface;
+use crate::repository::repository_interface::{
+ FindPackageConstraint, LoadPackagesResult, ProviderInfo, RepositoryInterface, SearchResult,
+};
use crate::repository::writable_array_repository::WritableArrayRepository;
use crate::repository::writable_repository_interface::WritableRepositoryInterface;
@@ -66,3 +76,56 @@ impl WritableRepositoryInterface for InstalledArrayRepository {
todo!()
}
}
+
+impl Countable for InstalledArrayRepository {
+ fn count(&self) -> i64 {
+ todo!()
+ }
+}
+
+impl RepositoryInterface for InstalledArrayRepository {
+ fn has_package(&self, _package: &dyn PackageInterface) -> bool {
+ todo!()
+ }
+ fn find_package(
+ &self,
+ _name: String,
+ _constraint: FindPackageConstraint,
+ ) -> Option<Box<dyn BasePackage>> {
+ todo!()
+ }
+ fn find_packages(
+ &self,
+ _name: String,
+ _constraint: Option<FindPackageConstraint>,
+ ) -> Vec<Box<dyn BasePackage>> {
+ todo!()
+ }
+ fn get_packages(&self) -> Vec<Box<dyn BasePackage>> {
+ todo!()
+ }
+ fn load_packages(
+ &self,
+ _package_name_map: IndexMap<String, Option<Box<dyn ConstraintInterface>>>,
+ _acceptable_stabilities: IndexMap<String, i64>,
+ _stability_flags: IndexMap<String, i64>,
+ _already_loaded: IndexMap<String, IndexMap<String, Box<dyn PackageInterface>>>,
+ ) -> LoadPackagesResult {
+ todo!()
+ }
+ fn search(&self, _query: String, _mode: i64, _type: Option<String>) -> Vec<SearchResult> {
+ todo!()
+ }
+ fn get_providers(&self, _package_name: String) -> IndexMap<String, ProviderInfo> {
+ todo!()
+ }
+ fn get_repo_name(&self) -> String {
+ todo!()
+ }
+ fn as_advisory_provider(&self) -> Option<&dyn AdvisoryProviderInterface> {
+ None
+ }
+ fn as_any(&self) -> &dyn std::any::Any {
+ todo!()
+ }
+}
diff --git a/crates/shirabe/src/repository/installed_filesystem_repository.rs b/crates/shirabe/src/repository/installed_filesystem_repository.rs
index 7eee5e0..ff28f6e 100644
--- a/crates/shirabe/src/repository/installed_filesystem_repository.rs
+++ b/crates/shirabe/src/repository/installed_filesystem_repository.rs
@@ -1,7 +1,17 @@
//! ref: composer/src/Composer/Repository/InstalledFilesystemRepository.php
+use indexmap::IndexMap;
+use shirabe_php_shim::Countable;
+use shirabe_semver::constraint::constraint_interface::ConstraintInterface;
+
+use crate::package::base_package::BasePackage;
+use crate::package::package_interface::PackageInterface;
+use crate::repository::advisory_provider_interface::AdvisoryProviderInterface;
use crate::repository::filesystem_repository::FilesystemRepository;
use crate::repository::installed_repository_interface::InstalledRepositoryInterface;
+use crate::repository::repository_interface::{
+ FindPackageConstraint, LoadPackagesResult, ProviderInfo, RepositoryInterface, SearchResult,
+};
use crate::repository::writable_repository_interface::WritableRepositoryInterface;
#[derive(Debug)]
@@ -66,3 +76,56 @@ impl WritableRepositoryInterface for InstalledFilesystemRepository {
todo!()
}
}
+
+impl Countable for InstalledFilesystemRepository {
+ fn count(&self) -> i64 {
+ todo!()
+ }
+}
+
+impl RepositoryInterface for InstalledFilesystemRepository {
+ fn has_package(&self, _package: &dyn PackageInterface) -> bool {
+ todo!()
+ }
+ fn find_package(
+ &self,
+ _name: String,
+ _constraint: FindPackageConstraint,
+ ) -> Option<Box<dyn BasePackage>> {
+ todo!()
+ }
+ fn find_packages(
+ &self,
+ _name: String,
+ _constraint: Option<FindPackageConstraint>,
+ ) -> Vec<Box<dyn BasePackage>> {
+ todo!()
+ }
+ fn get_packages(&self) -> Vec<Box<dyn BasePackage>> {
+ todo!()
+ }
+ fn load_packages(
+ &self,
+ _package_name_map: IndexMap<String, Option<Box<dyn ConstraintInterface>>>,
+ _acceptable_stabilities: IndexMap<String, i64>,
+ _stability_flags: IndexMap<String, i64>,
+ _already_loaded: IndexMap<String, IndexMap<String, Box<dyn PackageInterface>>>,
+ ) -> LoadPackagesResult {
+ todo!()
+ }
+ fn search(&self, _query: String, _mode: i64, _type: Option<String>) -> Vec<SearchResult> {
+ todo!()
+ }
+ fn get_providers(&self, _package_name: String) -> IndexMap<String, ProviderInfo> {
+ todo!()
+ }
+ fn get_repo_name(&self) -> String {
+ todo!()
+ }
+ fn as_advisory_provider(&self) -> Option<&dyn AdvisoryProviderInterface> {
+ None
+ }
+ fn as_any(&self) -> &dyn std::any::Any {
+ todo!()
+ }
+}