Skip to content

Commit b3431c9

Browse files
committed
fixed some deprecation messages
1 parent ded2583 commit b3431c9

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

Command/DebugCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class DebugCommand extends Command
3939
public function __construct($twig = null, $projectDir = null)
4040
{
4141
if (!$twig instanceof Environment) {
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('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);
4343

4444
parent::__construct($twig);
4545

@@ -54,7 +54,7 @@ public function __construct($twig = null, $projectDir = null)
5454

5555
public function setTwigEnvironment(Environment $twig)
5656
{
57-
@trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
57+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
5858

5959
$this->twig = $twig;
6060
}
@@ -64,7 +64,7 @@ public function setTwigEnvironment(Environment $twig)
6464
*/
6565
protected function getTwigEnvironment()
6666
{
67-
@trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
67+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
6868

6969
return $this->twig;
7070
}
@@ -105,7 +105,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
105105
if (__CLASS__ !== get_class($this)) {
106106
$r = new \ReflectionMethod($this, 'getTwigEnvironment');
107107
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
108-
@trigger_error(sprintf('Usage of method "%s" is deprecated since version 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', get_class($this).'::getTwigEnvironment'), E_USER_DEPRECATED);
108+
@trigger_error(sprintf('Usage of method "%s" is deprecated since Symfony 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', get_class($this).'::getTwigEnvironment'), E_USER_DEPRECATED);
109109

110110
$this->twig = $this->getTwigEnvironment();
111111
}

Command/LintCommand.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class LintCommand extends Command
4141
public function __construct($twig = null)
4242
{
4343
if (!$twig instanceof Environment) {
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('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);
4545

4646
parent::__construct($twig);
4747

@@ -55,7 +55,7 @@ public function __construct($twig = null)
5555

5656
public function setTwigEnvironment(Environment $twig)
5757
{
58-
@trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
58+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
5959

6060
$this->twig = $twig;
6161
}
@@ -65,7 +65,7 @@ public function setTwigEnvironment(Environment $twig)
6565
*/
6666
protected function getTwigEnvironment()
6767
{
68-
@trigger_error(sprintf('Method "%s" is deprecated since version 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
68+
@trigger_error(sprintf('Method "%s" is deprecated since Symfony 3.4 and will be removed in 4.0.', __METHOD__), E_USER_DEPRECATED);
6969

7070
return $this->twig;
7171
}
@@ -106,7 +106,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
106106
if (__CLASS__ !== get_class($this)) {
107107
$r = new \ReflectionMethod($this, 'getTwigEnvironment');
108108
if (__CLASS__ !== $r->getDeclaringClass()->getName()) {
109-
@trigger_error(sprintf('Usage of method "%s" is deprecated since version 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', get_class($this).'::getTwigEnvironment'), E_USER_DEPRECATED);
109+
@trigger_error(sprintf('Usage of method "%s" is deprecated since Symfony 3.4 and will no longer be supported in 4.0. Construct the command with its required arguments instead.', get_class($this).'::getTwigEnvironment'), E_USER_DEPRECATED);
110110

111111
$this->twig = $this->getTwigEnvironment();
112112
}

Form/TwigRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
1616
use Twig\Environment;
1717

18-
@trigger_error(sprintf('The %s class is deprecated since version 3.4 and will be removed in 4.0. Use %s instead.', TwigRenderer::class, FormRenderer::class), E_USER_DEPRECATED);
18+
@trigger_error(sprintf('The %s class is deprecated since Symfony 3.4 and will be removed in 4.0. Use %s instead.', TwigRenderer::class, FormRenderer::class), E_USER_DEPRECATED);
1919

2020
/**
2121
* @author Bernhard Schussek <[email protected]>

Tests/Command/LintCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function testLintFileCompileTimeException()
7070

7171
/**
7272
* @group legacy
73-
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bridge\Twig\Command\LintCommand::__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.
73+
* @expectedDeprecation Passing a command name as the first argument of "Symfony\Bridge\Twig\Command\LintCommand::__construct" 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.
7474
* @expectedException \RuntimeException
7575
* @expectedExceptionMessage The Twig environment needs to be set.
7676
*/

0 commit comments

Comments
 (0)