Silence invasive deprecation warnings, opt-in for warnings

This commit is contained in:
reecefowell 2015-06-07 07:33:05 +01:00
parent 53d9003616
commit 73bbaa6cc7
204 changed files with 317 additions and 318 deletions

View File

@ -5,7 +5,7 @@ Global
------ ------
* `E_USER_DEPRECATED` warnings - * `E_USER_DEPRECATED` warnings -
`trigger_error('... is deprecated ...', E_USER_DEPRECATED)` - `@trigger_error('... is deprecated ...', E_USER_DEPRECATED)` -
are now triggered when using all deprecated functionality. are now triggered when using all deprecated functionality.
To avoid filling up error logs, you may need to add To avoid filling up error logs, you may need to add
`~E_USER_DEPRECATED` to your `error_reporting` setting in `~E_USER_DEPRECATED` to your `error_reporting` setting in

View File

@ -11,7 +11,7 @@
namespace Symfony\Bridge\Doctrine\Form\ChoiceList; namespace Symfony\Bridge\Doctrine\Form\ChoiceList;
trigger_error('The '.__NAMESPACE__.'\EntityChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\EntityChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Form\ChoiceList\DoctrineChoiceLoader instead.', E_USER_DEPRECATED);
use Doctrine\Common\Persistence\Mapping\ClassMetadata; use Doctrine\Common\Persistence\Mapping\ClassMetadata;
use Doctrine\Common\Persistence\ObjectManager; use Doctrine\Common\Persistence\ObjectManager;
@ -300,12 +300,11 @@ class EntityChoiceList extends ObjectChoiceList
* @return array * @return array
* *
* @see ChoiceListInterface * @see ChoiceListInterface
*
* @deprecated since version 2.4, to be removed in 3.0. * @deprecated since version 2.4, to be removed in 3.0.
*/ */
public function getIndicesForChoices(array $entities) public function getIndicesForChoices(array $entities)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
// Performance optimization // Performance optimization
if (empty($entities)) { if (empty($entities)) {
@ -344,12 +343,11 @@ class EntityChoiceList extends ObjectChoiceList
* @return array * @return array
* *
* @see ChoiceListInterface * @see ChoiceListInterface
*
* @deprecated since version 2.4, to be removed in 3.0. * @deprecated since version 2.4, to be removed in 3.0.
*/ */
public function getIndicesForValues(array $values) public function getIndicesForValues(array $values)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
// Performance optimization // Performance optimization
if (empty($values)) { if (empty($values)) {

View File

@ -57,14 +57,14 @@ class ORMQueryBuilderLoader implements EntityLoaderInterface
} }
if ($queryBuilder instanceof \Closure) { if ($queryBuilder instanceof \Closure) {
trigger_error('Passing a QueryBuilder closure to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('Passing a QueryBuilder closure to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
if (!$manager instanceof EntityManager) { if (!$manager instanceof EntityManager) {
throw new UnexpectedTypeException($manager, 'Doctrine\ORM\EntityManager'); throw new UnexpectedTypeException($manager, 'Doctrine\ORM\EntityManager');
} }
trigger_error('Passing an EntityManager to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('Passing an EntityManager to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
trigger_error('Passing a class to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('Passing a class to '.__CLASS__.'::__construct() is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
$queryBuilder = $queryBuilder($manager->getRepository($class)); $queryBuilder = $queryBuilder($manager->getRepository($class));

View File

@ -248,7 +248,7 @@ abstract class DoctrineType extends AbstractType
// deprecation note // deprecation note
$propertyNormalizer = function (Options $options, $propertyName) { $propertyNormalizer = function (Options $options, $propertyName) {
if ($propertyName) { if ($propertyName) {
trigger_error('The "property" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_label" instead.', E_USER_DEPRECATED); @trigger_error('The "property" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_label" instead.', E_USER_DEPRECATED);
} }
return $propertyName; return $propertyName;
@ -267,7 +267,7 @@ abstract class DoctrineType extends AbstractType
// deprecation note // deprecation note
$loaderNormalizer = function (Options $options, $loader) { $loaderNormalizer = function (Options $options, $loader) {
if ($loader) { if ($loader) {
trigger_error('The "loader" option is deprecated since version 2.7 and will be removed in 3.0. Override getLoader() instead.', E_USER_DEPRECATED); @trigger_error('The "loader" option is deprecated since version 2.7 and will be removed in 3.0. Override getLoader() instead.', E_USER_DEPRECATED);
} }
return $loader; return $loader;

View File

@ -11,7 +11,7 @@
namespace Symfony\Bridge\Doctrine\Tests; namespace Symfony\Bridge\Doctrine\Tests;
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); @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);
use Doctrine\ORM\EntityManager; use Doctrine\ORM\EntityManager;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;

View File

@ -27,7 +27,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
*/ */
public function emerg($message, array $context = array()) public function emerg($message, array $context = array())
{ {
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); @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);
return parent::addRecord(BaseLogger::EMERGENCY, $message, $context); return parent::addRecord(BaseLogger::EMERGENCY, $message, $context);
} }
@ -37,7 +37,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
*/ */
public function crit($message, array $context = array()) public function crit($message, array $context = array())
{ {
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); @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);
return parent::addRecord(BaseLogger::CRITICAL, $message, $context); return parent::addRecord(BaseLogger::CRITICAL, $message, $context);
} }
@ -47,7 +47,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
*/ */
public function err($message, array $context = array()) public function err($message, array $context = array())
{ {
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); @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);
return parent::addRecord(BaseLogger::ERROR, $message, $context); return parent::addRecord(BaseLogger::ERROR, $message, $context);
} }
@ -57,7 +57,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
*/ */
public function warn($message, array $context = array()) public function warn($message, array $context = array())
{ {
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); @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);
return parent::addRecord(BaseLogger::WARNING, $message, $context); return parent::addRecord(BaseLogger::WARNING, $message, $context);
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Bridge\Swiftmailer\DataCollector; namespace Symfony\Bridge\Swiftmailer\DataCollector;
trigger_error(__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector class from SwiftmailerBundle instead. Require symfony/swiftmailer-bundle package to download SwiftmailerBundle with Composer.', E_USER_DEPRECATED); @trigger_error(__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Bundle\SwiftmailerBundle\DataCollector\MessageDataCollector class from SwiftmailerBundle instead. Require symfony/swiftmailer-bundle package to download SwiftmailerBundle with Composer.', E_USER_DEPRECATED);
use Symfony\Component\HttpKernel\DataCollector\DataCollector; use Symfony\Component\HttpKernel\DataCollector\DataCollector;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

View File

@ -68,7 +68,7 @@ class AppVariable
*/ */
public function getSecurity() public function getSecurity()
{ {
trigger_error('The "app.security" variable is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The "app.security" variable is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
if (null === $this->container) { if (null === $this->container) {
throw new \RuntimeException('The "app.security" variable is not available.'); throw new \RuntimeException('The "app.security" variable is not available.');

View File

@ -61,9 +61,9 @@ class AssetExtension extends \Twig_Extension
{ {
// BC layer to be removed in 3.0 // BC layer to be removed in 3.0
if (2 < $count = func_num_args()) { if (2 < $count = func_num_args()) {
trigger_error('Generating absolute URLs with the Twig asset() function was deprecated in 2.7 and will be removed in 3.0. Please use absolute_url() instead.', E_USER_DEPRECATED); @trigger_error('Generating absolute URLs with the Twig asset() function was deprecated in 2.7 and will be removed in 3.0. Please use absolute_url() instead.', E_USER_DEPRECATED);
if (4 === $count) { if (4 === $count) {
trigger_error('Forcing a version with the Twig asset() function was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('Forcing a version with the Twig asset() function was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
} }
$args = func_get_args(); $args = func_get_args();
@ -89,7 +89,7 @@ class AssetExtension extends \Twig_Extension
public function getAssetsVersion($packageName = null) public function getAssetsVersion($packageName = null)
{ {
trigger_error('The Twig assets_version() function was deprecated in 2.7 and will be removed in 3.0. Please use asset_version() instead.', E_USER_DEPRECATED); @trigger_error('The Twig assets_version() function was deprecated in 2.7 and will be removed in 3.0. Please use asset_version() instead.', E_USER_DEPRECATED);
return $this->packages->getVersion('/', $packageName); return $this->packages->getVersion('/', $packageName);
} }

View File

@ -120,6 +120,7 @@ class Controller extends ContainerAware
* @param mixed $object The object * @param mixed $object The object
* *
* @throws \LogicException * @throws \LogicException
*
* @return bool * @return bool
*/ */
protected function isGranted($attributes, $object = null) protected function isGranted($attributes, $object = null)
@ -273,7 +274,7 @@ class Controller extends ContainerAware
*/ */
public function getRequest() public function getRequest()
{ {
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); @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);
return $this->container->get('request_stack')->getCurrentRequest(); return $this->container->get('request_stack')->getCurrentRequest();
} }
@ -343,7 +344,7 @@ class Controller extends ContainerAware
public function get($id) public function get($id)
{ {
if ('request' === $id) { if ('request' === $id) {
trigger_error('The "request" service is deprecated and will be removed in 3.0. Add a typehint for Symfony\\Component\\HttpFoundation\\Request to your controller parameters to retrieve the request instead.', E_USER_DEPRECATED); @trigger_error('The "request" service is deprecated and will be removed in 3.0. Add a typehint for Symfony\\Component\\HttpFoundation\\Request to your controller parameters to retrieve the request instead.', E_USER_DEPRECATED);
} }
return $this->container->get($id); return $this->container->get($id);
@ -362,7 +363,7 @@ class Controller extends ContainerAware
} }
/** /**
* Checks the validity of a CSRF token * Checks the validity of a CSRF token.
* *
* @param string $id The id used when generating the token * @param string $id The id used when generating the token
* @param string $token The actual token sent with the request that should be validated * @param string $token The actual token sent with the request that should be validated

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler; namespace Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler;
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); @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);
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;

View File

@ -16,7 +16,7 @@ use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition; use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Reference; use Symfony\Component\DependencyInjection\Reference;
trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\TemplatingAssetHelperPass class is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
/** /**
* @deprecated since 2.7, will be removed in 3.0 * @deprecated since 2.7, will be removed in 3.0

View File

@ -48,7 +48,7 @@ class Configuration implements ConfigurationInterface
->beforeNormalization() ->beforeNormalization()
->ifTrue(function ($v) { return isset($v['csrf_protection']['field_name']); }) ->ifTrue(function ($v) { return isset($v['csrf_protection']['field_name']); })
->then(function ($v) { ->then(function ($v) {
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); @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);
return $v; return $v;
}) })
@ -82,7 +82,7 @@ class Configuration implements ConfigurationInterface
|| count($v['templating']['assets_base_urls']['ssl']) || count($v['templating']['assets_base_urls']['ssl'])
|| count($v['templating']['packages']) || count($v['templating']['packages'])
) { ) {
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); @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);
// convert the old configuration to the new one // convert the old configuration to the new one
if (isset($v['assets'])) { if (isset($v['assets'])) {
@ -115,7 +115,7 @@ class Configuration implements ConfigurationInterface
->beforeNormalization() ->beforeNormalization()
->ifTrue(function ($v) { return isset($v['validation']['api']); }) ->ifTrue(function ($v) { return isset($v['validation']['api']); })
->then(function ($v) { ->then(function ($v) {
trigger_error('The validation.api configuration key is deprecated since version 2.7 and will be removed in 3.0', E_USER_DEPRECATED); @trigger_error('The validation.api configuration key is deprecated since version 2.7 and will be removed in 3.0', E_USER_DEPRECATED);
return $v; return $v;
}) })

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\FrameworkBundle\Fragment; namespace Symfony\Bundle\FrameworkBundle\Fragment;
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); @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);
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

View File

@ -76,7 +76,7 @@ abstract class HttpCache extends BaseHttpCache
} }
/** /**
* Creates new ESI instance * Creates new ESI instance.
* *
* @return Esi * @return Esi
* *
@ -84,7 +84,7 @@ abstract class HttpCache extends BaseHttpCache
*/ */
protected function createEsi() protected function createEsi()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use createSurrogate() instead.', E_USER_DEPRECATED);
return $this->createSurrogate(); return $this->createSurrogate();
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\FrameworkBundle\Templating\Asset; namespace Symfony\Bundle\FrameworkBundle\Templating\Asset;
trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PackageFactory is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); @trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PackageFactory is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED);
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;

View File

@ -14,7 +14,7 @@ namespace Symfony\Bundle\FrameworkBundle\Templating\Asset;
use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Templating\Asset\PathPackage as BasePathPackage; use Symfony\Component\Templating\Asset\PathPackage as BasePathPackage;
trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PathPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED); @trigger_error('The Symfony\Bundle\FrameworkBundle\Templating\Asset\PathPackage is deprecated since version 2.7 and will be removed in 3.0. Use the Asset component instead.', E_USER_DEPRECATED);
/** /**
* The path packages adds a version and a base path to asset URLs. * The path packages adds a version and a base path to asset URLs.

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\FrameworkBundle\Templating; namespace Symfony\Bundle\FrameworkBundle\Templating;
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); @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);
use Symfony\Component\Templating\DebuggerInterface; use Symfony\Component\Templating\DebuggerInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;

View File

@ -43,7 +43,7 @@ class GlobalVariables
*/ */
public function getSecurity() public function getSecurity()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
if ($this->container->has('security.context')) { if ($this->container->has('security.context')) {
return $this->container->get('security.context'); return $this->container->get('security.context');

View File

@ -44,7 +44,7 @@ class AssetsHelper extends Helper
{ {
// BC layer to be removed in 3.0 // BC layer to be removed in 3.0
if (3 === $count = func_num_args()) { if (3 === $count = func_num_args()) {
trigger_error('Forcing a version for an asset was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('Forcing a version for an asset was deprecated in 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
$args = func_get_args(); $args = func_get_args();
@ -66,7 +66,7 @@ class AssetsHelper extends Helper
{ {
// no arguments means old getVersion() for default package // no arguments means old getVersion() for default package
if (null === $path) { if (null === $path) {
trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED); @trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED);
return $this->packages->getVersion('/', $packageName); return $this->packages->getVersion('/', $packageName);
} }
@ -85,7 +85,7 @@ class AssetsHelper extends Helper
} }
// path is a packageName, old version // path is a packageName, old version
trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED); @trigger_error('The getVersion() method requires a path as a first argument since 2.7 and will be enforced as of 3.0.', E_USER_DEPRECATED);
return $this->packages->getVersion('/', $path); return $this->packages->getVersion('/', $path);
} }

View File

@ -136,7 +136,7 @@ class FormHelper extends Helper
*/ */
public function enctype(FormView $view) public function enctype(FormView $view)
{ {
trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED); @trigger_error('The form helper $view[\'form\']->enctype() is deprecated since version 2.3 and will be removed in 3.0. Use $view[\'form\']->start() instead.', E_USER_DEPRECATED);
return $this->renderer->searchAndRenderBlock($view, 'enctype'); return $this->renderer->searchAndRenderBlock($view, 'enctype');
} }

View File

@ -35,7 +35,7 @@ class RequestHelper extends Helper
public function __construct($requestStack) public function __construct($requestStack)
{ {
if ($requestStack instanceof Request) { if ($requestStack instanceof Request) {
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); @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);
$this->request = $requestStack; $this->request = $requestStack;
} elseif ($requestStack instanceof RequestStack) { } elseif ($requestStack instanceof RequestStack) {
$this->requestStack = $requestStack; $this->requestStack = $requestStack;

View File

@ -35,7 +35,7 @@ class SessionHelper extends Helper
public function __construct($requestStack) public function __construct($requestStack)
{ {
if ($requestStack instanceof Request) { if ($requestStack instanceof Request) {
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); @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);
$this->session = $requestStack->getSession(); $this->session = $requestStack->getSession();
} elseif ($requestStack instanceof RequestStack) { } elseif ($requestStack instanceof RequestStack) {
$this->requestStack = $requestStack; $this->requestStack = $requestStack;

View File

@ -39,7 +39,7 @@ class LogoutUrlHelper extends Helper
public function __construct($generator, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null) public function __construct($generator, UrlGeneratorInterface $router = null, TokenStorageInterface $tokenStorage = null)
{ {
if ($generator instanceof ContainerInterface) { if ($generator instanceof ContainerInterface) {
trigger_error('The '.__CLASS__.' constructor will require a LogoutUrlGenerator instead of a ContainerInterface instance in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__CLASS__.' constructor will require a LogoutUrlGenerator instead of a ContainerInterface instance in 3.0.', E_USER_DEPRECATED);
if ($generator->has('security.logout_url_generator')) { if ($generator->has('security.logout_url_generator')) {
$this->generator = $generator->get('security.logout_url_generator'); $this->generator = $generator->get('security.logout_url_generator');

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\SecurityBundle\Twig\Extension; namespace Symfony\Bundle\SecurityBundle\Twig\Extension;
trigger_error('The '.__NAMESPACE__.'\LogoutUrlExtension class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Twig\Extension\LogoutUrlExtension instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\LogoutUrlExtension class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Bridge\Twig\Extension\LogoutUrlExtension instead.', E_USER_DEPRECATED);
use Symfony\Bundle\SecurityBundle\Templating\Helper\LogoutUrlHelper; use Symfony\Bundle\SecurityBundle\Templating\Helper\LogoutUrlHelper;

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\TwigBundle\Debug; namespace Symfony\Bundle\TwigBundle\Debug;
trigger_error('The '.__NAMESPACE__.'\TimedTwigEngine class is deprecated since version 2.7 and will be removed in 3.0. Use the Twig native profiler instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\TimedTwigEngine class is deprecated since version 2.7 and will be removed in 3.0. Use the Twig native profiler instead.', E_USER_DEPRECATED);
use Symfony\Bundle\TwigBundle\TwigEngine; use Symfony\Bundle\TwigBundle\TwigEngine;
use Symfony\Component\Templating\TemplateNameParserInterface; use Symfony\Component\Templating\TemplateNameParserInterface;

View File

@ -55,7 +55,7 @@ class Configuration implements ConfigurationInterface
->beforeNormalization() ->beforeNormalization()
->ifTrue(function ($v) { return isset($v['form']['resources']); }) ->ifTrue(function ($v) { return isset($v['form']['resources']); })
->then(function ($v) { ->then(function ($v) {
trigger_error('The twig.form.resources configuration key is deprecated since version 2.6 and will be removed in 3.0. Use the twig.form_themes configuration key instead.', E_USER_DEPRECATED); @trigger_error('The twig.form.resources configuration key is deprecated since version 2.6 and will be removed in 3.0. Use the twig.form_themes configuration key instead.', E_USER_DEPRECATED);
return $v; return $v;
}) })

View File

@ -36,7 +36,7 @@ class ActionsExtension extends \Twig_Extension
if ($handler instanceof FragmentHandler) { if ($handler instanceof FragmentHandler) {
$this->handler = $handler; $this->handler = $handler;
} elseif ($handler instanceof ContainerInterface) { } elseif ($handler instanceof ContainerInterface) {
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); @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);
$this->handler = $handler->get('fragment.handler'); $this->handler = $handler->get('fragment.handler');
} else { } else {
@ -56,7 +56,7 @@ class ActionsExtension extends \Twig_Extension
*/ */
public function renderUri($uri, array $options = array()) public function renderUri($uri, array $options = array())
{ {
trigger_error('The Twig render tag was deprecated in version 2.2 and will be removed in version 3.0. Use the Twig render function instead.', E_USER_DEPRECATED); @trigger_error('The Twig render tag was deprecated in version 2.2 and will be removed in version 3.0. Use the Twig render function instead.', E_USER_DEPRECATED);
$strategy = isset($options['strategy']) ? $options['strategy'] : 'inline'; $strategy = isset($options['strategy']) ? $options['strategy'] : 'inline';
unset($options['strategy']); unset($options['strategy']);

View File

@ -14,7 +14,7 @@ namespace Symfony\Bundle\TwigBundle\Extension;
use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RequestContext;
trigger_error('The '.__NAMESPACE__.'\AssetsExtension class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bridge\Twig\Extension\AssetExtension class instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\AssetsExtension class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bridge\Twig\Extension\AssetExtension class instead.', E_USER_DEPRECATED);
/** /**
* Twig extension for Symfony assets helper. * Twig extension for Symfony assets helper.

View File

@ -11,7 +11,7 @@
namespace Symfony\Bundle\TwigBundle; namespace Symfony\Bundle\TwigBundle;
trigger_error('The '.__NAMESPACE__.'\TwigDefaultEscapingStrategy class is deprecated in version 2.7 and will be removed in version 3.0. Use the "filename" auto-escaping strategy instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\TwigDefaultEscapingStrategy class is deprecated in version 2.7 and will be removed in version 3.0. Use the "filename" auto-escaping strategy instead.', E_USER_DEPRECATED);
/** /**
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>

View File

@ -47,7 +47,7 @@ class TwigEngine extends BaseEngine implements EngineInterface
*/ */
public function setDefaultEscapingStrategy($strategy) public function setDefaultEscapingStrategy($strategy)
{ {
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); @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);
$this->environment->getExtension('escaper')->setDefaultStrategy($strategy); $this->environment->getExtension('escaper')->setDefaultStrategy($strategy);
} }
@ -58,7 +58,7 @@ class TwigEngine extends BaseEngine implements EngineInterface
*/ */
public function guessDefaultEscapingStrategy($filename) public function guessDefaultEscapingStrategy($filename)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Twig_FileExtensionEscapingStrategy::guess method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Twig_FileExtensionEscapingStrategy::guess method instead.', E_USER_DEPRECATED);
return \Twig_FileExtensionEscapingStrategy::guess($filename); return \Twig_FileExtensionEscapingStrategy::guess($filename);
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\ClassLoader; namespace Symfony\Component\ClassLoader;
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); @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);
/** /**
* ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3. * ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3.

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\ClassLoader; namespace Symfony\Component\ClassLoader;
trigger_error('The '.__NAMESPACE__.'\DebugClassLoader 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); @trigger_error('The '.__NAMESPACE__.'\DebugClassLoader 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);
/** /**
* Autoloader checking if the class is really defined in the file found. * Autoloader checking if the class is really defined in the file found.

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\ClassLoader; namespace Symfony\Component\ClassLoader;
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); @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);
/** /**
* Checks that the class is actually declared in the included file. * Checks that the class is actually declared in the included file.

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\ClassLoader; namespace Symfony\Component\ClassLoader;
trigger_error('The '.__NAMESPACE__.'\UniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ClassLoader class instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\UniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ClassLoader class instead.', E_USER_DEPRECATED);
/** /**
* UniversalClassLoader implements a "universal" autoloader for PHP 5.3. * UniversalClassLoader implements a "universal" autoloader for PHP 5.3.

View File

@ -46,7 +46,7 @@ class ConfigCache implements ConfigCacheInterface
*/ */
public function __toString() public function __toString()
{ {
trigger_error('ConfigCache::__toString() is deprecated since version 2.7 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED); @trigger_error('ConfigCache::__toString() is deprecated since version 2.7 and will be removed in 3.0. Use the getPath() method instead.', E_USER_DEPRECATED);
return $this->file; return $this->file;
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Config\Definition; namespace Symfony\Component\Config\Definition;
trigger_error('The '.__NAMESPACE__.'\ReferenceDumper class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper class instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\ReferenceDumper class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper class instead.', E_USER_DEPRECATED);
use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper;

View File

@ -628,7 +628,7 @@ class Application
*/ */
public function asText($namespace = null, $raw = false) public function asText($namespace = null, $raw = false)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
$descriptor = new TextDescriptor(); $descriptor = new TextDescriptor();
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, !$raw); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, !$raw);
@ -649,7 +649,7 @@ class Application
*/ */
public function asXml($namespace = null, $asDom = false) public function asXml($namespace = null, $asDom = false)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
$descriptor = new XmlDescriptor(); $descriptor = new XmlDescriptor();

View File

@ -645,7 +645,7 @@ class Command
*/ */
public function asText() public function asText()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
$descriptor = new TextDescriptor(); $descriptor = new TextDescriptor();
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
@ -665,7 +665,7 @@ class Command
*/ */
public function asXml($asDom = false) public function asXml($asDom = false)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
$descriptor = new XmlDescriptor(); $descriptor = new XmlDescriptor();

View File

@ -77,7 +77,7 @@ EOF
} }
if ($input->getOption('xml')) { if ($input->getOption('xml')) {
trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED); @trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
$input->setOption('format', 'xml'); $input->setOption('format', 'xml');
} }

View File

@ -69,7 +69,7 @@ EOF
protected function execute(InputInterface $input, OutputInterface $output) protected function execute(InputInterface $input, OutputInterface $output)
{ {
if ($input->getOption('xml')) { if ($input->getOption('xml')) {
trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED); @trigger_error('The --xml option was deprecated in version 2.7 and will be removed in version 3.0. Use the --format option instead.', E_USER_DEPRECATED);
$input->setOption('format', 'xml'); $input->setOption('format', 'xml');
} }

View File

@ -31,7 +31,7 @@ class DialogHelper extends InputAwareHelper
public function __construct($triggerDeprecationError = true) public function __construct($triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED); @trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED);
} }
} }

View File

@ -79,11 +79,11 @@ class HelperSet implements \IteratorAggregate
} }
if ('dialog' === $name && $this->helpers[$name] instanceof DialogHelper) { if ('dialog' === $name && $this->helpers[$name] instanceof DialogHelper) {
trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED); @trigger_error('"Symfony\Component\Console\Helper\DialogHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\QuestionHelper" instead.', E_USER_DEPRECATED);
} elseif ('progress' === $name && $this->helpers[$name] instanceof ProgressHelper) { } elseif ('progress' === $name && $this->helpers[$name] instanceof ProgressHelper) {
trigger_error('"Symfony\Component\Console\Helper\ProgressHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\ProgressBar" instead.', E_USER_DEPRECATED); @trigger_error('"Symfony\Component\Console\Helper\ProgressHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\ProgressBar" instead.', E_USER_DEPRECATED);
} elseif ('table' === $name && $this->helpers[$name] instanceof TableHelper) { } elseif ('table' === $name && $this->helpers[$name] instanceof TableHelper) {
trigger_error('"Symfony\Component\Console\Helper\TableHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\Table" instead.', E_USER_DEPRECATED); @trigger_error('"Symfony\Component\Console\Helper\TableHelper" is deprecated since version 2.5 and will be removed in 3.0. Use "Symfony\Component\Console\Helper\Table" instead.', E_USER_DEPRECATED);
} }
return $this->helpers[$name]; return $this->helpers[$name];

View File

@ -177,7 +177,7 @@ class ProgressBar
*/ */
public function getStep() public function getStep()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getProgress() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getProgress() method instead.', E_USER_DEPRECATED);
return $this->getProgress(); return $this->getProgress();
} }
@ -368,7 +368,7 @@ class ProgressBar
*/ */
public function setCurrent($step) public function setCurrent($step)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setProgress() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setProgress() method instead.', E_USER_DEPRECATED);
$this->setProgress($step); $this->setProgress($step);
} }

View File

@ -121,7 +121,7 @@ class ProgressHelper extends Helper
public function __construct($triggerDeprecationError = true) public function __construct($triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\ProgressBar class instead.', E_USER_DEPRECATED); @trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\ProgressBar class instead.', E_USER_DEPRECATED);
} }
} }

View File

@ -37,7 +37,7 @@ class TableHelper extends Helper
public function __construct($triggerDeprecationError = true) public function __construct($triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\Table class instead.', E_USER_DEPRECATED); @trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Console\Helper\Table class instead.', E_USER_DEPRECATED);
} }
$this->table = new Table(new NullOutput()); $this->table = new Table(new NullOutput());

View File

@ -449,7 +449,7 @@ class InputDefinition
*/ */
public function asText() public function asText()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
$descriptor = new TextDescriptor(); $descriptor = new TextDescriptor();
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
@ -469,7 +469,7 @@ class InputDefinition
*/ */
public function asXml($asDom = false) public function asXml($asDom = false)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED);
$descriptor = new XmlDescriptor(); $descriptor = new XmlDescriptor();

View File

@ -40,7 +40,7 @@ class StringInput extends ArgvInput
public function __construct($input, InputDefinition $definition = null) public function __construct($input, InputDefinition $definition = null)
{ {
if ($definition) { if ($definition) {
trigger_error('The $definition argument of the '.__METHOD__.' method is deprecated and will be removed in 3.0. Set this parameter with the bind() method instead.', E_USER_DEPRECATED); @trigger_error('The $definition argument of the '.__METHOD__.' method is deprecated and will be removed in 3.0. Set this parameter with the bind() method instead.', E_USER_DEPRECATED);
} }
parent::__construct(array(), null); parent::__construct(array(), null);

View File

@ -45,7 +45,7 @@ class DebugClassLoader
$this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile'); $this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile');
if ($this->wasFinder) { if ($this->wasFinder) {
trigger_error('The '.__METHOD__.' method will no longer support receiving an object into its $classLoader argument in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method will no longer support receiving an object into its $classLoader argument in 3.0.', E_USER_DEPRECATED);
$this->classLoader = array($classLoader, 'loadClass'); $this->classLoader = array($classLoader, 'loadClass');
$this->isFinder = true; $this->isFinder = true;
} else { } else {
@ -127,7 +127,7 @@ class DebugClassLoader
*/ */
public function findFile($class) public function findFile($class)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
if ($this->wasFinder) { if ($this->wasFinder) {
return $this->classLoader[0]->findFile($class); return $this->classLoader[0]->findFile($class);
@ -200,12 +200,12 @@ class DebugClassLoader
if (!$parent || strncmp($ns, $parent->name, $len)) { if (!$parent || strncmp($ns, $parent->name, $len)) {
if ($parent && isset(self::$deprecated[$parent->name]) && strncmp($ns, $parent->name, $len)) { if ($parent && isset(self::$deprecated[$parent->name]) && strncmp($ns, $parent->name, $len)) {
trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED); @trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED);
} }
foreach ($refl->getInterfaceNames() as $interface) { foreach ($refl->getInterfaceNames() as $interface) {
if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len) && !($parent && $parent->implementsInterface($interface))) { if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len) && !($parent && $parent->implementsInterface($interface))) {
trigger_error(sprintf('The %s %s %s that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED); @trigger_error(sprintf('The %s %s %s that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED);
} }
} }
} }

View File

@ -611,7 +611,7 @@ class ErrorHandler
*/ */
public function setLevel($level) public function setLevel($level)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
$level = null === $level ? error_reporting() : $level; $level = null === $level ? error_reporting() : $level;
$this->throwAt($level, true); $this->throwAt($level, true);
@ -626,7 +626,7 @@ class ErrorHandler
*/ */
public function setDisplayErrors($displayErrors) public function setDisplayErrors($displayErrors)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the throwAt() method instead.', E_USER_DEPRECATED);
if ($displayErrors) { if ($displayErrors) {
$this->throwAt($this->displayErrors, true); $this->throwAt($this->displayErrors, true);
@ -647,7 +647,7 @@ class ErrorHandler
*/ */
public static function setLogger(LoggerInterface $logger, $channel = 'deprecation') public static function setLogger(LoggerInterface $logger, $channel = 'deprecation')
{ {
trigger_error('The '.__METHOD__.' static method is deprecated since version 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' static method is deprecated since version 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED);
$handler = set_error_handler('var_dump', 0); $handler = set_error_handler('var_dump', 0);
$handler = is_array($handler) ? $handler[0] : null; $handler = is_array($handler) ? $handler[0] : null;
@ -684,7 +684,7 @@ class ErrorHandler
*/ */
public function handleFatal() public function handleFatal()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleFatalError() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleFatalError() method instead.', E_USER_DEPRECATED);
static::handleFatalError(); static::handleFatalError();
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Debug\Exception; namespace Symfony\Component\Debug\Exception;
trigger_error('The '.__NAMESPACE__.'\DummyException class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\DummyException class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
/** /**
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>

View File

@ -428,7 +428,7 @@ EOF;
*/ */
protected static function utf8Htmlize($str) protected static function utf8Htmlize($str)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
return htmlspecialchars($str, ENT_QUOTES | (PHP_VERSION_ID >= 50400 ? ENT_SUBSTITUTE : 0), 'UTF-8'); return htmlspecialchars($str, ENT_QUOTES | (PHP_VERSION_ID >= 50400 ? ENT_SUBSTITUTE : 0), 'UTF-8');
} }

View File

@ -1127,7 +1127,7 @@ class ContainerBuilder extends Container implements TaggedContainerInterface
private function synchronize($id) private function synchronize($id)
{ {
if ('request' !== $id) { if ('request' !== $id) {
trigger_error('The '.__METHOD__.' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated in version 2.7 and will be removed in version 3.0.', E_USER_DEPRECATED);
} }
foreach ($this->definitions as $definitionId => $definition) { foreach ($this->definitions as $definitionId => $definition) {

View File

@ -98,7 +98,7 @@ class Definition
*/ */
public function setFactoryClass($factoryClass) public function setFactoryClass($factoryClass)
{ {
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryClass), E_USER_DEPRECATED); @trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryClass), E_USER_DEPRECATED);
$this->factoryClass = $factoryClass; $this->factoryClass = $factoryClass;
@ -116,7 +116,7 @@ class Definition
public function getFactoryClass($triggerDeprecationError = true) public function getFactoryClass($triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
} }
return $this->factoryClass; return $this->factoryClass;
@ -134,7 +134,7 @@ class Definition
*/ */
public function setFactoryMethod($factoryMethod) public function setFactoryMethod($factoryMethod)
{ {
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryMethod), E_USER_DEPRECATED); @trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryMethod), E_USER_DEPRECATED);
$this->factoryMethod = $factoryMethod; $this->factoryMethod = $factoryMethod;
@ -187,7 +187,7 @@ class Definition
public function getFactoryMethod($triggerDeprecationError = true) public function getFactoryMethod($triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
} }
return $this->factoryMethod; return $this->factoryMethod;
@ -205,7 +205,7 @@ class Definition
*/ */
public function setFactoryService($factoryService) public function setFactoryService($factoryService)
{ {
trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryService), E_USER_DEPRECATED); @trigger_error(sprintf('%s(%s) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', __METHOD__, $factoryService), E_USER_DEPRECATED);
$this->factoryService = $factoryService; $this->factoryService = $factoryService;
@ -223,7 +223,7 @@ class Definition
public function getFactoryService($triggerDeprecationError = true) public function getFactoryService($triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
} }
return $this->factoryService; return $this->factoryService;
@ -667,7 +667,7 @@ class Definition
public function setSynchronized($boolean, $triggerDeprecationError = true) public function setSynchronized($boolean, $triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
} }
$this->synchronized = (bool) $boolean; $this->synchronized = (bool) $boolean;
@ -687,7 +687,7 @@ class Definition
public function isSynchronized($triggerDeprecationError = true) public function isSynchronized($triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0.', E_USER_DEPRECATED);
} }
return $this->synchronized; return $this->synchronized;

View File

@ -705,7 +705,7 @@ EOF;
} }
if ('request' !== $id) { if ('request' !== $id) {
trigger_error('Synchronized services were deprecated in version 2.7 and won\'t work anymore in 3.0.', E_USER_DEPRECATED); @trigger_error('Synchronized services were deprecated in version 2.7 and won\'t work anymore in 3.0.', E_USER_DEPRECATED);
} }
$code = ''; $code = '';
@ -1414,7 +1414,7 @@ EOF;
*/ */
public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6.2 and will be removed in 3.0. Use the Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.6.2 and will be removed in 3.0. Use the Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider method instead.', E_USER_DEPRECATED);
$this->expressionLanguageProviders[] = $provider; $this->expressionLanguageProviders[] = $provider;
} }

View File

@ -151,7 +151,7 @@ class XmlFileLoader extends FileLoader
foreach (array('class', 'scope', 'public', 'factory-class', 'factory-method', 'factory-service', 'synthetic', 'lazy', 'abstract') as $key) { foreach (array('class', 'scope', 'public', 'factory-class', 'factory-method', 'factory-service', 'synthetic', 'lazy', 'abstract') as $key) {
if ($value = $service->getAttribute($key)) { if ($value = $service->getAttribute($key)) {
if (in_array($key, array('factory-class', 'factory-method', 'factory-service'))) { if (in_array($key, array('factory-class', 'factory-method', 'factory-service'))) {
trigger_error(sprintf('The "%s" attribute in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use the "factory" element instead.', $key, $file), E_USER_DEPRECATED); @trigger_error(sprintf('The "%s" attribute in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use the "factory" element instead.', $key, $file), E_USER_DEPRECATED);
} }
$method = 'set'.str_replace('-', '', $key); $method = 'set'.str_replace('-', '', $key);
$definition->$method(XmlUtils::phpize($value)); $definition->$method(XmlUtils::phpize($value));
@ -162,7 +162,7 @@ class XmlFileLoader extends FileLoader
$triggerDeprecation = 'request' !== (string) $service->getAttribute('id'); $triggerDeprecation = 'request' !== (string) $service->getAttribute('id');
if ($triggerDeprecation) { if ($triggerDeprecation) {
trigger_error(sprintf('The "synchronized" attribute in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $file), E_USER_DEPRECATED); @trigger_error(sprintf('The "synchronized" attribute in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $file), E_USER_DEPRECATED);
} }
$definition->setSynchronized(XmlUtils::phpize($value), $triggerDeprecation); $definition->setSynchronized(XmlUtils::phpize($value), $triggerDeprecation);

View File

@ -172,7 +172,7 @@ class YamlFileLoader extends FileLoader
} }
if (isset($service['synchronized'])) { if (isset($service['synchronized'])) {
trigger_error(sprintf('The "synchronized" key in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $file), E_USER_DEPRECATED); @trigger_error(sprintf('The "synchronized" key in file "%s" is deprecated since version 2.7 and will be removed in 3.0.', $file), E_USER_DEPRECATED);
$definition->setSynchronized($service['synchronized'], 'request' !== $id); $definition->setSynchronized($service['synchronized'], 'request' !== $id);
} }
@ -202,17 +202,17 @@ class YamlFileLoader extends FileLoader
} }
if (isset($service['factory_class'])) { if (isset($service['factory_class'])) {
trigger_error(sprintf('The "factory_class" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED); @trigger_error(sprintf('The "factory_class" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
$definition->setFactoryClass($service['factory_class']); $definition->setFactoryClass($service['factory_class']);
} }
if (isset($service['factory_method'])) { if (isset($service['factory_method'])) {
trigger_error(sprintf('The "factory_method" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED); @trigger_error(sprintf('The "factory_method" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
$definition->setFactoryMethod($service['factory_method']); $definition->setFactoryMethod($service['factory_method']);
} }
if (isset($service['factory_service'])) { if (isset($service['factory_service'])) {
trigger_error(sprintf('The "factory_service" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED); @trigger_error(sprintf('The "factory_service" key in file "%s" is deprecated since version 2.6 and will be removed in 3.0. Use "factory" instead.', $file), E_USER_DEPRECATED);
$definition->setFactoryService($service['factory_service']); $definition->setFactoryService($service['factory_service']);
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\DependencyInjection; namespace Symfony\Component\DependencyInjection;
trigger_error('The '.__NAMESPACE__.'\SimpleXMLElement method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\SimpleXMLElement method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
use Symfony\Component\Config\Util\XmlUtils; use Symfony\Component\Config\Util\XmlUtils;
use Symfony\Component\ExpressionLanguage\Expression; use Symfony\Component\ExpressionLanguage\Expression;

View File

@ -97,7 +97,7 @@ class Event
*/ */
public function getDispatcher() public function getDispatcher()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED);
return $this->dispatcher; return $this->dispatcher;
} }
@ -113,7 +113,7 @@ class Event
*/ */
public function getName() public function getName()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED);
return $this->name; return $this->name;
} }

View File

@ -477,7 +477,7 @@ class Filesystem
$this->rename($tmpFile, $filename, true); $this->rename($tmpFile, $filename, true);
if (null !== $mode) { if (null !== $mode) {
if (func_num_args() > 2) { if (func_num_args() > 2) {
trigger_error('Support for modifying file permissions is deprecated since version 2.3.12 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('Support for modifying file permissions is deprecated since version 2.3.12 and will be removed in 3.0.', E_USER_DEPRECATED);
} }
$this->chmod($filename, $mode); $this->chmod($filename, $mode);

View File

@ -597,7 +597,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface
*/ */
public function getVirtual() public function getVirtual()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\FormConfigBuilder::getInheritData method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\FormConfigBuilder::getInheritData method instead.', E_USER_DEPRECATED);
return false; return false;
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Deprecated; namespace Symfony\Component\Form\Deprecated;
trigger_error('Constants PRE_BIND, BIND and POST_BIND in class Symfony\Component\Form\FormEvents are deprecated since version 2.3 and will be removed in 3.0. Use PRE_SUBMIT, SUBMIT and POST_SUBMIT instead.', E_USER_DEPRECATED); @trigger_error('Constants PRE_BIND, BIND and POST_BIND in class Symfony\Component\Form\FormEvents are deprecated since version 2.3 and will be removed in 3.0. Use PRE_SUBMIT, SUBMIT and POST_SUBMIT instead.', E_USER_DEPRECATED);
/** /**
* @deprecated since version 2.7, to be removed in 3.0. * @deprecated since version 2.7, to be removed in 3.0.

View File

@ -22,7 +22,7 @@ class AlreadyBoundException extends LogicException
public function __construct($message = '', $code = 0, \Exception $previous = null) public function __construct($message = '', $code = 0, \Exception $previous = null)
{ {
if (__CLASS__ === get_class($this)) { if (__CLASS__ === get_class($this)) {
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Exception\AlreadySubmittedException class instead.', E_USER_DEPRECATED); @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Exception\AlreadySubmittedException class instead.', E_USER_DEPRECATED);
} }
parent::__construct($message, $code, $previous); parent::__construct($message, $code, $previous);

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\ChoiceList; namespace Symfony\Component\Form\Extension\Core\ChoiceList;
trigger_error('The '.__NAMESPACE__.'\ChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\ChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
use Symfony\Component\Form\FormConfigBuilder; use Symfony\Component\Form\FormConfigBuilder;
use Symfony\Component\Form\Exception\UnexpectedTypeException; use Symfony\Component\Form\Exception\UnexpectedTypeException;
@ -208,7 +208,7 @@ class ChoiceList implements ChoiceListInterface
*/ */
public function getIndicesForChoices(array $choices) public function getIndicesForChoices(array $choices)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
$choices = $this->fixChoices($choices); $choices = $this->fixChoices($choices);
$indices = array(); $indices = array();
@ -236,7 +236,7 @@ class ChoiceList implements ChoiceListInterface
*/ */
public function getIndicesForValues(array $values) public function getIndicesForValues(array $values)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
$values = $this->fixValues($values); $values = $this->fixValues($values);
$indices = array(); $indices = array();

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\ChoiceList; namespace Symfony\Component\Form\Extension\Core\ChoiceList;
trigger_error('The '.__NAMESPACE__.'\LazyChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\LazyChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
use Symfony\Component\Form\Exception\InvalidArgumentException; use Symfony\Component\Form\Exception\InvalidArgumentException;
@ -115,7 +115,7 @@ abstract class LazyChoiceList implements ChoiceListInterface
*/ */
public function getIndicesForChoices(array $choices) public function getIndicesForChoices(array $choices)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
if (!$this->choiceList) { if (!$this->choiceList) {
$this->load(); $this->load();
@ -131,7 +131,7 @@ abstract class LazyChoiceList implements ChoiceListInterface
*/ */
public function getIndicesForValues(array $values) public function getIndicesForValues(array $values)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
if (!$this->choiceList) { if (!$this->choiceList) {
$this->load(); $this->load();

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\ChoiceList; namespace Symfony\Component\Form\Extension\Core\ChoiceList;
trigger_error('The '.__NAMESPACE__.'\ObjectChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\ObjectChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
use Symfony\Component\Form\Exception\StringCastException; use Symfony\Component\Form\Exception\StringCastException;
use Symfony\Component\Form\Exception\InvalidArgumentException; use Symfony\Component\Form\Exception\InvalidArgumentException;
@ -196,7 +196,7 @@ class ObjectChoiceList extends ChoiceList
*/ */
public function getIndicesForChoices(array $choices) public function getIndicesForChoices(array $choices)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
if (!$this->valuePath) { if (!$this->valuePath) {
return parent::getIndicesForChoices($choices); return parent::getIndicesForChoices($choices);

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\ChoiceList; namespace Symfony\Component\Form\Extension\Core\ChoiceList;
trigger_error('The '.__NAMESPACE__.'\SimpleChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\SimpleChoiceList class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\ArrayChoiceList instead.', E_USER_DEPRECATED);
/** /**
* A choice list for choices of type string or integer. * A choice list for choices of type string or integer.

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\DataTransformer; namespace Symfony\Component\Form\Extension\Core\DataTransformer;
trigger_error('The class '.__NAMESPACE__.'\ChoiceToBooleanArrayTransformer is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper instead.', E_USER_DEPRECATED); @trigger_error('The class '.__NAMESPACE__.'\ChoiceToBooleanArrayTransformer is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper instead.', E_USER_DEPRECATED);
use Symfony\Component\Form\ChoiceList\ChoiceListInterface; use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\DataTransformerInterface;

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\DataTransformer; namespace Symfony\Component\Form\Extension\Core\DataTransformer;
trigger_error('The class '.__NAMESPACE__.'\ChoicesToBooleanArrayTransformer is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper instead.', E_USER_DEPRECATED); @trigger_error('The class '.__NAMESPACE__.'\ChoicesToBooleanArrayTransformer is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper instead.', E_USER_DEPRECATED);
use Symfony\Component\Form\ChoiceList\ChoiceListInterface; use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
use Symfony\Component\Form\DataTransformerInterface; use Symfony\Component\Form\DataTransformerInterface;

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\EventListener; namespace Symfony\Component\Form\Extension\Core\EventListener;
trigger_error('The class '.__NAMESPACE__.'\FixCheckboxInputListener is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper instead.', E_USER_DEPRECATED); @trigger_error('The class '.__NAMESPACE__.'\FixCheckboxInputListener is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\CheckboxListMapper instead.', E_USER_DEPRECATED);
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\ChoiceList\ChoiceListInterface; use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
@ -91,7 +91,7 @@ class FixCheckboxInputListener implements EventSubscriberInterface
*/ */
public function preBind(FormEvent $event) public function preBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
$this->preSubmit($event); $this->preSubmit($event);
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\EventListener; namespace Symfony\Component\Form\Extension\Core\EventListener;
trigger_error('The class '.__NAMESPACE__.'\FixRadioInputListener is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper instead.', E_USER_DEPRECATED); @trigger_error('The class '.__NAMESPACE__.'\FixRadioInputListener is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\Extension\Core\DataMapper\RadioListMapper instead.', E_USER_DEPRECATED);
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\Form\ChoiceList\ChoiceListInterface; use Symfony\Component\Form\ChoiceList\ChoiceListInterface;
@ -73,7 +73,7 @@ class FixRadioInputListener implements EventSubscriberInterface
*/ */
public function preBind(FormEvent $event) public function preBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
$this->preSubmit($event); $this->preSubmit($event);
} }

View File

@ -51,7 +51,7 @@ class FixUrlProtocolListener implements EventSubscriberInterface
*/ */
public function onBind(FormEvent $event) public function onBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
$this->onSubmit($event); $this->onSubmit($event);
} }

View File

@ -134,7 +134,7 @@ class MergeCollectionListener implements EventSubscriberInterface
*/ */
public function onBind(FormEvent $event) public function onBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
$this->onSubmit($event); $this->onSubmit($event);
} }

View File

@ -189,7 +189,7 @@ class ResizeFormListener implements EventSubscriberInterface
*/ */
public function preBind(FormEvent $event) public function preBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
$this->preSubmit($event); $this->preSubmit($event);
} }
@ -202,7 +202,7 @@ class ResizeFormListener implements EventSubscriberInterface
*/ */
public function onBind(FormEvent $event) public function onBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED);
$this->onSubmit($event); $this->onSubmit($event);
} }

View File

@ -45,7 +45,7 @@ class TrimListener implements EventSubscriberInterface
*/ */
public function preBind(FormEvent $event) public function preBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
$this->preSubmit($event); $this->preSubmit($event);
} }

View File

@ -258,7 +258,7 @@ class ChoiceType extends AbstractType
$choiceListNormalizer = function (Options $options, $choiceList) use ($choiceListFactory) { $choiceListNormalizer = function (Options $options, $choiceList) use ($choiceListFactory) {
if ($choiceList) { if ($choiceList) {
trigger_error('The "choice_list" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_loader" instead.', E_USER_DEPRECATED); @trigger_error('The "choice_list" option is deprecated since version 2.7 and will be removed in 3.0. Use "choice_loader" instead.', E_USER_DEPRECATED);
return $choiceList; return $choiceList;
} }

View File

@ -155,7 +155,7 @@ class FormType extends BaseType
// BC with old "virtual" option // BC with old "virtual" option
$inheritData = function (Options $options) { $inheritData = function (Options $options) {
if (null !== $options['virtual']) { if (null !== $options['virtual']) {
trigger_error('The form option "virtual" is deprecated since version 2.3 and will be removed in 3.0. Use "inherit_data" instead.', E_USER_DEPRECATED); @trigger_error('The form option "virtual" is deprecated since version 2.3 and will be removed in 3.0. Use "inherit_data" instead.', E_USER_DEPRECATED);
return $options['virtual']; return $options['virtual'];
} }

View File

@ -39,7 +39,7 @@ class IntegerType extends AbstractType
{ {
$scale = function (Options $options) { $scale = function (Options $options) {
if (null !== $options['precision']) { if (null !== $options['precision']) {
trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED); @trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
} }
return $options['precision']; return $options['precision'];

View File

@ -53,7 +53,7 @@ class MoneyType extends AbstractType
{ {
$scale = function (Options $options) { $scale = function (Options $options) {
if (null !== $options['precision']) { if (null !== $options['precision']) {
trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED); @trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
return $options['precision']; return $options['precision'];
} }

View File

@ -38,7 +38,7 @@ class NumberType extends AbstractType
{ {
$scale = function (Options $options) { $scale = function (Options $options) {
if (null !== $options['precision']) { if (null !== $options['precision']) {
trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED); @trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
} }
return $options['precision']; return $options['precision'];

View File

@ -34,7 +34,7 @@ class PercentType extends AbstractType
{ {
$scale = function (Options $options) { $scale = function (Options $options) {
if (null !== $options['precision']) { if (null !== $options['precision']) {
trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED); @trigger_error('The form option "precision" is deprecated since version 2.7 and will be removed in 3.0. Use "scale" instead.', E_USER_DEPRECATED);
return $options['precision']; return $options['precision'];
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Core\View; namespace Symfony\Component\Form\Extension\Core\View;
trigger_error('The '.__NAMESPACE__.'\ChoiceView class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\View\ChoiceView instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\ChoiceView class is deprecated since version 2.7 and will be removed in 3.0. Use Symfony\Component\Form\ChoiceList\View\ChoiceView instead.', E_USER_DEPRECATED);
/** /**
* Represents a choice in templates. * Represents a choice in templates.

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider;
trigger_error('The '.__NAMESPACE__.'\CsrfProviderAdapter class is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\CsrfProviderAdapter class is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
use Symfony\Component\Form\Exception\BadMethodCallException; use Symfony\Component\Form\Exception\BadMethodCallException;
use Symfony\Component\Security\Csrf\CsrfToken; use Symfony\Component\Security\Csrf\CsrfToken;

View File

@ -37,7 +37,7 @@ class CsrfTokenManagerAdapter implements CsrfProviderInterface
public function getTokenManager($triggerDeprecationError = true) public function getTokenManager($triggerDeprecationError = true)
{ {
if ($triggerDeprecationError) { if ($triggerDeprecationError) {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
} }
return $this->tokenManager; return $this->tokenManager;
@ -48,7 +48,7 @@ class CsrfTokenManagerAdapter implements CsrfProviderInterface
*/ */
public function generateCsrfToken($intention) public function generateCsrfToken($intention)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
return $this->tokenManager->getToken($intention)->getValue(); return $this->tokenManager->getToken($intention)->getValue();
} }
@ -58,7 +58,7 @@ class CsrfTokenManagerAdapter implements CsrfProviderInterface
*/ */
public function isCsrfTokenValid($intention, $token) public function isCsrfTokenValid($intention, $token)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManager class instead.', E_USER_DEPRECATED);
return $this->tokenManager->isTokenValid(new CsrfToken($intention, $token)); return $this->tokenManager->isTokenValid(new CsrfToken($intention, $token));
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider;
trigger_error('The '.__NAMESPACE__.'\DefaultCsrfProvider is deprecated since version 2.4 and will be removed in version 3.0. Use the \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage class instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\DefaultCsrfProvider is deprecated since version 2.4 and will be removed in version 3.0. Use the \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage class instead.', E_USER_DEPRECATED);
/** /**
* Default implementation of CsrfProviderInterface. * Default implementation of CsrfProviderInterface.

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider;
trigger_error('The '.__NAMESPACE__.'\SessionCsrfProvider is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage class instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\SessionCsrfProvider is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage class instead.', E_USER_DEPRECATED);
use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Session;

View File

@ -123,7 +123,7 @@ class CsrfValidationListener implements EventSubscriberInterface
*/ */
public function preBind(FormEvent $event) public function preBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
$this->preSubmit($event); $this->preSubmit($event);
} }

View File

@ -42,10 +42,10 @@ class BindRequestListener implements EventSubscriberInterface
return; return;
} }
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Pass the Request instance to the \Symfony\Component\Form\Form::handleRequest() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Pass the Request instance to the \Symfony\Component\Form\Form::handleRequest() method instead.', E_USER_DEPRECATED);
// Uncomment this as soon as the deprecation note should be shown // Uncomment this as soon as the deprecation note should be shown
// trigger_error('Passing a Request instance to Form::submit() is deprecated since version 2.3 and will be disabled in 3.0. Call Form::process($request) instead.', E_USER_DEPRECATED); // @trigger_error('Passing a Request instance to Form::submit() is deprecated since version 2.3 and will be disabled in 3.0. Call Form::process($request) instead.', E_USER_DEPRECATED);
$name = $form->getConfig()->getName(); $name = $form->getConfig()->getName();
$default = $form->getConfig()->getCompound() ? array() : null; $default = $form->getConfig()->getCompound() ? array() : null;

View File

@ -507,7 +507,7 @@ class Form implements \IteratorAggregate, FormInterface
public function submit($submittedData, $clearMissing = true) public function submit($submittedData, $clearMissing = true)
{ {
if ($submittedData instanceof Request) { if ($submittedData instanceof Request) {
trigger_error('Passing a Symfony\Component\HttpFoundation\Request object to the '.__CLASS__.'::bind and '.__METHOD__.' methods is deprecated since 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::handleRequest method instead. If you want to test whether the form was submitted separately, you can use the '.__CLASS__.'::isSubmitted method.', E_USER_DEPRECATED); @trigger_error('Passing a Symfony\Component\HttpFoundation\Request object to the '.__CLASS__.'::bind and '.__METHOD__.' methods is deprecated since 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::handleRequest method instead. If you want to test whether the form was submitted separately, you can use the '.__CLASS__.'::isSubmitted method.', E_USER_DEPRECATED);
} }
if ($this->submitted) { if ($this->submitted) {
@ -684,7 +684,7 @@ class Form implements \IteratorAggregate, FormInterface
// This method is deprecated for Request too, but the error is // This method is deprecated for Request too, but the error is
// triggered in Form::submit() method. // triggered in Form::submit() method.
if (!$submittedData instanceof Request) { if (!$submittedData instanceof Request) {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::submit method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::submit method instead.', E_USER_DEPRECATED);
} }
return $this->submit($submittedData); return $this->submit($submittedData);
@ -724,7 +724,7 @@ class Form implements \IteratorAggregate, FormInterface
*/ */
public function isBound() public function isBound()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::isSubmitted method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the '.__CLASS__.'::isSubmitted method instead.', E_USER_DEPRECATED);
return $this->submitted; return $this->submitted;
} }
@ -848,7 +848,7 @@ class Form implements \IteratorAggregate, FormInterface
*/ */
public function getErrorsAsString($level = 0) public function getErrorsAsString($level = 0)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use (string) Form::getErrors(true, false) instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use (string) Form::getErrors(true, false) instead.', E_USER_DEPRECATED);
return self::indent((string) $this->getErrors(true, false), $level); return self::indent((string) $this->getErrors(true, false), $level);
} }

View File

@ -356,7 +356,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
*/ */
public function getVirtual() public function getVirtual()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::getInheritData() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::getInheritData() method instead.', E_USER_DEPRECATED);
return $this->getInheritData(); return $this->getInheritData();
} }
@ -722,7 +722,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface
*/ */
public function setVirtual($inheritData) public function setVirtual($inheritData)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::setInheritData() method instead.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::setInheritData() method instead.', E_USER_DEPRECATED);
$this->setInheritData($inheritData); $this->setInheritData($inheritData);
} }

View File

@ -212,7 +212,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface
$isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractType'; $isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractType';
if ($isOldOverwritten && !$isNewOverwritten) { if ($isOldOverwritten && !$isNewOverwritten) {
trigger_error('The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.', E_USER_DEPRECATED); @trigger_error('The FormTypeInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeInterface with Symfony 3.0.', E_USER_DEPRECATED);
} }
foreach ($this->typeExtensions as $extension) { foreach ($this->typeExtensions as $extension) {
@ -225,7 +225,7 @@ class ResolvedFormType implements ResolvedFormTypeInterface
$isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractTypeExtension'; $isNewOverwritten = $reflector->getDeclaringClass()->getName() !== 'Symfony\Component\Form\AbstractTypeExtension';
if ($isOldOverwritten && !$isNewOverwritten) { if ($isOldOverwritten && !$isNewOverwritten) {
trigger_error('The FormTypeExtensionInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeExtensionInterface with Symfony 3.0.', E_USER_DEPRECATED); @trigger_error('The FormTypeExtensionInterface::setDefaultOptions() method is deprecated since version 2.7 and will be removed in 3.0. Use configureOptions() instead. This method will be added to the FormTypeExtensionInterface with Symfony 3.0.', E_USER_DEPRECATED);
} }
} }
} }

View File

@ -21,7 +21,7 @@ abstract class TypeTestCase extends BaseTypeTestCase
{ {
protected function setUp() protected function setUp()
{ {
trigger_error('Abstract class '.__CLASS__.' is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\TypeTestCase class instead.', E_USER_DEPRECATED); @trigger_error('Abstract class '.__CLASS__.' is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\TypeTestCase class instead.', E_USER_DEPRECATED);
parent::setUp(); parent::setUp();
} }
} }

View File

@ -24,7 +24,7 @@ abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase
*/ */
protected function setUp() protected function setUp()
{ {
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormIntegrationTestCase class instead.', E_USER_DEPRECATED); @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormIntegrationTestCase class instead.', E_USER_DEPRECATED);
parent::setUp(); parent::setUp();
} }
} }

View File

@ -24,7 +24,7 @@ abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase
*/ */
protected function setUp() protected function setUp()
{ {
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormPerformanceTestCase class instead.', E_USER_DEPRECATED); @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Test\FormPerformanceTestCase class instead.', E_USER_DEPRECATED);
parent::setUp(); parent::setUp();
} }
} }

View File

@ -34,7 +34,7 @@ class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIt
* forces this argument to false. * forces this argument to false.
*/ */
if (__CLASS__ === get_class($this)) { if (__CLASS__ === get_class($this)) {
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Util\InheritDataAwareIterator class instead.', E_USER_DEPRECATED); @trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Util\InheritDataAwareIterator class instead.', E_USER_DEPRECATED);
} }
parent::__construct($iterator); parent::__construct($iterator);

View File

@ -175,7 +175,7 @@ class FlashBag implements FlashBagInterface, \IteratorAggregate
*/ */
public function getIterator() public function getIterator()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
return new \ArrayIterator($this->all()); return new \ArrayIterator($this->all());
} }

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
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); @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);
/** /**
* Session handler using a PDO connection to read and write data. * Session handler using a PDO connection to read and write data.

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\HttpKernel\Debug; namespace Symfony\Component\HttpKernel\Debug;
trigger_error('The '.__NAMESPACE__.'\ErrorHandler class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\ErrorHandler class instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\ErrorHandler class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\ErrorHandler class instead.', E_USER_DEPRECATED);
use Symfony\Component\Debug\ErrorHandler as DebugErrorHandler; use Symfony\Component\Debug\ErrorHandler as DebugErrorHandler;

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\HttpKernel\Debug; namespace Symfony\Component\HttpKernel\Debug;
trigger_error('The '.__NAMESPACE__.'\ExceptionHandler class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\ExceptionHandler class instead.', E_USER_DEPRECATED); @trigger_error('The '.__NAMESPACE__.'\ExceptionHandler class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\ExceptionHandler class instead.', E_USER_DEPRECATED);
use Symfony\Component\Debug\ExceptionHandler as DebugExceptionHandler; use Symfony\Component\Debug\ExceptionHandler as DebugExceptionHandler;

View File

@ -38,7 +38,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
*/ */
public function setProfiler(Profiler $profiler = null) public function setProfiler(Profiler $profiler = null)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); @trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
} }
/** /**

Some files were not shown because too many files have changed in this diff Show More