Skip to content

Commit a16814b

Browse files
committed
[2.7][DX] Use constant message contextualisation for deprecations
1 parent 18fbf58 commit a16814b

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

Controller/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ public function createFormBuilder($data = null, array $options = array())
274274
*/
275275
public function getRequest()
276276
{
277-
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The only reliable way to get the "Request" object is to inject it in the action method.', E_USER_DEPRECATED);
277+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.4 and will be removed in 3.0. The only reliable way to get the "Request" object is to inject it in the action method.', E_USER_DEPRECATED);
278278

279279
return $this->container->get('request_stack')->getCurrentRequest();
280280
}

DependencyInjection/Compiler/FragmentRendererPass.php

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

1212
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\FragmentRendererPass class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\FragmentRendererPass class is deprecated since Symfony 2.7 and will be removed in 3.0. Use Symfony\Component\HttpKernel\DependencyInjection\FragmentRendererPass instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\DependencyInjection\Reference;
1717
use Symfony\Component\DependencyInjection\ContainerBuilder;

DependencyInjection/Compiler/TemplatingAssetHelperPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Symfony\Component\DependencyInjection\Definition;
1717
use Symfony\Component\DependencyInjection\Reference;
1818

19-
@trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
19+
@trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since Symfony 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
2020

2121
/**
2222
* @deprecated since 2.7, will be removed in 3.0

DependencyInjection/Configuration.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function getConfigTreeBuilder()
4848
->beforeNormalization()
4949
->ifTrue(function ($v) { return isset($v['csrf_protection']['field_name']); })
5050
->then(function ($v) {
51-
@trigger_error('The framework.csrf_protection.field_name configuration key is deprecated since version 2.4 and will be removed in 3.0. Use the framework.form.csrf_protection.field_name configuration key instead', E_USER_DEPRECATED);
51+
@trigger_error('The framework.csrf_protection.field_name configuration key is deprecated since Symfony 2.4 and will be removed in 3.0. Use the framework.form.csrf_protection.field_name configuration key instead', E_USER_DEPRECATED);
5252

5353
return $v;
5454
})
@@ -82,7 +82,7 @@ public function getConfigTreeBuilder()
8282
|| count($v['templating']['assets_base_urls']['ssl'])
8383
|| count($v['templating']['packages'])
8484
) {
85-
@trigger_error('The assets settings under framework.templating are deprecated since version 2.7 and will be removed in 3.0. Use the framework.assets configuration key instead', E_USER_DEPRECATED);
85+
@trigger_error('The assets settings under framework.templating are deprecated since Symfony 2.7 and will be removed in 3.0. Use the framework.assets configuration key instead', E_USER_DEPRECATED);
8686

8787
// convert the old configuration to the new one
8888
if (isset($v['assets'])) {
@@ -115,7 +115,7 @@ public function getConfigTreeBuilder()
115115
->beforeNormalization()
116116
->ifTrue(function ($v) { return isset($v['validation']['api']); })
117117
->then(function ($v) {
118-
@trigger_error('The validation.api configuration key is deprecated since version 2.7 and will be removed in 3.0', E_USER_DEPRECATED);
118+
@trigger_error('The validation.api configuration key is deprecated since Symfony 2.7 and will be removed in 3.0', E_USER_DEPRECATED);
119119

120120
return $v;
121121
})

Fragment/ContainerAwareHIncludeFragmentRenderer.php

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

1212
namespace Symfony\Bundle\FrameworkBundle\Fragment;
1313

14-
@trigger_error('The '.__NAMESPACE__.'\ContainerAwareHIncludeFragmentRenderer class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bundle\FrameworkBundle\Fragment\HIncludeFragmentRenderer instead.', E_USER_DEPRECATED);
14+
@trigger_error('The '.__NAMESPACE__.'\ContainerAwareHIncludeFragmentRenderer class is deprecated since Symfony 2.7 and will be removed in 3.0. Use Symfony\Bundle\FrameworkBundle\Fragment\HIncludeFragmentRenderer instead.', E_USER_DEPRECATED);
1515

1616
use Symfony\Component\DependencyInjection\ContainerInterface;
1717
use Symfony\Component\HttpFoundation\Request;

HttpCache/HttpCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected function createSurrogate()
8282
*/
8383
protected function createEsi()
8484
{
85-
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED);
85+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED);
8686

8787
return $this->createSurrogate();
8888
}

Templating/GlobalVariables.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function __construct(ContainerInterface $container)
3939
*/
4040
public function getSecurity()
4141
{
42-
@trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
42+
@trigger_error('The '.__METHOD__.' method is deprecated since Symfony 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
4343

4444
if ($this->container->has('security.context')) {
4545
return $this->container->get('security.context');

0 commit comments

Comments
 (0)