diff --git a/bin/console b/bin/console index 10c672c81..35ce0eba3 100755 --- a/bin/console +++ b/bin/console @@ -3,21 +3,19 @@ use AppBundle\AppKernel; use Symfony\Bundle\FrameworkBundle\Console\Application; -use Symfony\Component\Console\Input\ArgvInput; -// if you don't want to setup permissions the proper way, just uncomment the following PHP line -// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information -//umask(0000); +if (!is_dir(dirname(__DIR__).'/vendor')) { + throw new LogicException('Dependencies are missing. Try running "composer install".'); +} -set_time_limit(0); +if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { + throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); +} -/** @var Composer\Autoload\ClassLoader $loader */ -$loader = require __DIR__.'/../vendor/autoload.php'; +require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; -$input = new ArgvInput(); -$env = $input->getParameterOption(['--env', '-e'], getenv('APP_ENV') ?: 'dev'); -$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(['--no-debug', '']) && $env !== 'prod'; +return function (array $context) { + $kernel = new AppKernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); -$kernel = new AppKernel($env, $debug); -$application = new Application($kernel); -$application->run($input); + return new Application($kernel); +}; diff --git a/composer.json b/composer.json index 49b1215e6..6d6e0e5e1 100644 --- a/composer.json +++ b/composer.json @@ -56,6 +56,7 @@ "symfony/lock": "7.3.*", "symfony/mime": "7.3.*", "symfony/monolog-bundle": "^3.1", + "symfony/runtime": "7.4.*", "symfony/security-bundle": "7.3.*", "symfony/string": "7.3.*", "symfony/translation": "7.3.*", @@ -85,7 +86,8 @@ "allow-plugins": { "cweagans/composer-patches": true, "php-http/discovery": true, - "phpstan/extension-installer": true + "phpstan/extension-installer": true, + "symfony/runtime": true } }, "extra": { diff --git a/composer.lock b/composer.lock index 1ade3674e..f46142809 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "78b0b624409788dd79f9df674ddf000a", + "content-hash": "db1e2f66b63744b8f523154cb74c66ed", "packages": [ { "name": "algolia/algoliasearch-client-php", @@ -8817,6 +8817,89 @@ ], "time": "2025-09-11T10:12:26+00:00" }, + { + "name": "symfony/runtime", + "version": "v7.4.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/runtime.git", + "reference": "876f902a6cb6b26c003de244188c06b2ba1c172f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/runtime/zipball/876f902a6cb6b26c003de244188c06b2ba1c172f", + "reference": "876f902a6cb6b26c003de244188c06b2ba1c172f", + "shasum": "" + }, + "require": { + "composer-plugin-api": "^1.0|^2.0", + "php": ">=8.2" + }, + "conflict": { + "symfony/dotenv": "<6.4" + }, + "require-dev": { + "composer/composer": "^2.6", + "symfony/console": "^6.4|^7.0|^8.0", + "symfony/dotenv": "^6.4|^7.0|^8.0", + "symfony/http-foundation": "^6.4|^7.0|^8.0", + "symfony/http-kernel": "^6.4|^7.0|^8.0" + }, + "type": "composer-plugin", + "extra": { + "class": "Symfony\\Component\\Runtime\\Internal\\ComposerPlugin" + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Runtime\\": "", + "Symfony\\Runtime\\Symfony\\Component\\": "Internal/" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Enables decoupling PHP applications from global state", + "homepage": "https://symfony.com", + "keywords": [ + "runtime" + ], + "support": { + "source": "https://github.com/symfony/runtime/tree/v7.4.1" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://github.com/nicolas-grekas", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2025-12-05T14:04:53+00:00" + }, { "name": "symfony/security-bundle", "version": "v7.3.4", @@ -15164,7 +15247,8 @@ "ext-json": "*", "ext-libxml": "*", "ext-openssl": "*", - "ext-pdo": "*" + "ext-pdo": "*", + "ext-zip": "*" }, "platform-dev": {}, "plugin-api-version": "2.9.0"