Skip to content

Commit ce0930c

Browse files
author
Hugo Hamon
committed
[WIP] adds deprecation notices.
1 parent ff91d30 commit ce0930c

File tree

102 files changed

+256
-34
lines changed

Some content is hidden

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

102 files changed

+256
-34
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,8 @@ public function getValuesForChoices(array $entities)
299299
*/
300300
public function getIndicesForChoices(array $entities)
301301
{
302+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
303+
302304
// Performance optimization
303305
if (empty($entities)) {
304306
return array();
@@ -341,6 +343,8 @@ public function getIndicesForChoices(array $entities)
341343
*/
342344
public function getIndicesForValues(array $values)
343345
{
346+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
347+
344348
// Performance optimization
345349
if (empty($values)) {
346350
return array();

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

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

1212
namespace Symfony\Bridge\Doctrine\Tests;
1313

14+
trigger_error(__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+
1416
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
1517

1618
/**

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ public function getValuesForChoices(array $models)
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
}
@@ -350,6 +352,8 @@ public function getIndicesForChoices(array $models)
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/Bundle/FrameworkBundle/Controller/Controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public function createFormBuilder($data = null, array $options = array())
272272
*/
273273
public function getRequest()
274274
{
275-
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);
275+
trigger_error('The '.__METHOD__.' method 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);
276276

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

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

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

1212
namespace Symfony\Bundle\FrameworkBundle\Templating;
1313

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

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public function __construct(ContainerInterface $container)
4242
*/
4343
public function getSecurity()
4444
{
45+
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
46+
4547
if ($this->container->has('security.context')) {
4648
return $this->container->get('security.context');
4749
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class RequestHelper extends Helper
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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class SessionHelper extends Helper
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/Extension/ActionsExtension.php

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

1212
namespace Symfony\Bundle\TwigBundle\Extension;
1313

14+
trigger_error('The '.__CLASS__.' class is deprecated since version 2.2 and will be removed in Symfony 3.0.', E_USER_DEPRECATED);
15+
1416
use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser;
1517
use Symfony\Component\DependencyInjection\ContainerInterface;
1618

src/Symfony/Component/ClassLoader/DebugClassLoader.php

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

1212
namespace Symfony\Component\ClassLoader;
1313

14+
trigger_error('The '.__CLASS__.' 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
* Autoloader checking if the class is really defined in the file found.
1618
*

0 commit comments

Comments
 (0)