Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3e0ccf

Browse files
committed
Revert "bug symfony#39861 [DependencyInjection] Skip deprecated definitions in CheckTypeDeclarationsPass (chalasr)"
This reverts commit 5ba237a, reversing changes made to 833a9e0.
1 parent 7b9fc09 commit e3e0ccf

File tree

4 files changed

+2
-25
lines changed

4 files changed

+2
-25
lines changed

src/Symfony/Bundle/SecurityBundle/Tests/Functional/Bundle/TestBundle.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ public function process(ContainerBuilder $container)
3333
}
3434
});
3535

36-
$container->addCompilerPass(new CheckTypeDeclarationsPass(true), PassConfig::TYPE_AFTER_REMOVING, -100);
36+
$container->addCompilerPass(new CheckTypeDeclarationsPass(), PassConfig::TYPE_AFTER_REMOVING, -100);
3737
}
3838
}

src/Symfony/Component/DependencyInjection/Compiler/CheckTypeDeclarationsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ protected function processValue($value, $isRoot = false)
8484
return $value;
8585
}
8686

87-
if (!$value instanceof Definition || $value->hasErrors() || $value->isDeprecated()) {
87+
if (!$value instanceof Definition || $value->hasErrors()) {
8888
return parent::processValue($value, $isRoot);
8989
}
9090

src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckTypeDeclarationsPassTest.php

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\BarMethodCall;
2727
use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\BarOptionalArgument;
2828
use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\BarOptionalArgumentNotNull;
29-
use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\Deprecated;
3029
use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\Foo;
3130
use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\FooObject;
3231
use Symfony\Component\DependencyInjection\Tests\Fixtures\CheckTypeDeclarationsPass\IntersectionConstructor;
@@ -728,19 +727,6 @@ public function testProcessSkipSkippedIds()
728727
$this->addToAssertionCount(1);
729728
}
730729

731-
public function testProcessSkipsDeprecatedDefinitions()
732-
{
733-
$container = new ContainerBuilder();
734-
$container
735-
->register('foobar', Deprecated::class)
736-
->setDeprecated(true)
737-
;
738-
739-
(new CheckTypeDeclarationsPass(true))->process($container);
740-
741-
$this->addToAssertionCount(1);
742-
}
743-
744730
public function testProcessHandleClosureForCallable()
745731
{
746732
$closureDefinition = new Definition(\Closure::class);

src/Symfony/Component/DependencyInjection/Tests/Fixtures/CheckTypeDeclarationsPass/Deprecated.php

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)