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 a7fae50

Browse filesBrowse files
committed
[EventDispatcher] remove deprecated features
1 parent 79bc327 commit a7fae50
Copy full SHA for a7fae50

File tree

7 files changed

+9
-432
lines changed
Filter options

7 files changed

+9
-432
lines changed

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ public function load(array $configs, ContainerBuilder $container)
294294
'Symfony\\Component\\DependencyInjection\\Container',
295295

296296
'Symfony\\Component\\EventDispatcher\\Event',
297-
'Symfony\\Component\\EventDispatcher\\ContainerAwareEventDispatcher',
298297

299298
'Symfony\\Component\\HttpKernel\\EventListener\\ResponseListener',
300299
'Symfony\\Component\\HttpKernel\\EventListener\\RouterListener',

‎src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/services.xml
+1-3Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
<services>
88
<defaults public="false" />
99

10-
<service id="event_dispatcher" class="Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher" public="true">
11-
<argument type="service" id="service_container" />
12-
</service>
10+
<service id="event_dispatcher" class="Symfony\Component\EventDispatcher\EventDispatcher" public="true" />
1311
<service id="Symfony\Component\EventDispatcher\EventDispatcherInterface" alias="event_dispatcher" />
1412

1513
<service id="http_kernel" class="Symfony\Component\HttpKernel\HttpKernel" public="true">

‎src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/AutowiringTypesTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
use Doctrine\Common\Annotations\AnnotationReader;
1515
use Doctrine\Common\Annotations\CachedReader;
1616
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
17+
use Symfony\Component\EventDispatcher\EventDispatcher;
1718
use Symfony\Component\Templating\EngineInterface as ComponentEngineInterface;
1819
use Symfony\Component\HttpKernel\Debug\TraceableEventDispatcher;
19-
use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
2020
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface as FrameworkBundleEngineInterface;
2121

2222
class AutowiringTypesTest extends WebTestCase
@@ -55,7 +55,7 @@ public function testEventDispatcherAutowiring()
5555
$container = static::$kernel->getContainer();
5656

5757
$autowiredServices = $container->get('test.autowiring_types.autowired_services');
58-
$this->assertInstanceOf(ContainerAwareEventDispatcher::class, $autowiredServices->getDispatcher(), 'The event_dispatcher service should be injected if the debug is not enabled');
58+
$this->assertInstanceOf(EventDispatcher::class, $autowiredServices->getDispatcher(), 'The event_dispatcher service should be injected if the debug is not enabled');
5959

6060
static::bootKernel(array('debug' => true));
6161
$container = static::$kernel->getContainer();

‎src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/ContainerBuilder.php
+1-5Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\InstantiatorInterface;
4040
use Symfony\Component\DependencyInjection\LazyProxy\Instantiator\RealServiceInstantiator;
4141
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
42-
use Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher;
4342
use Symfony\Component\ExpressionLanguage\Expression;
4443
use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
4544

@@ -1076,11 +1075,8 @@ private function createService(Definition $definition, $id, $tryProxy = true)
10761075
$r = new \ReflectionClass($class = $parameterBag->resolveValue($definition->getClass()));
10771076

10781077
$service = null === $r->getConstructor() ? $r->newInstance() : $r->newInstanceArgs($arguments);
1079-
// don't trigger deprecations for internal uses
1080-
// @deprecated since version 3.3, to be removed in 4.0 along with the deprecated class
1081-
$deprecationWhitelist = array('event_dispatcher' => ContainerAwareEventDispatcher::class);
10821078

1083-
if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ") && (!isset($deprecationWhitelist[$id]) || $deprecationWhitelist[$id] !== $class)) {
1079+
if (!$definition->isDeprecated() && 0 < strpos($r->getDocComment(), "\n * @deprecated ")) {
10841080
@trigger_error(sprintf('The "%s" service relies on the deprecated "%s" class. It should either be deprecated or its implementation upgraded.', $id, $r->name), E_USER_DEPRECATED);
10851081
}
10861082
}

‎src/Symfony/Component/EventDispatcher/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Component/EventDispatcher/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.0.0
5+
-----
6+
7+
* removed the `ContainerAwareEventDispatcher` class
8+
49
3.3.0
510
-----
611

‎src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php
-211Lines changed: 0 additions & 211 deletions
This file was deleted.

0 commit comments

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