mirror of
https://github.com/crazywhalecc/static-php-cli.git
synced 2026-07-07 08:45:40 +08:00
Add DirDiff utility and enhance package build process
- Introduced DirDiff class for tracking directory file changes. - Updated ConsoleApplication to use addCommand for build targets. - Enhanced PackageBuilder with methods for deploying binaries and extracting debug info. - Improved package installation logic to support shared extensions. - Added readline extension with patching for static builds.
This commit is contained in:
@@ -195,15 +195,20 @@ class PackageInstaller
|
||||
|
||||
/**
|
||||
* Get all resolved packages.
|
||||
* You can filter by package type class if needed.
|
||||
*
|
||||
* @return array<string, Package>
|
||||
* @template T
|
||||
* @param class-string<T> $package_type Filter by package type
|
||||
* @return array<T>
|
||||
*/
|
||||
public function getResolvedPackages(): array
|
||||
public function getResolvedPackages(mixed $package_type = Package::class): array
|
||||
{
|
||||
return $this->packages;
|
||||
return array_filter($this->packages, function (Package $pkg) use ($package_type): bool {
|
||||
return $pkg instanceof $package_type;
|
||||
});
|
||||
}
|
||||
|
||||
public function isPackageBeingResolved(string $package_name): bool
|
||||
public function isPackageResolved(string $package_name): bool
|
||||
{
|
||||
return isset($this->packages[$package_name]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user