Skip to content

Commit

Permalink
Merge pull request #561 from PUGX/feat/bump-sf-53
Browse files Browse the repository at this point in the history
feat: bump to symfony 5.3
  • Loading branch information
JellyBellyDev authored Jun 1, 2021
2 parents a2d475e + 4afd179 commit de6b30b
Show file tree
Hide file tree
Showing 11 changed files with 649 additions and 384 deletions.
40 changes: 7 additions & 33 deletions bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,15 @@

use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;

if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
}

set_time_limit(0);
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

require dirname(__DIR__).'/vendor/autoload.php';
return function (array $context) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

if (!class_exists(Application::class) || !class_exists(Dotenv::class)) {
throw new LogicException('You need to add "symfony/framework-bundle" and "symfony/dotenv" as Composer dependencies.');
}

$input = new ArgvInput();
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}

if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}

(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');

if ($_SERVER['APP_DEBUG']) {
umask(0000);

if (class_exists(Debug::class)) {
Debug::enable();
}
}

$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);
return new Application($kernel);
};
19 changes: 11 additions & 8 deletions bin/phpunit
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#!/usr/bin/env php
<?php
if (file_exists(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
} else {
if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}

if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}
if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
}

if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}

require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@
"predis/predis": "^1.1",
"sentry/sentry-symfony": "^4.0",
"snc/redis-bundle": "^3.2",
"symfony/asset": "^5.2",
"symfony/console": "^5.2",
"symfony/asset": "^5.3",
"symfony/console": "^5.3",
"symfony/flex": "^1.10",
"symfony/framework-bundle": "^5.2",
"symfony/http-client": "^5.2",
"symfony/framework-bundle": "^5.3",
"symfony/http-client": "^5.3",
"symfony/runtime": "5.3.*",
"symfony/webpack-encore-bundle": "^1.8",
"symfony/yaml": "^5.2"
"symfony/yaml": "^5.3"
},
"require-dev": {
"dg/bypass-finals": "^1.3",
Expand All @@ -46,10 +47,10 @@
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-phpunit": "^0.12",
"phpstan/phpstan-symfony": "^0.12",
"symfony/browser-kit": "^5.2",
"symfony/browser-kit": "^5.3",
"symfony/debug-pack": "^1.0",
"symfony/dotenv": "^5.2",
"symfony/phpunit-bridge": "^5.2"
"symfony/dotenv": "^5.3",
"symfony/phpunit-bridge": "^5.3"
},
"config": {
"preferred-install": {
Expand Down Expand Up @@ -101,7 +102,7 @@
"symfony": {
"id": "01C6YZAVV83WQGHCHEWX2SA6KC",
"allow-contrib": false,
"require": "5.2.*"
"require": "5.3.*"
}
},
"funding": [
Expand Down
Loading

0 comments on commit de6b30b

Please sign in to comment.