Skip to content

Commit 41b12b1

Browse files
committed
improve deprecation messages
1 parent a5d0d60 commit 41b12b1

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Command/CacheWarmupCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class CacheWarmupCommand extends ContainerAwareCommand
3636
public function __construct($cacheWarmer = null)
3737
{
3838
if (!$cacheWarmer instanceof CacheWarmerAggregate) {
39-
@trigger_error(sprintf('Passing a command name as the first argument of "%s" is deprecated since Symfony 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);
39+
@trigger_error(sprintf('Passing a command name as the first argument of "%s()" is deprecated since Symfony 3.4 and support for it will be removed in 4.0. If the command was registered by convention, make it a service instead.', __METHOD__), E_USER_DEPRECATED);
4040

4141
parent::__construct($cacheWarmer);
4242

Command/XliffLintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class XliffLintCommand extends BaseLintCommand
2929
public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
3030
{
3131
if (func_num_args()) {
32-
@trigger_error(sprintf('Passing a constructor argument in "%s" is deprecated since Symfony 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);
32+
@trigger_error(sprintf('Passing a constructor argument in "%s()" is deprecated since Symfony 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);
3333
}
3434

3535
if (null === $directoryIteratorProvider) {

Command/YamlLintCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class YamlLintCommand extends BaseLintCommand
2828
public function __construct($name = null, $directoryIteratorProvider = null, $isReadableProvider = null)
2929
{
3030
if (func_num_args()) {
31-
@trigger_error(sprintf('Passing a constructor argument in "%s" is deprecated since Symfony 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);
31+
@trigger_error(sprintf('Passing a constructor argument in "%s()" is deprecated since Symfony 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);
3232
}
3333

3434
if (null === $directoryIteratorProvider) {

Tests/Translation/TranslatorTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ protected function deleteTmpDir()
4545

4646
/**
4747
* @group legacy
48-
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
48+
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
4949
*/
5050
public function testTransWithoutCachingOmittingLocale()
5151
{
@@ -66,7 +66,7 @@ public function testTransWithoutCachingOmittingLocale()
6666

6767
/**
6868
* @group legacy
69-
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
69+
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
7070
*/
7171
public function testTransWithCachingOmittingLocale()
7272
{
@@ -106,7 +106,7 @@ public function testTransWithCachingOmittingLocale()
106106

107107
/**
108108
* @group legacy
109-
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
109+
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
110110
* @expectedException \InvalidArgumentException
111111
*/
112112
public function testTransWithCachingWithInvalidLocaleOmittingLocale()
@@ -119,7 +119,7 @@ public function testTransWithCachingWithInvalidLocaleOmittingLocale()
119119

120120
/**
121121
* @group legacy
122-
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
122+
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
123123
*/
124124
public function testLoadResourcesWithoutCachingOmittingLocale()
125125
{
@@ -138,7 +138,7 @@ public function testLoadResourcesWithoutCachingOmittingLocale()
138138

139139
/**
140140
* @group legacy
141-
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
141+
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
142142
*/
143143
public function testGetDefaultLocaleOmittingLocale()
144144
{
@@ -167,7 +167,7 @@ public function testGetDefaultLocaleOmittingLocaleWithPsrContainer()
167167

168168
/**
169169
* @group legacy
170-
* @expectedDeprecation Method Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
170+
* @expectedDeprecation The "Symfony\Bundle\FrameworkBundle\Translation\Translator::__construct()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.
171171
*/
172172
public function testWarmupOmittingLocale()
173173
{

Translation/Translator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function __construct(ContainerInterface $container, $formatter, $defaultL
7575
$options = $loaderIds;
7676
$loaderIds = $defaultLocale;
7777
$defaultLocale = $container->getParameter('kernel.default_locale');
78-
@trigger_error(sprintf('Method %s() takes the default locale as 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.', __METHOD__), E_USER_DEPRECATED);
78+
@trigger_error(sprintf('The "%s()" method takes the default locale as the 3rd argument since Symfony 3.3. Not passing it is deprecated and will trigger an error in 4.0.', __METHOD__), E_USER_DEPRECATED);
7979
}
8080

8181
$this->container = $container;

0 commit comments

Comments
 (0)