mirror of
https://github.com/php/pie.git
synced 2026-03-23 23:12:17 +01:00
434: add build tools check for build and install commands
This commit is contained in:
@@ -15,6 +15,7 @@ use Php\Pie\DependencyResolver\DependencyResolver;
|
||||
use Php\Pie\DependencyResolver\InvalidPackageName;
|
||||
use Php\Pie\DependencyResolver\UnableToResolveRequirement;
|
||||
use Php\Pie\Installing\InstallForPhpProject\FindMatchingPackages;
|
||||
use Php\Pie\SelfManage\BuildTools\CheckAllBuildTools;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
@@ -35,6 +36,7 @@ final class BuildCommand extends Command
|
||||
private readonly ComposerIntegrationHandler $composerIntegrationHandler,
|
||||
private readonly FindMatchingPackages $findMatchingPackages,
|
||||
private readonly IOInterface $io,
|
||||
private readonly CheckAllBuildTools $checkBuildTools,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -64,6 +66,8 @@ final class BuildCommand extends Command
|
||||
$forceInstallPackageVersion = CommandHelper::determineForceInstallingPackageVersion($input);
|
||||
CommandHelper::applyNoCacheOptionIfSet($input, $this->io);
|
||||
|
||||
$this->checkBuildTools->check($this->io, false); // @todo force or not
|
||||
|
||||
$composer = PieComposerFactory::createPieComposer(
|
||||
$this->container,
|
||||
new PieComposerRequest(
|
||||
|
||||
@@ -16,6 +16,7 @@ use Php\Pie\DependencyResolver\InvalidPackageName;
|
||||
use Php\Pie\DependencyResolver\UnableToResolveRequirement;
|
||||
use Php\Pie\Installing\InstallForPhpProject\FindMatchingPackages;
|
||||
use Php\Pie\Platform\TargetPlatform;
|
||||
use Php\Pie\SelfManage\BuildTools\CheckAllBuildTools;
|
||||
use Psr\Container\ContainerInterface;
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
@@ -37,6 +38,7 @@ final class InstallCommand extends Command
|
||||
private readonly InvokeSubCommand $invokeSubCommand,
|
||||
private readonly FindMatchingPackages $findMatchingPackages,
|
||||
private readonly IOInterface $io,
|
||||
private readonly CheckAllBuildTools $checkBuildTools,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -78,6 +80,8 @@ final class InstallCommand extends Command
|
||||
$forceInstallPackageVersion = CommandHelper::determineForceInstallingPackageVersion($input);
|
||||
CommandHelper::applyNoCacheOptionIfSet($input, $this->io);
|
||||
|
||||
$this->checkBuildTools->check($this->io, false); // @todo force or not
|
||||
|
||||
$composer = PieComposerFactory::createPieComposer(
|
||||
$this->container,
|
||||
new PieComposerRequest(
|
||||
|
||||
Reference in New Issue
Block a user