Skip to content

Commit 2a3e7d2

Browse files
author
Hugo Hamon
committed
Normalizes deprecation notice messages.
1 parent 738b9be commit 2a3e7d2

File tree

18 files changed

+35
-31
lines changed

18 files changed

+35
-31
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class RequestHelper extends Helper
3030
*
3131
* @param Request|RequestStack $requestStack A RequestStack instance or a Request instance
3232
*
33-
* @deprecated since version 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
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class SessionHelper extends Helper
3030
*
3131
* @param Request|RequestStack $requestStack A RequestStack instance or a Request instance
3232
*
33-
* @deprecated since version 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
{

src/Symfony/Bundle/TwigBundle/TwigEngine.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,17 @@ 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.3, to be removed in 3.0.
46+
* Inject the escaping strategy on \Twig_Environment instead.
4747
*/
4848
public function setDefaultEscapingStrategy($strategy)
4949
{
5050
$this->environment->getExtension('escaper')->setDefaultStrategy($strategy);
5151
}
5252

5353
/**
54-
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use TwigDefaultEscapingStrategy instead.
54+
* @deprecated since version 2.3, to be removed in 3.0.
55+
* Use TwigDefaultEscapingStrategy instead.
5556
*/
5657
public function guessDefaultEscapingStrategy($filename)
5758
{

src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\ClassLoader;
1313

14+
trigger_error('The '.__NAMESPACE__.'\ApcUniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ApcClassLoader class instead.', E_USER_DEPRECATED);
15+
1416
/**
1517
* ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3.
1618
*
@@ -60,7 +62,8 @@
6062
*
6163
* @api
6264
*
63-
* @deprecated Deprecated since version 2.4, to be removed in 3.0. Use the ApcClassLoader class instead.
65+
* @deprecated since version 2.4, to be removed in 3.0.
66+
* Use the {@link ClassLoader} class instead.
6467
*/
6568
class ApcUniversalClassLoader extends UniversalClassLoader
6669
{

src/Symfony/Component/ClassLoader/CHANGELOG.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
CHANGELOG
22
=========
33

4-
2.7.0
5-
-----
6-
7-
* The UniversalClassLoader class has been deprecated in favor of ClassLoader class
8-
94
2.4.0
105
-----
116

src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@
1111

1212
namespace Symfony\Component\ClassLoader;
1313

14+
trigger_error('The '.__NAMESPACE__.'\DebugUniversalClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED);
15+
1416
/**
1517
* Checks that the class is actually declared in the included file.
1618
*
1719
* @author Fabien Potencier <fabien@symfony.com>
1820
*
19-
* @deprecated Deprecated since version 2.4, to be removed in 3.0. Use the DebugClassLoader provided by the Debug component instead.
21+
* @deprecated since version 2.4, to be removed in 3.0.
22+
* Use the {@link \Symfony\Component\Debug\DebugClassLoader} class instead.
2023
*/
2124
class DebugUniversalClassLoader extends UniversalClassLoader
2225
{

src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ private function getClassCandidates($class)
101101
if ($function[0] instanceof DebugClassLoader) {
102102
$function = $function[0]->getClassLoader();
103103

104-
// Since 2.5, returning an object from DebugClassLoader::getClassLoader() is @deprecated
104+
// @deprecated since version 2.5. Returning an object from DebugClassLoader::getClassLoader() is deprecated.
105105
if (is_object($function)) {
106106
$function = array($function);
107107
}

src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public function clear()
169169
/**
170170
* Returns an iterator for flashes.
171171
*
172-
* @deprecated Will be removed in 3.0.
172+
* @deprecated since version 2.4, to be removed in 3.0.
173173
*
174174
* @return \ArrayIterator An \ArrayIterator instance
175175
*/

src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
1313

14+
trigger_error('The '.__NAMESPACE__.'\LegacyPdoSessionHandler class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler class instead.', E_USER_DEPRECATED);
15+
1416
/**
1517
* Session handler using a PDO connection to read and write data.
1618
*
@@ -77,8 +79,6 @@ public function __construct(\PDO $pdo, array $dbOptions = array())
7779
throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__));
7880
}
7981

80-
trigger_error('"Symfony\Component\HttpFoundation\Session\Storage\Handler\LegacyPdoSessionHandler" is deprecated since version 2.6 and will be removed in 3.0. Use "Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler" instead.', E_USER_DEPRECATED);
81-
8282
$this->pdo = $pdo;
8383
$dbOptions = array_merge(array(
8484
'db_id_col' => 'sess_id',

src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected function duplicateRequest(\Exception $exception, Request $request)
116116
'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null,
117117
// keep for BC -- as $format can be an argument of the controller callable
118118
// see src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php
119-
// @deprecated in 2.4, to be removed in 3.0
119+
// @deprecated since version 2.4, to be removed in 3.0
120120
'format' => $request->getRequestFormat(),
121121
);
122122
$request = $request->duplicate(null, null, $attributes);

0 commit comments

Comments
 (0)