Run composer install
for install
This commit is contained in:
parent
4906322e41
commit
dcb600379a
3 changed files with 81 additions and 6 deletions
|
@ -11,11 +11,10 @@
|
||||||
"symfony/dotenv": "7.0.*",
|
"symfony/dotenv": "7.0.*",
|
||||||
"symfony/flex": "^2",
|
"symfony/flex": "^2",
|
||||||
"symfony/framework-bundle": "7.0.*",
|
"symfony/framework-bundle": "7.0.*",
|
||||||
|
"symfony/process": "7.0.*",
|
||||||
"symfony/runtime": "7.0.*",
|
"symfony/runtime": "7.0.*",
|
||||||
"symfony/yaml": "7.0.*"
|
"symfony/yaml": "7.0.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
|
||||||
},
|
|
||||||
"config": {
|
"config": {
|
||||||
"allow-plugins": {
|
"allow-plugins": {
|
||||||
"php-http/discovery": true,
|
"php-http/discovery": true,
|
||||||
|
|
63
composer.lock
generated
63
composer.lock
generated
|
@ -4,7 +4,7 @@
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "e35f3617f3b9fbf8a1fd858641bffd14",
|
"content-hash": "ed896bf496f3acf356d14377785d8cfa",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "psr/cache",
|
"name": "psr/cache",
|
||||||
|
@ -1843,6 +1843,67 @@
|
||||||
],
|
],
|
||||||
"time": "2024-01-29T20:11:03+00:00"
|
"time": "2024-01-29T20:11:03+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/process",
|
||||||
|
"version": "v7.0.3",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/process.git",
|
||||||
|
"reference": "937a195147e0c27b2759ade834169ed006d0bc74"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/process/zipball/937a195147e0c27b2759ade834169ed006d0bc74",
|
||||||
|
"reference": "937a195147e0c27b2759ade834169ed006d0bc74",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.2"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Process\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Executes commands in sub-processes",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/process/tree/v7.0.3"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-01-23T15:02:46+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
"version": "v7.0.3",
|
"version": "v7.0.3",
|
||||||
|
|
21
versa
21
versa
|
@ -3,10 +3,19 @@
|
||||||
<?php
|
<?php
|
||||||
require __DIR__.'/vendor/autoload.php';
|
require __DIR__.'/vendor/autoload.php';
|
||||||
|
|
||||||
|
use Symfony\Component\Console\Input\InputArgument;
|
||||||
|
use Symfony\Component\Console\Input\InputInterface;
|
||||||
use Symfony\Component\Console\SingleCommandApplication;
|
use Symfony\Component\Console\SingleCommandApplication;
|
||||||
|
use Symfony\Component\Process\Process;
|
||||||
|
|
||||||
$application = new SingleCommandApplication();
|
$application = new SingleCommandApplication();
|
||||||
|
|
||||||
|
$application->addArgument(
|
||||||
|
name: 'command',
|
||||||
|
mode: InputArgument::REQUIRED,
|
||||||
|
description: 'The command to run',
|
||||||
|
);
|
||||||
|
|
||||||
$application->addOption(
|
$application->addOption(
|
||||||
name: 'type',
|
name: 'type',
|
||||||
mode: InputArgument::OPTIONAL,
|
mode: InputArgument::OPTIONAL,
|
||||||
|
@ -15,9 +24,15 @@ $application->addOption(
|
||||||
);
|
);
|
||||||
|
|
||||||
$application->setCode(function (InputInterface $input): int {
|
$application->setCode(function (InputInterface $input): int {
|
||||||
dd(
|
// TODO: only allow defined commands - build, install, test, run.
|
||||||
$input->getOption('type'),
|
switch ($input->getArgument('command')) {
|
||||||
);
|
case 'install':
|
||||||
|
// TODO: Composer in Docker Compose?
|
||||||
|
$process = new Process(command: ['composer', 'install']);
|
||||||
|
$process->setTty(true);
|
||||||
|
$process->run();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
});
|
});
|
||||||
|
|
Reference in a new issue