Skip to content

Commit

Permalink
Update composer packages and recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
duboiss committed Oct 11, 2021
1 parent e767077 commit 02931e6
Show file tree
Hide file tree
Showing 19 changed files with 782 additions and 531 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
###< symfony/framework-bundle ###

###> friendsofphp/php-cs-fixer ###
/.php_cs
/.php_cs.cache
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###
6 changes: 3 additions & 3 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

$finder = PhpCsFixer\Finder::create()
$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude('config')
->exclude('public')
->exclude('var')
->notPath('src/Kernel.php')
;

return PhpCsFixer\Config::create()
return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@PhpCsFixer' => true,
Expand All @@ -27,5 +27,5 @@
'yoda_style' => ['equal' => false, 'identical' => false, 'less_and_greater' => false],
])
->setFinder($finder)
->setCacheFile(__DIR__.'/var/.php_cs.cache')
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')
;
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);
};
30 changes: 16 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,23 @@
"ext-ctype": "*",
"ext-iconv": "*",
"ext-json": "*",
"symfony/console": "5.2.*",
"symfony/css-selector": "5.2.*",
"symfony/dom-crawler": "5.2.*",
"symfony/dotenv": "5.2.*",
"symfony/finder": "5.2.*",
"symfony/console": "5.3.*",
"symfony/css-selector": "5.3.*",
"symfony/dom-crawler": "5.3.*",
"symfony/dotenv": "5.3.*",
"symfony/finder": "5.3.*",
"symfony/flex": "^1.3.1",
"symfony/framework-bundle": "5.2.*",
"symfony/http-client": "5.2.*",
"symfony/mailer": "5.2.*",
"symfony/framework-bundle": "5.3.*",
"symfony/http-client": "5.3.*",
"symfony/mailer": "5.3.*",
"symfony/monolog-bundle": "^3.6",
"symfony/notifier": "5.2.*",
"symfony/twilio-notifier": "5.2.*",
"symfony/yaml": "5.2.*"
"symfony/notifier": "5.3.*",
"symfony/runtime": "5.3.*",
"symfony/twilio-notifier": "5.3.*",
"symfony/yaml": "5.3.*"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.18"
"friendsofphp/php-cs-fixer": "^3"
},
"config": {
"optimize-autoloader": true,
Expand Down Expand Up @@ -54,7 +55,8 @@
},
"scripts": {
"auto-scripts": {
"cache:clear": "symfony-cmd"
"cache:clear": "symfony-cmd",
"assets:install %PUBLIC_DIR%": "symfony-cmd"
},
"post-install-cmd": [
"@auto-scripts"
Expand All @@ -69,7 +71,7 @@
"extra": {
"symfony": {
"allow-contrib": false,
"require": "5.2.*"
"require": "5.3.*"
}
}
}

0 comments on commit 02931e6

Please sign in to comment.