diff --git a/.scrutinizer.yml b/.scrutinizer.yml old mode 100644 new mode 100755 index 0d9190e..7013362 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -2,13 +2,19 @@ filter: excluded_paths: - Tests/* build: - tests: - override: - - - command: 'vendor/bin/simple-phpunit --coverage-clover=clover-coverage.xml' - coverage: - file: 'clover-coverage.xml' - format: 'clover' environment: php: - version: 7.2 # or any other released version + version: 7.2 + nodes: + analysis: + tests: + override: + - php-scrutinizer-run + + tests-and-coverage: + tests: + override: + - command: 'vendor/bin/simple-phpunit --coverage-clover=clover-coverage.xml' + coverage: + file: 'clover-coverage.xml' + format: 'php-clover' diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 1eeb659..50f9e84 100755 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -18,14 +18,8 @@ class Configuration implements ConfigurationInterface public function getConfigTreeBuilder(): TreeBuilder { $treeBuilder = new TreeBuilder('deamon_logger_extra'); - // Keep compatibility with symfony/config < 4.2 - if (!method_exists($treeBuilder, 'getRootNode')) { - $rootNode = $treeBuilder->root('deamon_logger_extra'); - } else { - $rootNode = $treeBuilder->getRootNode(); - } - $rootNode->children() + $treeBuilder->getRootNode()->children() ->arrayNode('application')->isRequired() ->children() ->scalarNode('name')->defaultNull()->cannotBeEmpty()->end() @@ -35,7 +29,7 @@ public function getConfigTreeBuilder(): TreeBuilder ->arrayNode('handlers')->isRequired() ->beforeNormalization() ->ifString() - ->then(function ($v) { + ->then(function($v) { return array($v); }) ->end() diff --git a/Processors/Monolog/DeamonLoggerExtraWebProcessor.php b/Processors/Monolog/DeamonLoggerExtraWebProcessor.php index 2fc0694..9aeaf7a 100755 --- a/Processors/Monolog/DeamonLoggerExtraWebProcessor.php +++ b/Processors/Monolog/DeamonLoggerExtraWebProcessor.php @@ -59,16 +59,16 @@ class DeamonLoggerExtraWebProcessor extends BaseWebProcessor public function __construct(?array $config = null) { parent::__construct([]); - if(!empty($config) && array_key_exists('channel_prefix', $config)) { + if (!empty($config) && array_key_exists('channel_prefix', $config)) { $this->channelPrefix = $config['channel_prefix']; } - if(!empty($config) && array_key_exists('display', $config)) { + if (!empty($config) && array_key_exists('display', $config)) { $this->displayConfig = $config['display']; } - if(!empty($config) && array_key_exists('user_class', $config)) { + if (!empty($config) && array_key_exists('user_class', $config)) { $this->userClass = $config['user_class']; } - if(!empty($config) && array_key_exists('user_methods', $config)) { + if (!empty($config) && array_key_exists('user_methods', $config)) { $this->userMethods = $config['user_methods']; } } @@ -178,7 +178,7 @@ private function isUserInstanceValid(?TokenInterface $token): bool */ private function addChannelInfo(): void { - if(!array_key_exists('global_channel', $this->record['extra'])){ + if (!array_key_exists('global_channel', $this->record['extra'])) { $this->addInfo('global_channel', $this->record['channel']); } diff --git a/README.md b/README.md old mode 100644 new mode 100755 index 32f35e5..ddfaf18 --- a/README.md +++ b/README.md @@ -7,10 +7,6 @@ DeamonLoggerExtra Bundle ![symfony version](https://img.shields.io/badge/symfony->=5.0-blue.svg) ![php version](https://img.shields.io/badge/php->=7.2-blue.svg) - -[![SensioLabsInsight](https://insight.sensiolabs.com/projects/5a913c84-a190-40f7-9e46-3c2052692fcd/big.png)](https://insight.sensiolabs.com/projects/5a913c84-a190-40f7-9e46-3c2052692fcd) - - This project is used to add extra context information in your logs. If you need compatibility with previous Symfony versions, have a look at previous releases. @@ -26,7 +22,8 @@ symfony/http-kernel symfony/http-foundation symfony/config -Compatible with Symfony starting from 5.0 +Compatible with Symfony starting from 5.0. +Tags follow Symfony versions. Installation ---------------- diff --git a/composer.json b/composer.json old mode 100644 new mode 100755 index 6d92993..db6bfd3 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "Log" ], "require": { - "php": ">=7.1", + "php": ">=7.2", "symfony/security-core": "^5.0", "symfony/dependency-injection": "^5.0", "symfony/monolog-bridge": "^5.0",