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 fb7eb2d

Browse filesBrowse files
committed
minor #13060 [2.7] adds deprecation notices. (hhamon)
This PR was merged into the 2.7 branch. Discussion ---------- [2.7] adds deprecation notices. | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | #12608, #12672, #12675 #12684, #12686 | License | MIT | Doc PR | ~ Commits ------- f9fbb4f Fixes more deprecation notices as per @stof review. fd47c07 Fixed some deprecations according to @stof feedbacks. 2a3e7d2 Normalizes deprecation notice messages. 738b9be [Validator] fixes UuidValidator deprecated class namespace. e608ba6 [Form] adds more deprecation notices. cd9617a [Validator] adds more deprecation notices. a7f841e [Form] Adds a way to trigger deprecation notice on demand for VirtualFormAwareIterator class. 97efd2c Fixes more deprecation notices. fd9c7bb Normalized @deprecated annotations. 39cfd47 Removed deprecation notices from test files. 2a9749d Fixes deprecation notices. 6f57b7b Reverted trigger_error() function calls on deprecated interfaces to prevent breaking third party projects implementing them. 86b9f6b Adds deprecation notices for structures to be removed in 3.0.
2 parents ea1ac32 + f9fbb4f commit fb7eb2d
Copy full SHA for fb7eb2d

File tree

184 files changed

+880
-469
lines changed
Filter options

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner

184 files changed

+880
-469
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
2.4.0
5+
-----
6+
7+
* deprecated DoctrineOrmTestCase class
8+
49
2.2.0
510
-----
611

‎src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,12 @@ public function getValuesForChoices(array $entities)
296296
*
297297
* @see ChoiceListInterface
298298
*
299-
* @deprecated Deprecated since version 2.4, to be removed in 3.0.
299+
* @deprecated since version 2.4, to be removed in 3.0.
300300
*/
301301
public function getIndicesForChoices(array $entities)
302302
{
303+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
304+
303305
// Performance optimization
304306
if (empty($entities)) {
305307
return array();
@@ -338,10 +340,12 @@ public function getIndicesForChoices(array $entities)
338340
*
339341
* @see ChoiceListInterface
340342
*
341-
* @deprecated Deprecated since version 2.4, to be removed in 3.0.
343+
* @deprecated since version 2.4, to be removed in 3.0.
342344
*/
343345
public function getIndicesForValues(array $values)
344346
{
347+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
348+
345349
// Performance optimization
346350
if (empty($values)) {
347351
return array();

‎src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,21 @@
1111

1212
namespace Symfony\Bridge\Doctrine\Tests;
1313

14+
trigger_error('The '.__NAMESPACE__.'\DoctrineOrmTestCase class is deprecated since version 2.4 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper class instead.', E_USER_DEPRECATED);
15+
16+
use Doctrine\ORM\EntityManager;
1417
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
1518

1619
/**
1720
* Class DoctrineOrmTestCase.
1821
*
19-
* @deprecated Deprecated as of Symfony 2.3, to be removed in Symfony 3.0.
22+
* @deprecated since version 2.4, to be removed in 3.0.
2023
* Use {@link DoctrineTestHelper} instead.
2124
*/
2225
abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase
2326
{
2427
/**
25-
* @return \Doctrine\ORM\EntityManager
28+
* @return EntityManager
2629
*/
2730
public static function createTestEntityManager()
2831
{

‎src/Symfony/Bridge/Monolog/Logger.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Monolog/Logger.php
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,41 +23,41 @@
2323
class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
2424
{
2525
/**
26-
* @deprecated since 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible.
26+
* @deprecated since version 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible.
2727
*/
2828
public function emerg($message, array $context = array())
2929
{
30-
trigger_error('The emerg() method of the Monolog Logger was removed. You should use the new method emergency() instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
30+
trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
3131

3232
return parent::addRecord(BaseLogger::EMERGENCY, $message, $context);
3333
}
3434

3535
/**
36-
* @deprecated since 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible.
36+
* @deprecated since version 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible.
3737
*/
3838
public function crit($message, array $context = array())
3939
{
40-
trigger_error('The crit() method of the Monolog Logger was removed. You should use the new method critical() instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
40+
trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
4141

4242
return parent::addRecord(BaseLogger::CRITICAL, $message, $context);
4343
}
4444

4545
/**
46-
* @deprecated since 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible.
46+
* @deprecated since version 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible.
4747
*/
4848
public function err($message, array $context = array())
4949
{
50-
trigger_error('The err() method of the Monolog Logger was removed. You should use the new method error() instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
50+
trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
5151

5252
return parent::addRecord(BaseLogger::ERROR, $message, $context);
5353
}
5454

5555
/**
56-
* @deprecated since 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible.
56+
* @deprecated since version 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible.
5757
*/
5858
public function warn($message, array $context = array())
5959
{
60-
trigger_error('The warn() method of the Monolog Logger was removed. You should use the new method warning() instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
60+
trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
6161

6262
return parent::addRecord(BaseLogger::WARNING, $message, $context);
6363
}

‎src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php
+7-3Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,10 +300,12 @@ public function getValuesForChoices(array $models)
300300
/**
301301
* {@inheritdoc}
302302
*
303-
* @deprecated Deprecated since version 2.4, to be removed in 3.0.
303+
* @deprecated since version 2.4, to be removed in 3.0.
304304
*/
305305
public function getIndicesForChoices(array $models)
306306
{
307+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
308+
307309
if (empty($models)) {
308310
return array();
309311
}
@@ -319,7 +321,7 @@ public function getIndicesForChoices(array $models)
319321
* but if they originated from different queries, there are not the same object within the code.
320322
*
321323
* This happens when using m:n relations with either sides model as data_class of the form.
322-
* The choicelist will retrieve the list of available related models with a different query, resulting in different objects.
324+
* The choice list will retrieve the list of available related models with a different query, resulting in different objects.
323325
*/
324326
$choices = $this->fixChoices($models);
325327
foreach ($choices as $i => $givenChoice) {
@@ -346,10 +348,12 @@ public function getIndicesForChoices(array $models)
346348
/**
347349
* {@inheritdoc}
348350
*
349-
* @deprecated Deprecated since version 2.4, to be removed in 3.0.
351+
* @deprecated since version 2.4, to be removed in 3.0.
350352
*/
351353
public function getIndicesForValues(array $values)
352354
{
355+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
356+
353357
if (empty($values)) {
354358
return array();
355359
}

‎src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* @author Fabien Potencier <fabien@symfony.com>
2525
* @author Clément JOBEILI <clement.jobeili@gmail.com>
2626
*
27-
* @deprecated Deprecated since version 2.4, to be removed in 3.0. Use
28-
* MessageDataCollector of SwiftmailerBundle instead.
27+
* @deprecated since version 2.4, to be removed in 3.0.
28+
* Use the MessageDataCollector from SwiftmailerBundle instead.
2929
*/
3030
class MessageDataCollector extends DataCollector
3131
{

‎src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php

Copy file name to clipboardExpand all lines: src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
/**
1515
* @author Bernhard Schussek <bschussek@gmail.com>
1616
*
17-
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
18-
* the helper "form_start()" instead.
17+
* @deprecated since version 2.3, to be removed in 3.0. Use the helper "form_start()" instead.
1918
*/
2019
class FormEnctypeNode extends SearchAndRenderBlockNode
2120
{

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/**
2222
* RouterApacheDumperCommand.
2323
*
24-
* @deprecated Deprecated since version 2.5, to be removed in 3.0.
24+
* @deprecated since version 2.5, to be removed in 3.0.
2525
* The performance gains are minimal and it's very hard to replicate
2626
* the behavior of PHP implementation.
2727
*
@@ -74,7 +74,9 @@ protected function configure()
7474
*/
7575
protected function execute(InputInterface $input, OutputInterface $output)
7676
{
77-
trigger_error('The router:dump-apache command is deprecated since 2.5 and will be removed in 3.0', E_USER_DEPRECATED);
77+
$formatter = $this->getHelper('formatter');
78+
79+
$output->writeln($formatter->formatSection('warning', 'The router:dump-apache command is deprecated since version 2.5 and will be removed in 3.0', 'comment'));
7880

7981
$router = $this->getContainer()->get('router');
8082

‎src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,13 +267,13 @@ public function createFormBuilder($data = null, array $options = array())
267267
*
268268
* @return Request
269269
*
270-
* @deprecated Deprecated since version 2.4, to be removed in 3.0. Ask
271-
* Symfony to inject the Request object into your controller
270+
* @deprecated since version 2.4, to be removed in 3.0.
271+
* Ask Symfony to inject the Request object into your controller
272272
* method instead by type hinting it in the method's signature.
273273
*/
274274
public function getRequest()
275275
{
276-
trigger_error('The "getRequest" method of the base "Controller" class has been 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);
276+
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);
277277

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

‎src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private function addCsrfSection(ArrayNodeDefinition $rootNode)
116116
->children()
117117
->scalarNode('field_name')
118118
->defaultValue('_token')
119-
->info('Deprecated since 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead')
119+
->info('Deprecated since version 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead')
120120
->end()
121121
->end()
122122
->end()

‎src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ protected function createSurrogate()
8080
*
8181
* @return Esi
8282
*
83-
* @deprecated Deprecated since version 2.6, to be removed in 3.0. Use createSurrogate() instead
83+
* @deprecated since version 2.6, to be removed in 3.0. Use createSurrogate() instead
8484
*/
8585
protected function createEsi()
8686
{

‎src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Bundle\FrameworkBundle\Templating;
1313

14+
trigger_error('The '.__NAMESPACE__.'\Debugger class is deprecated since version 2.4 and will be removed in 3.0. Use the Psr\Log\LoggerInterface interface instead.', E_USER_DEPRECATED);
15+
1416
use Symfony\Component\Templating\DebuggerInterface;
1517
use Psr\Log\LoggerInterface;
1618

@@ -19,7 +21,8 @@
1921
*
2022
* @author Fabien Potencier <fabien@symfony.com>
2123
*
22-
* @deprecated Deprecated in 2.4, to be removed in 3.0. Use Psr\Log\LoggerInterface instead.
24+
* @deprecated since version 2.4, to be removed in 3.0.
25+
* Use Psr\Log\LoggerInterface instead.
2326
*/
2427
class Debugger implements DebuggerInterface
2528
{

‎src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ public function __construct(ContainerInterface $container)
3737
/**
3838
* Returns the security context service.
3939
*
40-
* @deprecated Deprecated since version 2.6, to be removed in 3.0.
40+
* @deprecated since version 2.6, to be removed in 3.0.
41+
*
4142
* @return SecurityContext|null The security context
4243
*/
4344
public function getSecurity()
4445
{
46+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
47+
4548
if ($this->container->has('security.context')) {
4649
return $this->container->get('security.context');
4750
}

‎src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ public function end(FormView $view, array $variables = array())
131131
*
132132
* @return string The HTML markup
133133
*
134-
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use
135-
* {@link start} instead.
134+
* @deprecated since version 2.3, to be removed in 3.0.
135+
* Use {@link start} instead.
136136
*/
137137
public function enctype(FormView $view)
138138
{

‎src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ class RequestHelper extends Helper
3030
*
3131
* @param Request|RequestStack $requestStack A RequestStack instance or a Request instance
3232
*
33-
* @deprecated since 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0
33+
* @deprecated since version 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0.
3434
*/
3535
public function __construct($requestStack)
3636
{
3737
if ($requestStack instanceof Request) {
38+
trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED);
3839
$this->request = $requestStack;
3940
} elseif ($requestStack instanceof RequestStack) {
4041
$this->requestStack = $requestStack;

‎src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,12 @@ class SessionHelper extends Helper
3030
*
3131
* @param Request|RequestStack $requestStack A RequestStack instance or a Request instance
3232
*
33-
* @deprecated since 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0
33+
* @deprecated since version 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0.
3434
*/
3535
public function __construct($requestStack)
3636
{
3737
if ($requestStack instanceof Request) {
38+
trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED);
3839
$this->session = $requestStack->getSession();
3940
} elseif ($requestStack instanceof RequestStack) {
4041
$this->requestStack = $requestStack;

‎src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private function addFormSection(ArrayNodeDefinition $rootNode)
6161
->end()
6262
->children()
6363
->arrayNode('form')
64-
->info('Deprecated since 2.6, to be removed in 3.0. Use twig.form_themes instead')
64+
->info('Deprecated since version 2.6, to be removed in 3.0. Use twig.form_themes instead')
6565
->addDefaultsIfNotSet()
6666
->fixXmlConfig('resource')
6767
->children()

‎src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Fabien Potencier <fabien@symfony.com>
2222
*
23-
* @deprecated Deprecated in 2.2, to be removed in 3.0.
23+
* @deprecated since version 2.2, to be removed in 3.0.
2424
*/
2525
class ActionsExtension extends \Twig_Extension
2626
{
@@ -29,14 +29,14 @@ class ActionsExtension extends \Twig_Extension
2929
/**
3030
* @param FragmentHandler|ContainerInterface $handler
3131
*
32-
* @deprecated Passing a ContainerInterface as a first argument is deprecated as of 2.7 and will be removed in 3.0.
32+
* @deprecated Passing a ContainerInterface as a first argument is deprecated since 2.7 and will be removed in 3.0.
3333
*/
3434
public function __construct($handler)
3535
{
3636
if ($handler instanceof FragmentHandler) {
3737
$this->handler = $handler;
3838
} elseif ($handler instanceof ContainerInterface) {
39-
trigger_error(sprintf('The ability to pass a ContainerInterface instance as a first argument to %s was deprecated in 2.7 and will be removed in 3.0. Please, pass a FragmentHandler instance instead.', __METHOD__), E_USER_DEPRECATED);
39+
trigger_error('The ability to pass a ContainerInterface instance as a first argument to '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Pass a FragmentHandler instance instead.', E_USER_DEPRECATED);
4040

4141
$this->handler = $handler->get('fragment.handler');
4242
} else {

‎src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
<xsd:complexType name="config">
1111
<xsd:sequence>
12-
<!-- @deprecated since 2.6, to be removed in 3.0 -->
12+
<!-- @deprecated since version 2.6, to be removed in 3.0 -->
1313
<xsd:element name="form" type="form" minOccurs="0" maxOccurs="1" />
1414
<xsd:element name="form-theme" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
1515
<xsd:element name="global" type="global" minOccurs="0" maxOccurs="unbounded" />

‎src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public function testLoadFullConfiguration($format)
5757
$resources = $container->getParameter('twig.form.resources');
5858
$this->assertContains('form_div_layout.html.twig', $resources, '->load() includes default template for form resources');
5959
$this->assertContains('MyBundle::form.html.twig', $resources, '->load() merges new templates into form resources');
60-
// @deprecated since 2.6, to be removed in 3.0
60+
// @deprecated since version 2.6, to be removed in 3.0
6161
$this->assertContains('MyBundle::formDeprecated.html.twig', $resources, '->load() merges new templates into form resources');
6262

6363
// Globals

‎src/Symfony/Bundle/TwigBundle/TwigEngine.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/TwigEngine.php
+8-3Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,19 +42,24 @@ public function __construct(\Twig_Environment $environment, TemplateNameParserIn
4242
}
4343

4444
/**
45-
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Inject the escaping
46-
* strategy on Twig_Environment instead
45+
* @deprecated since version 2.7, to be removed in 3.0.
46+
* Inject the escaping strategy on \Twig_Environment instead.
4747
*/
4848
public function setDefaultEscapingStrategy($strategy)
4949
{
50+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Inject the escaping strategy in the Twig_Environment object instead.', E_USER_DEPRECATED);
51+
5052
$this->environment->getExtension('escaper')->setDefaultStrategy($strategy);
5153
}
5254

5355
/**
54-
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use TwigDefaultEscapingStrategy instead.
56+
* @deprecated since version 2.7, to be removed in 3.0.
57+
* Use TwigDefaultEscapingStrategy instead.
5558
*/
5659
public function guessDefaultEscapingStrategy($filename)
5760
{
61+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy::guess method instead.', E_USER_DEPRECATED);
62+
5863
return TwigDefaultEscapingStrategy::guess($filename);
5964
}
6065

0 commit comments

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