From 6568a930e66fe4eee5fd917efab7e9f0c9c52f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFck=20Piera?= Date: Tue, 5 Nov 2019 13:47:25 +0100 Subject: [PATCH] Fix CS and remove useless config --- .php_cs | 1 + config/bundles.php | 9 +++++ config/packages/assets_version.php | 58 +++++++++++++++--------------- config/packages/dev/monolog.php | 9 +++++ config/packages/framework.yaml | 2 -- 5 files changed, 49 insertions(+), 30 deletions(-) diff --git a/.php_cs b/.php_cs index 4212070e..fe17a642 100644 --- a/.php_cs +++ b/.php_cs @@ -37,6 +37,7 @@ return PhpCsFixer\Config::create() ->setFinder( PhpCsFixer\Finder::create() ->exclude('vendor') + ->in(__DIR__ . '/config') ->in(__DIR__ . '/public') ->in(__DIR__ . '/src') ->in(__DIR__ . '/tests') diff --git a/config/bundles.php b/config/bundles.php index 6fe1f645..2dba8bc4 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + return [ Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], diff --git a/config/packages/assets_version.php b/config/packages/assets_version.php index 157cdc38..28c075d4 100644 --- a/config/packages/assets_version.php +++ b/config/packages/assets_version.php @@ -1,30 +1,32 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - - $rootDirectory = sprintf("%s/../../", __DIR__); - $assetsDirectory = realpath(sprintf("%s/public", $rootDirectory)); - - $finder = new Symfony\Component\Finder\Finder(); - $files = $finder->in($assetsDirectory)->files(); - - $hashes = hash_init('crc32b'); - - foreach($files as $file) { - hash_update_file($hashes, $file); - } - - $hash = hash_final($hashes); - - $container->loadFromExtension('framework', [ - 'assets' => [ - 'version' => $hash - ] - ]); +/* + * This file is part of the Secret Santa project. + * + * (c) JoliCode + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +use Symfony\Component\Finder\Finder; + +$rootDirectory = sprintf('%s/../../', __DIR__); +$assetsDirectory = realpath(sprintf('%s/public', $rootDirectory)); + +$finder = new Finder(); +$files = $finder->in($assetsDirectory)->files(); + +$hashes = hash_init('crc32b'); + +foreach ($files as $file) { + hash_update_file($hashes, $file); +} + +$hash = hash_final($hashes); + +$container->loadFromExtension('framework', [ + 'assets' => [ + 'version' => $hash, + ], +]); diff --git a/config/packages/dev/monolog.php b/config/packages/dev/monolog.php index 1e116e72..7d66f614 100644 --- a/config/packages/dev/monolog.php +++ b/config/packages/dev/monolog.php @@ -1,5 +1,14 @@ + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + use Symfony\Component\Config\Resource\ClassExistenceResource; use Symfony\Component\Console\Application; diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 96bf1e7d..1134d373 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -12,5 +12,3 @@ framework: #fragments: ~ php_errors: log: true - assets: - version: 'v14'