Skip to content

Commit ac278c4

Browse files
committed
Merge branch '3.3' into 3.4
* 3.3: fixed some deprecation messages fixed some deprecation messages fixed some deprecation messages fixed some deprecation messages [2.7][DX] Use constant message contextualisation for deprecations
2 parents 7276009 + dcc23ab commit ac278c4

30 files changed

+50
-50
lines changed

Compiler/AutowirePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function process(ContainerBuilder $container)
8787
*/
8888
public static function createResourceForClass(\ReflectionClass $reflectionClass)
8989
{
90-
@trigger_error('The '.__METHOD__.'() method is deprecated since version 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED);
90+
@trigger_error('The '.__METHOD__.'() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED);
9191

9292
$metadata = array();
9393

Compiler/Compiler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function getServiceReferenceGraph()
6262
public function getLoggingFormatter()
6363
{
6464
if (null === $this->loggingFormatter) {
65-
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED);
65+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED);
6666

6767
$this->loggingFormatter = new LoggingFormatter();
6868
}
@@ -85,7 +85,7 @@ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BE
8585
if (__CLASS__ !== get_class($this)) {
8686
$r = new \ReflectionMethod($this, __FUNCTION__);
8787
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
88-
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED);
88+
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
8989
}
9090
}
9191

@@ -104,7 +104,7 @@ public function addPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BE
104104
*/
105105
public function addLogMessage($string)
106106
{
107-
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED);
107+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', __METHOD__), E_USER_DEPRECATED);
108108

109109
$this->log[] = $string;
110110
}

Compiler/FactoryReturnTypePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class FactoryReturnTypePass implements CompilerPassInterface
2727
public function __construct(ResolveClassPass $resolveClassPass = null)
2828
{
2929
if (null === $resolveClassPass) {
30-
@trigger_error('The '.__CLASS__.' class is deprecated since version 3.3 and will be removed in 4.0.', E_USER_DEPRECATED);
30+
@trigger_error('The '.__CLASS__.' class is deprecated since Symfony 3.3 and will be removed in 4.0.', E_USER_DEPRECATED);
3131
}
3232
$this->resolveClassPass = $resolveClassPass;
3333
}

Compiler/LoggingFormatter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Compiler;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\LoggingFormatter class is deprecated since version 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\LoggingFormatter class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the ContainerBuilder::log() method instead.', E_USER_DEPRECATED);
1515

1616
/**
1717
* Used to format logging messages during the compilation.

Compiler/PassConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public function addPass(CompilerPassInterface $pass, $type = self::TYPE_BEFORE_O
127127
if (__CLASS__ !== get_class($this)) {
128128
$r = new \ReflectionMethod($this, __FUNCTION__);
129129
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
130-
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED);
130+
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
131131
}
132132
}
133133

Config/AutowireServiceResource.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection\Config;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\AutowireServiceResource class is deprecated since version 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\AutowireServiceResource class is deprecated since Symfony 3.3 and will be removed in 4.0. Use ContainerBuilder::getReflectionClass() instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\Config\Resource\SelfCheckingResourceInterface;
1717
use Symfony\Component\DependencyInjection\Compiler\AutowirePass;

Container.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function isCompiled()
104104
*/
105105
public function isFrozen()
106106
{
107-
@trigger_error(sprintf('The %s() method is deprecated since version 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
107+
@trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED);
108108

109109
return $this->parameterBag instanceof FrozenParameterBag;
110110
}
@@ -238,7 +238,7 @@ public function has($id)
238238
// We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder,
239239
// and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper)
240240
if (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class && method_exists($this, 'get'.strtr($id, $this->underscoreMap).'Service')) {
241-
@trigger_error('Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED);
241+
@trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED);
242242

243243
return true;
244244
}
@@ -388,7 +388,7 @@ public function getServiceIds()
388388
if (!$this->methodMap && !$this instanceof ContainerBuilder && __CLASS__ !== static::class) {
389389
// We only check the convention-based factory in a compiled container (i.e. a child class other than a ContainerBuilder,
390390
// and only when the dumper has not generated the method map (otherwise the method map is considered to be fully populated by the dumper)
391-
@trigger_error('Generating a dumped container without populating the method map is deprecated since 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED);
391+
@trigger_error('Generating a dumped container without populating the method map is deprecated since Symfony 3.2 and will be unsupported in 4.0. Update your dumper to generate the method map.', E_USER_DEPRECATED);
392392

393393
foreach (get_class_methods($this) as $method) {
394394
if (preg_match('/^get(.+)Service$/', $method, $match)) {
@@ -506,7 +506,7 @@ public function normalizeId($id)
506506
if (isset($this->normalizedIds[$normalizedId = strtolower($id)])) {
507507
$normalizedId = $this->normalizedIds[$normalizedId];
508508
if ($id !== $normalizedId) {
509-
@trigger_error(sprintf('Service identifiers will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since version 3.3.', $id, $normalizedId), E_USER_DEPRECATED);
509+
@trigger_error(sprintf('Service identifiers will be made case sensitive in Symfony 4.0. Using "%s" instead of "%s" is deprecated since Symfony 3.3.', $id, $normalizedId), E_USER_DEPRECATED);
510510
}
511511
} else {
512512
$normalizedId = $this->normalizedIds[$normalizedId] = $id;

ContainerBuilder.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ public function addObjectResource($object)
319319
*/
320320
public function addClassResource(\ReflectionClass $class)
321321
{
322-
@trigger_error('The '.__METHOD__.'() method is deprecated since version 3.3 and will be removed in 4.0. Use the addObjectResource() or the getReflectionClass() method instead.', E_USER_DEPRECATED);
322+
@trigger_error('The '.__METHOD__.'() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the addObjectResource() or the getReflectionClass() method instead.', E_USER_DEPRECATED);
323323

324324
return $this->addObjectResource($class->name);
325325
}
@@ -452,7 +452,7 @@ public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig:
452452
if (__CLASS__ !== get_class($this)) {
453453
$r = new \ReflectionMethod($this, __FUNCTION__);
454454
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
455-
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since 3.2.', __METHOD__), E_USER_DEPRECATED);
455+
@trigger_error(sprintf('Method %s() will have a third `int $priority = 0` argument in version 4.0. Not defining it is deprecated since Symfony 3.2.', __METHOD__), E_USER_DEPRECATED);
456456
}
457457
}
458458

@@ -732,7 +732,7 @@ public function compile(/*$resolveEnvPlaceholders = false*/)
732732
if (__CLASS__ !== static::class) {
733733
$r = new \ReflectionMethod($this, __FUNCTION__);
734734
if (__CLASS__ !== $r->getDeclaringClass()->getName() && (1 > $r->getNumberOfParameters() || 'resolveEnvPlaceholders' !== $r->getParameters()[0]->name)) {
735-
@trigger_error(sprintf('The %s::compile() method expects a first "$resolveEnvPlaceholders" argument since version 3.3. It will be made mandatory in 4.0.', static::class), E_USER_DEPRECATED);
735+
@trigger_error(sprintf('The %s::compile() method expects a first "$resolveEnvPlaceholders" argument since Symfony 3.3. It will be made mandatory in 4.0.', static::class), E_USER_DEPRECATED);
736736
}
737737
}
738738
$resolveEnvPlaceholders = false;

DefinitionDecorator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace Symfony\Component\DependencyInjection;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\DefinitionDecorator class is deprecated since version 3.3 and will be removed in 4.0. Use the Symfony\Component\DependencyInjection\ChildDefinition class instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\DefinitionDecorator class is deprecated since Symfony 3.3 and will be removed in 4.0. Use the Symfony\Component\DependencyInjection\ChildDefinition class instead.', E_USER_DEPRECATED);
1515

1616
class_exists(ChildDefinition::class);
1717

Dumper/PhpDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class PhpDumper extends Dumper
7979
public function __construct(ContainerBuilder $container)
8080
{
8181
if (!$container->isCompiled()) {
82-
@trigger_error('Dumping an uncompiled ContainerBuilder is deprecated since version 3.3 and will not be supported anymore in 4.0. Compile the container beforehand.', E_USER_DEPRECATED);
82+
@trigger_error('Dumping an uncompiled ContainerBuilder is deprecated since Symfony 3.3 and will not be supported anymore in 4.0. Compile the container beforehand.', E_USER_DEPRECATED);
8383
}
8484

8585
parent::__construct($container);

0 commit comments

Comments
 (0)