File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Config/Definition/Exception
DependencyInjection/Tests/Compiler Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 1313
1414/**
1515 * @author Roland Franssen <franssen.roland@gmail.com>
16+ *
17+ * @internal
1618 */
1719class TreeWithoutRootNodeException extends \RuntimeException
1820{
Original file line number Diff line number Diff line change @@ -226,16 +226,15 @@ public function testEnvWithVariableNode(): void
226226
227227 /**
228228 * @group legacy
229+ * @expectedDeprecation A tree builder without a root node is deprecated since Symfony 4.2 and will not be supported anymore in 5.0.
229230 */
230231 public function testConfigurationWithoutRootNode (): void
231232 {
232233 $ container = new ContainerBuilder ();
233234 $ container ->registerExtension (new EnvExtension (new EnvConfigurationWithoutRootNode ()));
234- $ container ->loadFromExtension ('env_extension ' );
235+ $ container ->loadFromExtension ('env_extension ' , [ ' foo ' => ' bar ' ] );
235236
236- $ this ->doProcess ($ container );
237-
238- $ this ->addToAssertionCount (1 );
237+ (new ValidateEnvPlaceholdersPass ())->process ($ container );
239238 }
240239
241240 public function testEmptyConfigFromMoreThanOneSource ()
@@ -332,7 +331,7 @@ class EnvConfigurationWithoutRootNode implements ConfigurationInterface
332331{
333332 public function getConfigTreeBuilder ()
334333 {
335- return new TreeBuilder (' env_extension ' );
334+ return new TreeBuilder ();
336335 }
337336}
338337
You can’t perform that action at this time.
0 commit comments