Skip to content

Commit

Permalink
Split and format Symfony bundle configuration (#323)
Browse files Browse the repository at this point in the history
* Split and format Symfony bundle configuration

* Fix phpstan

* Update Configuration.php

* Update Configuration.php

Co-authored-by: Florent Morselli <contact@spomky-labs.com>
Co-authored-by: Florent Morselli <florent@morselli.fr>
  • Loading branch information
3 people authored Nov 7, 2022
1 parent ae2b314 commit 123b18b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ parameters:
path: src/symfony/src/Security/Authorization/Voter/IsUserVerifiedVoter.php
count: 1
-
message: '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::(.*)\(\)#'
message: '#Cannot call method (scalar|integer)Node\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null.#'
path: src/symfony/src/DependencyInjection/Configuration.php
count: 1
count: 6
-
message: '#Cannot call method scalarNode\(\) on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface\|null\.#'
path: src/symfony/src/DependencyInjection/Factory/Security/WebauthnFactory.php
Expand Down
5 changes: 1 addition & 4 deletions src/symfony/src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public function __construct(
public function getConfigTreeBuilder(): TreeBuilder
{
$treeBuilder = new TreeBuilder($this->alias);
/** @var ArrayNodeDefinition $rootNode */
$rootNode = $treeBuilder->getRootNode();

$rootNode
Expand Down Expand Up @@ -273,14 +274,12 @@ protected function addControllersConfig(ArrayNodeDefinition $rootNode): void
->addDefaultsIfNotSet()
->children()
->scalarNode('options_method')
->isRequired()
->defaultValue(Request::METHOD_POST)
->end()
->scalarNode('options_path')
->isRequired()
->end()
->scalarNode('result_method')
->isRequired()
->defaultValue(Request::METHOD_POST)
->end()
->scalarNode('result_path')
Expand Down Expand Up @@ -328,14 +327,12 @@ protected function addControllersConfig(ArrayNodeDefinition $rootNode): void
->addDefaultsIfNotSet()
->children()
->scalarNode('options_method')
->isRequired()
->defaultValue(Request::METHOD_POST)
->end()
->scalarNode('options_path')
->isRequired()
->end()
->scalarNode('result_method')
->isRequired()
->defaultValue(Request::METHOD_POST)
->end()
->scalarNode('result_path')
Expand Down

0 comments on commit 123b18b

Please sign in to comment.