chore (Symfony) use Symfony 5 + strict typing

Update Symfony version to 5
Use strict typing
This commit is contained in:
Olaf
2019-12-30 00:27:20 +01:00
parent eeb01bdca5
commit 5515c25872
11 changed files with 2433 additions and 188 deletions

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace Gregwar\CaptchaBundle\DependencyInjection;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
@ -7,21 +9,10 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
class Configuration implements ConfigurationInterface
{
/**
* Generates the configuration tree.
*
* @return TreeBuilder
*/
public function getConfigTreeBuilder()
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder('gregwar_captcha');
if (method_exists($treeBuilder, 'getRootNode')) {
$rootNode = $treeBuilder->getRootNode();
} else {
// BC for symfony/config <= 4.1
$rootNode = $treeBuilder->root('gregwar_captcha');
}
$rootNode = $treeBuilder->getRootNode();
$rootNode
->addDefaultsIfNotSet()