1.0.0 Alpha Release #59

Merged
netkas merged 213 commits from v1.0.0_alpha into master 2023-01-29 23:27:58 +00:00
2 changed files with 9 additions and 9 deletions
Showing only changes of commit a59c7c4a8d - Show all commits

View file

@ -246,7 +246,7 @@
{
try
{
$path = $package_manager->fetchFromSource($parsed_source->toString());
$path = $package_manager->fetchFromSource($parsed_source->toString(), $credential);
}
catch (Exception $e)
{
@ -364,7 +364,7 @@
{
try
{
$package_manager->install($path);
$package_manager->install($path, $credential);
Console::out(sprintf('Package %s installed successfully', $package->Assembly->Package));
}
catch(Exception $e)

View file

@ -95,7 +95,7 @@
* @throws UnsupportedRunnerException
* @throws VersionNotFoundException
*/
public function install(string $package_path): string
public function install(string $package_path, ?Entry $entry=null): string
{
if(Resolver::resolveScope() !== Scopes::System)
throw new AccessDeniedException('Insufficient permission to install packages');
@ -127,7 +127,7 @@
{
foreach($package->Dependencies as $dependency)
{
$this->processDependency($dependency, $package, $package_path);
$this->processDependency($dependency, $package, $package_path, $entry);
}
}
@ -412,12 +412,12 @@
* @return string
* @throws InstallationException
*/
public function installFromSource(string $source): string
public function installFromSource(string $source, ?Entry $entry): string
{
try
{
$package = $this->fetchFromSource($source);
return $this->install($package);
$package = $this->fetchFromSource($source, $entry);
return $this->install($package, $entry);
}
catch(Exception $e)
{
@ -444,7 +444,7 @@
* @throws UnsupportedRunnerException
* @throws VersionNotFoundException
*/
private function processDependency(Dependency $dependency, Package $package, string $package_path): void
private function processDependency(Dependency $dependency, Package $package, string $package_path, ?Entry $entry=null): void
{
Console::outVerbose('processing dependency ' . $dependency->Name . ' (' . $dependency->Version . ')');
$dependent_package = $this->getPackage($dependency->Name);
@ -481,7 +481,7 @@
case DependencySourceType::RemoteSource:
Console::outDebug('installing from remote source ' . $dependency->Source);
$this->installFromSource($dependency->Source);
$this->installFromSource($dependency->Source, $entry);
break;
default: