Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d120484

Browse filesBrowse files
committed
normalize string values to a single ExposeSecurityLevel instance
1 parent 5955b14 commit d120484
Copy full SHA for d120484

File tree

Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-1
lines changed

‎src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/DependencyInjection/MainConfiguration.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public function getConfigTreeBuilder(): TreeBuilder
7676
->setDeprecated('symfony/security-bundle', '7.3', 'The "%node%" option is deprecated and will be removed in 8.0. Use the "expose_security_errors" option instead.')
7777
->end()
7878
->enumNode('expose_security_errors')
79-
->beforeNormalization()->ifString()->then(fn ($v) => ['value' => ExposeSecurityLevel::tryFrom($v)])->end()
79+
->beforeNormalization()->ifString()->then(fn ($v) => ExposeSecurityLevel::tryFrom($v))->end()
8080
->values(ExposeSecurityLevel::cases())
8181
->defaultValue(ExposeSecurityLevel::None)
8282
->end()

‎src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Tests/DependencyInjection/MainConfigurationTest.php
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,9 @@ public static function provideHideUserNotFoundData(): iterable
254254
yield [['expose_security_errors' => ExposeSecurityLevel::None], ExposeSecurityLevel::None];
255255
yield [['expose_security_errors' => ExposeSecurityLevel::AccountStatus], ExposeSecurityLevel::AccountStatus];
256256
yield [['expose_security_errors' => ExposeSecurityLevel::All], ExposeSecurityLevel::All];
257+
yield [['expose_security_errors' => 'none'], ExposeSecurityLevel::None];
258+
yield [['expose_security_errors' => 'account_status'], ExposeSecurityLevel::AccountStatus];
259+
yield [['expose_security_errors' => 'all'], ExposeSecurityLevel::All];
257260
}
258261

259262
/**

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.