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 b80d8c8

Browse filesBrowse files
committed
minor #24074 Fix deprecations regarding core commands registered as services (chalasr)
This PR was merged into the 3.4 branch. Discussion ---------- Fix deprecations regarding core commands registered as services | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23624 (comment) | License | MIT | Doc PR | n/a Current deprecation messages can be confusing (see fixed ticket), this improves them and adds a bunch of missing CHANGELOG/UPGRADE entries on the same topic Commits ------- 4659975 Fix deprecations regarding core commands registered as services
2 parents b2e1415 + 4659975 commit b80d8c8
Copy full SHA for b80d8c8

20 files changed

+152
-24
lines changed

‎UPGRADE-3.4.md

Copy file name to clipboardExpand all lines: UPGRADE-3.4.md
+55-1Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,52 @@ FrameworkBundle
120120
class has been deprecated and will be removed in 4.0. Use the
121121
`Symfony\Component\Translation\Reader\TranslationReader` class instead.
122122

123-
* The `translation.loader` service has been deprecated and will be removed in 4.0. Use the `translation.reader` service instead.
123+
* The `translation.loader` service has been deprecated and will be removed in 4.0.
124+
Use the `translation.reader` service instead..
125+
126+
* `AssetsInstallCommand::__construct()` now takes an instance of
127+
`Symfony\Component\Filesystem\Filesystem` as first argument.
128+
Not passing it is deprecated and will throw a `TypeError` in 4.0.
129+
130+
* `CacheClearCommand::__construct()` now takes an instance of
131+
`Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface` as
132+
first argument. Not passing it is deprecated and will throw
133+
a `TypeError` in 4.0.
134+
135+
* `CachePoolClearCommand::__construct()` now takes an instance of
136+
`Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer` as
137+
first argument. Not passing it is deprecated and will throw
138+
a `TypeError` in 4.0.
139+
140+
* `EventDispatcherDebugCommand::__construct()` now takes an instance of
141+
`Symfony\Component\EventDispatcher\EventDispatcherInterface` as
142+
first argument. Not passing it is deprecated and will throw
143+
a `TypeError` in 4.0.
144+
145+
* `RouterDebugCommand::__construct()` now takes an instance of
146+
`Symfony\Component\Routing\RouterInteface` as
147+
first argument. Not passing it is deprecated and will throw
148+
a `TypeError` in 4.0.
149+
150+
* `RouterMatchCommand::__construct()` now takes an instance of
151+
`Symfony\Component\Routing\RouterInteface` as
152+
first argument. Not passing it is deprecated and will throw
153+
a `TypeError` in 4.0.
154+
155+
* `TranslationDebugCommand::__construct()` now takes an instance of
156+
`Symfony\Component\Translation\TranslatorInterface` as
157+
first argument. Not passing it is deprecated and will throw
158+
a `TypeError` in 4.0.
159+
160+
* `TranslationUpdateCommand::__construct()` now takes an instance of
161+
`Symfony\Component\Translation\TranslatorInterface` as
162+
first argument. Not passing it is deprecated and will throw
163+
a `TypeError` in 4.0.
164+
165+
* `AssetsInstallCommand`, `CacheClearCommand`, `CachePoolClearCommand`,
166+
`EventDispatcherDebugCommand`, `RouterDebugCommand`, `RouterMatchCommand`,
167+
`TranslationDebugCommand`, `TranslationUpdateCommand`, `XliffLintCommand`
168+
and `YamlLintCommand` classes have been marked as final
124169

125170
HttpKernel
126171
----------
@@ -170,6 +215,15 @@ SecurityBundle
170215

171216
* `FirewallContext::getListeners()` now returns `\Traversable|array`
172217

218+
* `InitAclCommand::__construct()` now takes an instance of
219+
`Doctrine\DBAL\Connection` as first argument. Not passing it is
220+
deprecated and will throw a `TypeError` in 4.0.
221+
222+
* `SetAclCommand::__construct()` now takes an instance of
223+
`Symfony\Component\Security\Acl\Model\MutableAclProviderInterfaceConnection`
224+
as first argument. Not passing it is deprecated and will throw a `TypeError`
225+
in 4.0.
226+
173227
Translation
174228
-----------
175229

‎UPGRADE-4.0.md

Copy file name to clipboardExpand all lines: UPGRADE-4.0.md
+45-5Lines changed: 45 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,40 @@ FrameworkBundle
419419
class has been deprecated and will be removed in 4.0. Use the
420420
`Symfony\Component\Translation\Reader\TranslationReader` class instead.
421421

422-
* The `translation.loader` service has been deprecated and will be removed in 4.0. Use the `translation.reader` service instead.
422+
* The `translation.loader` service has been removed.
423+
Use the `translation.reader` service instead.
423424

425+
* `AssetsInstallCommand::__construct()` now requires an instance of
426+
`Symfony\Component\Filesystem\Filesystem` as first argument.
427+
428+
* `CacheClearCommand::__construct()` now requires an instance of
429+
`Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface` as
430+
first argument.
431+
432+
* `CachePoolClearCommand::__construct()` now requires an instance of
433+
`Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer` as
434+
first argument.
435+
436+
* `EventDispatcherDebugCommand::__construct()` now requires an instance of
437+
`Symfony\Component\EventDispatcher\EventDispatcherInterface` as
438+
first argument.
439+
440+
* `RouterDebugCommand::__construct()` now requires an instance of
441+
`Symfony\Component\Routing\RouterInteface` as
442+
first argument.
443+
444+
* `RouterMatchCommand::__construct()` now requires an instance of
445+
`Symfony\Component\Routing\RouterInteface` as
446+
first argument.
447+
448+
* `TranslationDebugCommand::__construct()` now requires an instance of
449+
`Symfony\Component\Translation\TranslatorInterface` as
450+
first argument.
451+
452+
* `TranslationUpdateCommand::__construct()` now requires an instance of
453+
`Symfony\Component\Translation\TranslatorInterface` as
454+
first argument.
455+
424456
HttpFoundation
425457
--------------
426458

@@ -570,6 +602,13 @@ SecurityBundle
570602

571603
* `UserPasswordEncoderCommand` does not extend `ContainerAwareCommand` nor implement `ContainerAwareInterface` anymore.
572604

605+
* `InitAclCommand::__construct()` now requires an instance of
606+
`Doctrine\DBAL\Connection` as first argument.
607+
608+
* `SetAclCommand::__construct()` now requires an instance of
609+
`Symfony\Component\Security\Acl\Model\MutableAclProviderInterfaceConnection`
610+
as first argument.
611+
573612
Serializer
574613
----------
575614

@@ -644,11 +683,12 @@ TwigBridge
644683
* The `TwigRendererEngine::setEnvironment()` method has been removed.
645684
Pass the Twig Environment as second argument of the constructor instead.
646685

647-
* Removed `Symfony\Bridge\Twig\Command\DebugCommand::set/getTwigEnvironment` and the ability
648-
to pass a command name as first argument.
686+
* Removed `DebugCommand::set/getTwigEnvironment`. Pass an instance of
687+
`Twig\Environment` as first argument of the constructor instead.
688+
689+
* Removed `LintCommand::set/getTwigEnvironment`. Pass an instance of
690+
`Twig\Environment` as first argument of the constructor instead.
649691

650-
* Removed `Symfony\Bridge\Twig\Command\LintCommand::set/getTwigEnvironment` and the ability
651-
to pass a command name as first argument.
652692

653693
Validator
654694
---------

‎src/Symfony/Bridge/Twig/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/CHANGELOG.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ CHANGELOG
55
-----
66

77
* deprecated `Symfony\Bridge\Twig\Form\TwigRenderer`
8-
* deprecated `Symfony\Bridge\Twig\Command\DebugCommand::set/getTwigEnvironment` and the ability to pass a command name as first argument
9-
* deprecated `Symfony\Bridge\Twig\Command\LintCommand::set/getTwigEnvironment` and the ability to pass a command name as first argument
8+
* deprecated `DebugCommand::set/getTwigEnvironment`. Pass an instance of
9+
`Twig\Environment` as first argument of the constructor instead
10+
* deprecated `LintCommand::set/getTwigEnvironment`. Pass an instance of
11+
`Twig\Environment` as first argument of the constructor instead
1012

1113
3.3.0
1214
-----

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+27Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,33 @@ CHANGELOG
2626
* Deprecated `Symfony\Bundle\FrameworkBundle\Translation\TranslationLoader`, use
2727
`Symfony\Component\Translation\Reader\TranslationReader` instead
2828
* Deprecated `translation.loader` service, use `translation.reader` instead
29+
* `AssetsInstallCommand::__construct()` now takes an instance of
30+
`Symfony\Component\Filesystem\Filesystem` as first argument
31+
* `CacheClearCommand::__construct()` now takes an instance of
32+
`Symfony\Component\HttpKernel\CacheClearer\CacheClearerInterface` as
33+
first argument
34+
* `CachePoolClearCommand::__construct()` now takes an instance of
35+
`Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer` as
36+
first argument
37+
* `EventDispatcherDebugCommand::__construct()` now takes an instance of
38+
`Symfony\Component\EventDispatcher\EventDispatcherInterface` as
39+
first argument
40+
* `RouterDebugCommand::__construct()` now takes an instance of
41+
`Symfony\Component\Routing\RouterInteface` as
42+
first argument
43+
* `RouterMatchCommand::__construct()` now takes an instance of
44+
`Symfony\Component\Routing\RouterInteface` as
45+
first argument
46+
* `TranslationDebugCommand::__construct()` now takes an instance of
47+
`Symfony\Component\Translation\TranslatorInterface` as
48+
first argument
49+
* `TranslationUpdateCommand::__construct()` now takes an instance of
50+
`Symfony\Component\Translation\TranslatorInterface` as
51+
first argument
52+
* `AssetsInstallCommand`, `CacheClearCommand`, `CachePoolClearCommand`,
53+
`EventDispatcherDebugCommand`, `RouterDebugCommand`, `RouterMatchCommand`,
54+
`TranslationDebugCommand`, `TranslationUpdateCommand`, `XliffLintCommand`
55+
and `YamlLintCommand` classes have been marked as final
2956

3057
3.3.0
3158
-----

‎src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class AssetsInstallCommand extends ContainerAwareCommand
4545
public function __construct($filesystem = null)
4646
{
4747
if (!$filesystem instanceof Filesystem) {
48-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
48+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, Filesystem::class), E_USER_DEPRECATED);
4949

5050
parent::__construct($filesystem);
5151

‎src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CacheClearCommand extends ContainerAwareCommand
4545
public function __construct($cacheClearer = null, Filesystem $filesystem = null)
4646
{
4747
if (!$cacheClearer instanceof CacheClearerInterface) {
48-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
48+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, CacheClearerInterface::class), E_USER_DEPRECATED);
4949

5050
parent::__construct($cacheClearer);
5151

‎src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/CachePoolClearCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ final class CachePoolClearCommand extends ContainerAwareCommand
3535
public function __construct($poolClearer = null)
3636
{
3737
if (!$poolClearer instanceof Psr6CacheClearer) {
38-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
38+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, Psr6CacheClearer::class), E_USER_DEPRECATED);
3939

4040
parent::__construct($poolClearer);
4141

‎src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/EventDispatcherDebugCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class EventDispatcherDebugCommand extends ContainerAwareCommand
3737
public function __construct($dispatcher = null)
3838
{
3939
if (!$dispatcher instanceof EventDispatcherInterface) {
40-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
40+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, EventDispatcherInterface::class), E_USER_DEPRECATED);
4141

4242
parent::__construct($dispatcher);
4343

‎src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class RouterDebugCommand extends ContainerAwareCommand
4141
public function __construct($router = null)
4242
{
4343
if (!$router instanceof RouterInterface) {
44-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
44+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, RouterInterface::class), E_USER_DEPRECATED);
4545

4646
parent::__construct($router);
4747

‎src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class RouterMatchCommand extends ContainerAwareCommand
3939
public function __construct($router = null)
4040
{
4141
if (!$router instanceof RouterInterface) {
42-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
42+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, RouterInterface::class), E_USER_DEPRECATED);
4343

4444
parent::__construct($router);
4545

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationDebugCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class TranslationDebugCommand extends ContainerAwareCommand
5454
public function __construct($translator = null, TranslationReaderInterface $reader = null, ExtractorInterface $extractor = null)
5555
{
5656
if (!$translator instanceof TranslatorInterface) {
57-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
57+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, TranslatorInterface::class), E_USER_DEPRECATED);
5858

5959
parent::__construct($translator);
6060

‎src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class TranslationUpdateCommand extends ContainerAwareCommand
4949
public function __construct($writer = null, TranslationReaderInterface $reader = null, ExtractorInterface $extractor = null, $defaultLocale = null)
5050
{
5151
if (!$writer instanceof TranslationWriterInterface) {
52-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
52+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, TranslationWriterInterface::class), E_USER_DEPRECATED);
5353

5454
parent::__construct($writer);
5555

‎src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterDebugCommandTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testDebugInvalidRoute()
4949

5050
/**
5151
* @group legacy
52-
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand::__construct" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
52+
* @expectedDeprecation Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand::__construct() expects an instance of "Symfony\Component\Routing\RouterInterface" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.
5353
*/
5454
public function testLegacyDebugCommand()
5555
{

‎src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Command/RouterMatchCommandTest.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public function testWithNotMatchPath()
4343

4444
/**
4545
* @group legacy
46-
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand::__construct" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
47-
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand::__construct" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
46+
* @expectedDeprecation Symfony\Bundle\FrameworkBundle\Command\RouterMatchCommand::__construct() expects an instance of "Symfony\Component\Routing\RouterInterface" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.
47+
* @expectedDeprecation Symfony\Bundle\FrameworkBundle\Command\RouterDebugCommand::__construct() expects an instance of "Symfony\Component\Routing\RouterInterface" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.
4848
*/
4949
public function testLegacyMatchCommand()
5050
{

‎src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationDebugCommandTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private function createCommandTester($extractedMessages = array(), $loadedMessag
176176

177177
/**
178178
* @group legacy
179-
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand::__construct" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
179+
* @expectedDeprecation Symfony\Bundle\FrameworkBundle\Command\TranslationDebugCommand::__construct() expects an instance of "Symfony\Component\Translation\TranslatorInterface" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.
180180
*/
181181
public function testLegacyDebugCommand()
182182
{

‎src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Command/TranslationUpdateCommandTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ private function createCommandTester($extractedMessages = array(), $loadedMessag
155155

156156
/**
157157
* @group legacy
158-
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand::__construct" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
158+
* @expectedDeprecation Symfony\Bundle\FrameworkBundle\Command\TranslationUpdateCommand::__construct() expects an instance of "Symfony\Component\Translation\Writer\TranslationWriterInterface" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.
159159
*/
160160
public function testLegacyUpdateCommand()
161161
{

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolClearCommandTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ public function testClearUnexistingPool()
7777

7878
/**
7979
* @group legacy
80-
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand::__construct" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.
80+
* @expectedDeprecation Symfony\Bundle\FrameworkBundle\Command\CachePoolClearCommand::__construct() expects an instance of "Symfony\Component\HttpKernel\CacheClearer\Psr6CacheClearer" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.
8181
*/
8282
public function testLegacyClearCommand()
8383
{

‎src/Symfony/Bundle/SecurityBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ CHANGELOG
88
`VoterInterface` on the class is now deprecated and will be removed in 4.0.
99
* [BC BREAK] `FirewallContext::getListeners()` now returns `\Traversable|array`
1010
* added info about called security listeners in profiler
11+
* `InitAclCommand::__construct()` now takes an instance of
12+
`Doctrine\DBAL\Connection` as first argument
13+
* `SetAclCommand::__construct()` now takes an instance of
14+
`Symfony\Component\Security\Acl\Model\MutableAclProviderInterfaceConnection`
15+
as first argument
1116

1217
3.3.0
1318
-----

‎src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class InitAclCommand extends ContainerAwareCommand
3939
public function __construct($connection = null, Schema $schema = null)
4040
{
4141
if (!$connection instanceof Connection) {
42-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since version 3.4 and will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
42+
@trigger_error(sprintf('%s() expects an instance of "%s" as first argument since version 3.4. Not passing it is deprecated and will throw a TypeError in 4.0.', __METHOD__, Connection::class), E_USER_DEPRECATED);
4343

4444
parent::__construct($connection);
4545

0 commit comments

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