File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,7 @@ public function registerContainerConfiguration(LoaderInterface $loader)
88
88
{
89
89
$ loader ->load (function (ContainerBuilder $ container ) use ($ loader ) {
90
90
$ container ->loadFromExtension ('framework ' , [
91
+ 'secret ' => '%env(APP_SECRET)% ' ,
91
92
'router ' => [
92
93
'resource ' => 'kernel::loadRoutes ' ,
93
94
'type ' => 'service ' ,
@@ -108,7 +109,6 @@ public function registerContainerConfiguration(LoaderInterface $loader)
108
109
109
110
$ container ->addObjectResource ($ this );
110
111
$ container ->fileExists ($ this ->getProjectDir ().'/config/bundles.php ' );
111
- $ container ->setParameter ('kernel.secret ' , '%env(APP_SECRET)% ' );
112
112
113
113
try {
114
114
$ this ->configureContainer ($ container , $ loader );
Original file line number Diff line number Diff line change @@ -69,4 +69,12 @@ public function testFlexStyle()
69
69
70
70
$ this ->assertEquals ('Have a great day! ' , $ response ->getContent ());
71
71
}
72
+
73
+ public function testSecretLoadedFromExtension ()
74
+ {
75
+ $ kernel = new ConcreteMicroKernel ('test ' , false );
76
+ $ kernel ->boot ();
77
+
78
+ self ::assertSame ('$ecret ' , $ kernel ->getContainer ()->getParameter ('kernel.secret ' ));
79
+ }
72
80
}
You can’t perform that action at this time.
0 commit comments