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 13e5773

Browse filesBrowse files
minor #31944 [DI] Fix suspicious test (ro0NL)
This PR was merged into the 4.2 branch. Discussion ---------- [DI] Fix suspicious test | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | yes | New feature? | no | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | #31942 | License | MIT | Doc PR | symfony/symfony-docs#... <!-- required for new features --> cc @nicolas-grekas Commits ------- 25b961a [DI] Fix suspicious test
2 parents e2660e0 + 25b961a commit 13e5773
Copy full SHA for 13e5773

File tree

Expand file treeCollapse file tree

2 files changed

+6
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-5
lines changed

‎src/Symfony/Component/Config/Definition/Exception/TreeWithoutRootNodeException.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Config/Definition/Exception/TreeWithoutRootNodeException.php
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
/**
1515
* @author Roland Franssen <franssen.roland@gmail.com>
16+
*
17+
* @internal
1618
*/
1719
class TreeWithoutRootNodeException extends \RuntimeException
1820
{

‎src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Compiler/ValidateEnvPlaceholdersPassTest.php
+4-5Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

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