@@ -66,23 +66,6 @@ public function getConfigTreeBuilder()
66
66
return $ v ;
67
67
})
68
68
->end ()
69
- ->beforeNormalization ()
70
- ->ifTrue (function ($ v ) {
71
- if ($ v ['encoders ' ] ?? false ) {
72
- trigger_deprecation ('symfony/security-bundle ' , '5.3 ' , 'The child node "encoders" at path "security" is deprecated, use "password_hashers" instead. ' );
73
-
74
- return true ;
75
- }
76
-
77
- return $ v ['password_hashers ' ] ?? false ;
78
- })
79
- ->then (function ($ v ) {
80
- $ v ['password_hashers ' ] = array_merge ($ v ['password_hashers ' ] ?? [], $ v ['encoders ' ] ?? []);
81
- $ v ['encoders ' ] = $ v ['password_hashers ' ];
82
-
83
- return $ v ;
84
- })
85
- ->end ()
86
69
->children ()
87
70
->scalarNode ('access_denied_url ' )->defaultNull ()->example ('/foo/error403 ' )->end ()
88
71
->enumNode ('session_fixation_strategy ' )
@@ -111,7 +94,6 @@ public function getConfigTreeBuilder()
111
94
->end ()
112
95
;
113
96
114
- $ this ->addEncodersSection ($ rootNode );
115
97
$ this ->addPasswordHashersSection ($ rootNode );
116
98
$ this ->addProvidersSection ($ rootNode );
117
99
$ this ->addFirewallsSection ($ rootNode , $ this ->factories );
@@ -392,58 +374,6 @@ private function addProvidersSection(ArrayNodeDefinition $rootNode)
392
374
;
393
375
}
394
376
395
- private function addEncodersSection (ArrayNodeDefinition $ rootNode )
396
- {
397
- $ rootNode
398
- ->fixXmlConfig ('encoder ' )
399
- ->children ()
400
- ->arrayNode ('encoders ' )
401
- ->example ([
402
- 'App\Entity\User1 ' => 'auto ' ,
403
- 'App\Entity\User2 ' => [
404
- 'algorithm ' => 'auto ' ,
405
- 'time_cost ' => 8 ,
406
- 'cost ' => 13 ,
407
- ],
408
- ])
409
- ->requiresAtLeastOneElement ()
410
- ->useAttributeAsKey ('class ' )
411
- ->prototype ('array ' )
412
- ->canBeUnset ()
413
- ->performNoDeepMerging ()
414
- ->beforeNormalization ()->ifString ()->then (function ($ v ) { return ['algorithm ' => $ v ]; })->end ()
415
- ->children ()
416
- ->scalarNode ('algorithm ' )
417
- ->cannotBeEmpty ()
418
- ->validate ()
419
- ->ifTrue (function ($ v ) { return !\is_string ($ v ); })
420
- ->thenInvalid ('You must provide a string value. ' )
421
- ->end ()
422
- ->end ()
423
- ->arrayNode ('migrate_from ' )
424
- ->prototype ('scalar ' )->end ()
425
- ->beforeNormalization ()->castToArray ()->end ()
426
- ->end ()
427
- ->scalarNode ('hash_algorithm ' )->info ('Name of hashing algorithm for PBKDF2 (i.e. sha256, sha512, etc..) See hash_algos() for a list of supported algorithms. ' )->defaultValue ('sha512 ' )->end ()
428
- ->scalarNode ('key_length ' )->defaultValue (40 )->end ()
429
- ->booleanNode ('ignore_case ' )->defaultFalse ()->end ()
430
- ->booleanNode ('encode_as_base64 ' )->defaultTrue ()->end ()
431
- ->scalarNode ('iterations ' )->defaultValue (5000 )->end ()
432
- ->integerNode ('cost ' )
433
- ->min (4 )
434
- ->max (31 )
435
- ->defaultNull ()
436
- ->end ()
437
- ->scalarNode ('memory_cost ' )->defaultNull ()->end ()
438
- ->scalarNode ('time_cost ' )->defaultNull ()->end ()
439
- ->scalarNode ('id ' )->end ()
440
- ->end ()
441
- ->end ()
442
- ->end ()
443
- ->end ()
444
- ;
445
- }
446
-
447
377
private function addPasswordHashersSection (ArrayNodeDefinition $ rootNode )
448
378
{
449
379
$ rootNode
0 commit comments