diff --git a/src/Symfony/Bridge/Doctrine/CHANGELOG.md b/src/Symfony/Bridge/Doctrine/CHANGELOG.md index 9c747b8abc7b7..c00ac113d7112 100644 --- a/src/Symfony/Bridge/Doctrine/CHANGELOG.md +++ b/src/Symfony/Bridge/Doctrine/CHANGELOG.md @@ -1,6 +1,11 @@ CHANGELOG ========= +2.4.0 +----- + + * deprecated DoctrineOrmTestCase class + 2.2.0 ----- diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php index 1b1731554e80c..57e57e6e25db9 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -296,10 +296,12 @@ public function getValuesForChoices(array $entities) * * @see ChoiceListInterface * - * @deprecated 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) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + // Performance optimization if (empty($entities)) { return array(); @@ -338,10 +340,12 @@ public function getIndicesForChoices(array $entities) * * @see ChoiceListInterface * - * @deprecated 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) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + // Performance optimization if (empty($values)) { return array(); diff --git a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php index e506352d161d9..dae25951e471f 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php @@ -11,18 +11,21 @@ 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); + +use Doctrine\ORM\EntityManager; use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; /** * Class DoctrineOrmTestCase. * - * @deprecated Deprecated as of Symfony 2.3, to be removed in Symfony 3.0. + * @deprecated since version 2.4, to be removed in 3.0. * Use {@link DoctrineTestHelper} instead. */ abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase { /** - * @return \Doctrine\ORM\EntityManager + * @return EntityManager */ public static function createTestEntityManager() { diff --git a/src/Symfony/Bridge/Monolog/Logger.php b/src/Symfony/Bridge/Monolog/Logger.php index 23af86453f323..264835d88a9d3 100644 --- a/src/Symfony/Bridge/Monolog/Logger.php +++ b/src/Symfony/Bridge/Monolog/Logger.php @@ -23,41 +23,41 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface { /** - * @deprecated since 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible. + * @deprecated since version 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible. */ public function emerg($message, array $context = array()) { - trigger_error('The emerg() method of the Monolog Logger was removed. You should use the new method emergency() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + 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); } /** - * @deprecated since 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible. + * @deprecated since version 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible. */ public function crit($message, array $context = array()) { - trigger_error('The crit() method of the Monolog Logger was removed. You should use the new method critical() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + 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); } /** - * @deprecated since 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible. + * @deprecated since version 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible. */ public function err($message, array $context = array()) { - trigger_error('The err() method of the Monolog Logger was removed. You should use the new method error() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + 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); } /** - * @deprecated since 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible. + * @deprecated since version 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible. */ public function warn($message, array $context = array()) { - trigger_error('The warn() method of the Monolog Logger was removed. You should use the new method warning() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + 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); } diff --git a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php index e0eff7c4ea67a..b52826d9d6c5d 100644 --- a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php +++ b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php @@ -300,10 +300,12 @@ public function getValuesForChoices(array $models) /** * {@inheritdoc} * - * @deprecated 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 $models) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (empty($models)) { return array(); } @@ -319,7 +321,7 @@ public function getIndicesForChoices(array $models) * but if they originated from different queries, there are not the same object within the code. * * This happens when using m:n relations with either sides model as data_class of the form. - * The choicelist will retrieve the list of available related models with a different query, resulting in different objects. + * The choice list will retrieve the list of available related models with a different query, resulting in different objects. */ $choices = $this->fixChoices($models); foreach ($choices as $i => $givenChoice) { @@ -346,10 +348,12 @@ public function getIndicesForChoices(array $models) /** * {@inheritdoc} * - * @deprecated 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) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (empty($values)) { return array(); } diff --git a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php index b638cd0ff1677..e729cf8d053fc 100644 --- a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php +++ b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php @@ -24,8 +24,8 @@ * @author Fabien Potencier * @author Clément JOBEILI * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. Use - * MessageDataCollector of SwiftmailerBundle instead. + * @deprecated since version 2.4, to be removed in 3.0. + * Use the MessageDataCollector from SwiftmailerBundle instead. */ class MessageDataCollector extends DataCollector { diff --git a/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php b/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php index 0114b354d8b3c..ee76d86723e35 100644 --- a/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php +++ b/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php @@ -14,8 +14,7 @@ /** * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * the helper "form_start()" instead. + * @deprecated since version 2.3, to be removed in 3.0. Use the helper "form_start()" instead. */ class FormEnctypeNode extends SearchAndRenderBlockNode { diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php index 79cd7870f0583..0b9cc1541fe7c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -21,7 +21,7 @@ /** * RouterApacheDumperCommand. * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * The performance gains are minimal and it's very hard to replicate * the behavior of PHP implementation. * @@ -74,7 +74,9 @@ protected function configure() */ protected function execute(InputInterface $input, OutputInterface $output) { - trigger_error('The router:dump-apache command is deprecated since 2.5 and will be removed in 3.0', E_USER_DEPRECATED); + $formatter = $this->getHelper('formatter'); + + $output->writeln($formatter->formatSection('warning', 'The router:dump-apache command is deprecated since version 2.5 and will be removed in 3.0', 'comment')); $router = $this->getContainer()->get('router'); diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php index 538e908901981..06e6e90756bfe 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -267,13 +267,13 @@ public function createFormBuilder($data = null, array $options = array()) * * @return Request * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. Ask - * Symfony to inject the Request object into your controller + * @deprecated since version 2.4, to be removed in 3.0. + * Ask Symfony to inject the Request object into your controller * method instead by type hinting it in the method's signature. */ public function getRequest() { - trigger_error('The "getRequest" method of the base "Controller" class has been deprecated since Symfony 2.4 and will be removed in 3.0. The only reliable way to get the "Request" object is to inject it in the action method.', E_USER_DEPRECATED); + 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(); } diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php index 9354a549805a1..506e3d0823f2c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -116,7 +116,7 @@ private function addCsrfSection(ArrayNodeDefinition $rootNode) ->children() ->scalarNode('field_name') ->defaultValue('_token') - ->info('Deprecated since 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead') + ->info('Deprecated since version 2.4, to be removed in 3.0. Use form.csrf_protection.field_name instead') ->end() ->end() ->end() diff --git a/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php b/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php index bc5a0cc82fb89..2c61453872546 100644 --- a/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php +++ b/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php @@ -80,7 +80,7 @@ protected function createSurrogate() * * @return Esi * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use createSurrogate() instead + * @deprecated since version 2.6, to be removed in 3.0. Use createSurrogate() instead */ protected function createEsi() { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php index ff2d5edc4b3a6..39c44e085fe01 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php @@ -11,6 +11,8 @@ 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); + use Symfony\Component\Templating\DebuggerInterface; use Psr\Log\LoggerInterface; @@ -19,7 +21,8 @@ * * @author Fabien Potencier * - * @deprecated Deprecated in 2.4, to be removed in 3.0. Use Psr\Log\LoggerInterface instead. + * @deprecated since version 2.4, to be removed in 3.0. + * Use Psr\Log\LoggerInterface instead. */ class Debugger implements DebuggerInterface { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php index 3d2ae2be917a7..51fe53f2e0ba9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -37,11 +37,14 @@ public function __construct(ContainerInterface $container) /** * Returns the security context service. * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. + * * @return SecurityContext|null The security context */ public function getSecurity() { + 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')) { return $this->container->get('security.context'); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php index 0915a068b6303..7049c5d4e20cd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php @@ -131,8 +131,8 @@ public function end(FormView $view, array $variables = array()) * * @return string The HTML markup * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link start} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link start} instead. */ public function enctype(FormView $view) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php index 0d7fec1dd1c58..4aba0c202f45c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php @@ -30,11 +30,12 @@ class RequestHelper extends Helper * * @param Request|RequestStack $requestStack A RequestStack instance or a Request instance * - * @deprecated since 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0 + * @deprecated since version 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0. */ public function __construct($requestStack) { 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); $this->request = $requestStack; } elseif ($requestStack instanceof RequestStack) { $this->requestStack = $requestStack; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php index 46bbf9d321a79..3558b9ce04381 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php @@ -30,11 +30,12 @@ class SessionHelper extends Helper * * @param Request|RequestStack $requestStack A RequestStack instance or a Request instance * - * @deprecated since 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0 + * @deprecated since version 2.5, passing a Request instance is deprecated and support for it will be removed in 3.0. */ public function __construct($requestStack) { 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); $this->session = $requestStack->getSession(); } elseif ($requestStack instanceof RequestStack) { $this->requestStack = $requestStack; diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php index bda4ddf3a3634..e49fd8654b2d3 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php @@ -61,7 +61,7 @@ private function addFormSection(ArrayNodeDefinition $rootNode) ->end() ->children() ->arrayNode('form') - ->info('Deprecated since 2.6, to be removed in 3.0. Use twig.form_themes instead') + ->info('Deprecated since version 2.6, to be removed in 3.0. Use twig.form_themes instead') ->addDefaultsIfNotSet() ->fixXmlConfig('resource') ->children() diff --git a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php index 845012c876871..9209a60db2d95 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php +++ b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php @@ -20,7 +20,7 @@ * * @author Fabien Potencier * - * @deprecated Deprecated in 2.2, to be removed in 3.0. + * @deprecated since version 2.2, to be removed in 3.0. */ class ActionsExtension extends \Twig_Extension { @@ -29,14 +29,14 @@ class ActionsExtension extends \Twig_Extension /** * @param FragmentHandler|ContainerInterface $handler * - * @deprecated Passing a ContainerInterface as a first argument is deprecated as of 2.7 and will be removed in 3.0. + * @deprecated Passing a ContainerInterface as a first argument is deprecated since 2.7 and will be removed in 3.0. */ public function __construct($handler) { if ($handler instanceof FragmentHandler) { $this->handler = $handler; } elseif ($handler instanceof ContainerInterface) { - trigger_error(sprintf('The ability to pass a ContainerInterface instance as a first argument to %s was deprecated in 2.7 and will be removed in 3.0. Please, pass a FragmentHandler instance instead.', __METHOD__), E_USER_DEPRECATED); + 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'); } else { diff --git a/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd b/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd index 4a3bba7392f43..474b6c9721e0c 100644 --- a/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd +++ b/src/Symfony/Bundle/TwigBundle/Resources/config/schema/twig-1.0.xsd @@ -9,7 +9,7 @@ - + diff --git a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php index 05d8dd20d4f14..3e382fe0c81de 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php @@ -57,7 +57,7 @@ public function testLoadFullConfiguration($format) $resources = $container->getParameter('twig.form.resources'); $this->assertContains('form_div_layout.html.twig', $resources, '->load() includes default template for form resources'); $this->assertContains('MyBundle::form.html.twig', $resources, '->load() merges new templates into form resources'); - // @deprecated since 2.6, to be removed in 3.0 + // @deprecated since version 2.6, to be removed in 3.0 $this->assertContains('MyBundle::formDeprecated.html.twig', $resources, '->load() merges new templates into form resources'); // Globals diff --git a/src/Symfony/Bundle/TwigBundle/TwigEngine.php b/src/Symfony/Bundle/TwigBundle/TwigEngine.php index 324cd34fc9d12..9aeb630c476ac 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigEngine.php +++ b/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -42,19 +42,24 @@ public function __construct(\Twig_Environment $environment, TemplateNameParserIn } /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Inject the escaping - * strategy on Twig_Environment instead + * @deprecated since version 2.7, to be removed in 3.0. + * Inject the escaping strategy on \Twig_Environment instead. */ 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); + $this->environment->getExtension('escaper')->setDefaultStrategy($strategy); } /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use TwigDefaultEscapingStrategy instead. + * @deprecated since version 2.7, to be removed in 3.0. + * Use TwigDefaultEscapingStrategy instead. */ public function guessDefaultEscapingStrategy($filename) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy::guess method instead.', E_USER_DEPRECATED); + return TwigDefaultEscapingStrategy::guess($filename); } diff --git a/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php b/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php index 65b7b10b239bd..dd95413caf100 100644 --- a/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php +++ b/src/Symfony/Component/ClassLoader/ApcUniversalClassLoader.php @@ -11,6 +11,8 @@ 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); + /** * ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3. * @@ -60,7 +62,8 @@ * * @api * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. Use the ApcClassLoader class instead. + * @deprecated since version 2.4, to be removed in 3.0. + * Use the {@link ClassLoader} class instead. */ class ApcUniversalClassLoader extends UniversalClassLoader { diff --git a/src/Symfony/Component/ClassLoader/CHANGELOG.md b/src/Symfony/Component/ClassLoader/CHANGELOG.md index 211af2eff4df3..64660a8768645 100644 --- a/src/Symfony/Component/ClassLoader/CHANGELOG.md +++ b/src/Symfony/Component/ClassLoader/CHANGELOG.md @@ -1,11 +1,6 @@ CHANGELOG ========= -2.7.0 ------ - - * The UniversalClassLoader class has been deprecated in favor of ClassLoader class - 2.4.0 ----- diff --git a/src/Symfony/Component/ClassLoader/DebugClassLoader.php b/src/Symfony/Component/ClassLoader/DebugClassLoader.php index 897919b20ae21..351869928c247 100644 --- a/src/Symfony/Component/ClassLoader/DebugClassLoader.php +++ b/src/Symfony/Component/ClassLoader/DebugClassLoader.php @@ -11,6 +11,8 @@ 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); + /** * Autoloader checking if the class is really defined in the file found. * @@ -23,7 +25,8 @@ * * @api * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. Use the DebugClassLoader provided by the Debug component instead. + * @deprecated since version 2.4, to be removed in 3.0. + * Use {@link \Symfony\Component\Debug\DebugClassLoader} instead. */ class DebugClassLoader { diff --git a/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php b/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php index 40d847c178583..2a102dbbf423b 100644 --- a/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php +++ b/src/Symfony/Component/ClassLoader/DebugUniversalClassLoader.php @@ -11,12 +11,15 @@ 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); + /** * Checks that the class is actually declared in the included file. * * @author Fabien Potencier * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. Use the DebugClassLoader provided by the Debug component instead. + * @deprecated since version 2.4, to be removed in 3.0. + * Use the {@link \Symfony\Component\Debug\DebugClassLoader} class instead. */ class DebugUniversalClassLoader extends UniversalClassLoader { diff --git a/src/Symfony/Component/ClassLoader/UniversalClassLoader.php b/src/Symfony/Component/ClassLoader/UniversalClassLoader.php index 63cc58af73a82..781d3a29a931b 100644 --- a/src/Symfony/Component/ClassLoader/UniversalClassLoader.php +++ b/src/Symfony/Component/ClassLoader/UniversalClassLoader.php @@ -11,7 +11,7 @@ namespace Symfony\Component\ClassLoader; -trigger_error('The "Symfony\Component\ClassLoader\UniversalClassLoader" class was deprecated in version 2.7 and will be removed in 3.0. Use "Symfony\Component\ClassLoader\ClassLoader" 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. @@ -60,7 +60,8 @@ * * @api * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. Use the ClassLoader class instead. + * @deprecated since version 2.4, to be removed in 3.0. + * Use the {@link ClassLoader} class instead. */ class UniversalClassLoader { diff --git a/src/Symfony/Component/Config/Definition/ReferenceDumper.php b/src/Symfony/Component/Config/Definition/ReferenceDumper.php index 7fe336d8fbf11..1fd632accdbdd 100644 --- a/src/Symfony/Component/Config/Definition/ReferenceDumper.php +++ b/src/Symfony/Component/Config/Definition/ReferenceDumper.php @@ -11,10 +11,13 @@ 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); + use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper; /** - * @deprecated Deprecated since version 2.4, to be removed in 3.0. Use Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper instead. + * @deprecated since version 2.4, to be removed in 3.0. + * Use {@link \Symfony\Component\Config\Definition\Dumper\YamlReferenceDumper} instead. */ class ReferenceDumper extends YamlReferenceDumper { diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 833eb6d54387a..0b96743f7e16e 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -624,10 +624,12 @@ public static function getAbbreviations($names) * * @return string A string representing the Application * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. + * @deprecated since version 2.3, to be removed in 3.0. */ 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); + $descriptor = new TextDescriptor(); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, !$raw); $descriptor->describe($output, $this, array('namespace' => $namespace, 'raw_output' => true)); @@ -643,10 +645,12 @@ public function asText($namespace = null, $raw = false) * * @return string|\DOMDocument An XML string representing the Application * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. + * @deprecated since version 2.3, to be removed in 3.0. */ 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); + $descriptor = new XmlDescriptor(); if ($asDom) { diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 0302cb1753b51..b70692fc6ab09 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -605,10 +605,12 @@ public function getHelper($name) * * @return string A string representing the command * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. + * @deprecated since version 2.3, to be removed in 3.0. */ public function asText() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); + $descriptor = new TextDescriptor(); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $descriptor->describe($output, $this, array('raw_output' => true)); @@ -623,10 +625,12 @@ public function asText() * * @return string|\DOMDocument An XML string representing the command * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. + * @deprecated since version 2.3, to be removed in 3.0. */ 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); + $descriptor = new XmlDescriptor(); if ($asDom) { diff --git a/src/Symfony/Component/Console/Helper/DialogHelper.php b/src/Symfony/Component/Console/Helper/DialogHelper.php index 37d3b4df5edf0..e99a35ac3dd69 100644 --- a/src/Symfony/Component/Console/Helper/DialogHelper.php +++ b/src/Symfony/Component/Console/Helper/DialogHelper.php @@ -19,7 +19,7 @@ * * @author Fabien Potencier * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link \Symfony\Component\Console\Helper\QuestionHelper} instead. */ class DialogHelper extends InputAwareHelper diff --git a/src/Symfony/Component/Console/Helper/ProgressBar.php b/src/Symfony/Component/Console/Helper/ProgressBar.php index 893664e412f54..ae1fdae88259d 100644 --- a/src/Symfony/Component/Console/Helper/ProgressBar.php +++ b/src/Symfony/Component/Console/Helper/ProgressBar.php @@ -171,12 +171,14 @@ public function getMaxSteps() /** * Gets the progress bar step. * - * @deprecated since 2.6, to be removed in 3.0. Use {@link getProgress()} instead. + * @deprecated since version 2.6, to be removed in 3.0. Use {@link getProgress()} instead. * * @return int The progress bar step */ 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); + return $this->getProgress(); } @@ -358,7 +360,7 @@ public function advance($step = 1) /** * Sets the current progress. * - * @deprecated since 2.6, to be removed in 3.0. Use {@link setProgress()} instead. + * @deprecated since version 2.6, to be removed in 3.0. Use {@link setProgress()} instead. * * @param int $step The current progress * @@ -366,6 +368,8 @@ public function advance($step = 1) */ 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); + $this->setProgress($step); } diff --git a/src/Symfony/Component/Console/Helper/ProgressHelper.php b/src/Symfony/Component/Console/Helper/ProgressHelper.php index d1ab241ac0027..1f8e2bae8f265 100644 --- a/src/Symfony/Component/Console/Helper/ProgressHelper.php +++ b/src/Symfony/Component/Console/Helper/ProgressHelper.php @@ -20,7 +20,8 @@ * @author Chris Jones * @author Fabien Potencier * - * @deprecated Deprecated since 2.5, to be removed in 3.0; use ProgressBar instead. + * @deprecated since version 2.5, to be removed in 3.0 + * Use {@link ProgressBar} instead. */ class ProgressHelper extends Helper { @@ -120,7 +121,7 @@ class ProgressHelper extends Helper public function __construct($triggerDeprecationError = true) { if ($triggerDeprecationError) { - 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('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); } } diff --git a/src/Symfony/Component/Console/Helper/TableHelper.php b/src/Symfony/Component/Console/Helper/TableHelper.php index eec3f362a3673..06af5fad9b649 100644 --- a/src/Symfony/Component/Console/Helper/TableHelper.php +++ b/src/Symfony/Component/Console/Helper/TableHelper.php @@ -20,7 +20,8 @@ * @author Саша Стаменковић * @author Fabien Potencier * - * @deprecated Deprecated since 2.5, to be removed in 3.0; use Table instead. + * @deprecated since version 2.5, to be removed in 3.0 + * Use {@link Table} instead. */ class TableHelper extends Helper { @@ -36,7 +37,7 @@ class TableHelper extends Helper public function __construct($triggerDeprecationError = true) { if ($triggerDeprecationError) { - 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('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()); diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php index 48edb166c3b52..51d1bdd8aa188 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -417,10 +417,12 @@ public function getSynopsis() * * @return string A string representing the InputDefinition * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. + * @deprecated since version 2.3, to be removed in 3.0. */ public function asText() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); + $descriptor = new TextDescriptor(); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $descriptor->describe($output, $this, array('raw_output' => true)); @@ -435,10 +437,12 @@ public function asText() * * @return string|\DOMDocument An XML string representing the InputDefinition * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. + * @deprecated since version 2.3, to be removed in 3.0. */ 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); + $descriptor = new XmlDescriptor(); if ($asDom) { diff --git a/src/Symfony/Component/Console/Input/StringInput.php b/src/Symfony/Component/Console/Input/StringInput.php index 6537e27a6bb3d..40656b3c14887 100644 --- a/src/Symfony/Component/Console/Input/StringInput.php +++ b/src/Symfony/Component/Console/Input/StringInput.php @@ -39,6 +39,10 @@ class StringInput extends ArgvInput */ public function __construct($input, InputDefinition $definition = null) { + 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); + } + parent::__construct(array(), null); $this->setTokens($this->tokenize($input)); diff --git a/src/Symfony/Component/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php index 83affb14ba3ac..eb751bf9cd02e 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -35,16 +35,16 @@ class DebugClassLoader /** * Constructor. * - * @param callable|object $classLoader + * @param callable|object $classLoader Passing an object is @deprecated since version 2.5 and support for it will be removed in 3.0 * * @api - * @deprecated since 2.5, passing an object is deprecated and support for it will be removed in 3.0 */ public function __construct($classLoader) { $this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile'); 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); $this->classLoader = array($classLoader, 'loadClass'); $this->isFinder = true; } else { @@ -60,9 +60,7 @@ public function __construct($classLoader) /** * Gets the wrapped class loader. * - * @return callable|object a class loader - * - * @deprecated since 2.5, returning an object is deprecated and support for it will be removed in 3.0 + * @return callable|object A class loader. Since version 2.5, returning an object is @deprecated and support for it will be removed in 3.0 */ public function getClassLoader() { @@ -124,10 +122,12 @@ public static function disable() * * @return string|null * - * @deprecated Deprecated since 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ 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); + if ($this->wasFinder) { return $this->classLoader[0]->findFile($class); } diff --git a/src/Symfony/Component/Debug/ErrorHandler.php b/src/Symfony/Component/Debug/ErrorHandler.php index 48e4a2d69e737..1e0574bb11814 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -46,7 +46,7 @@ class ErrorHandler { /** - * @deprecated since 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ const TYPE_DEPRECATION = -100; @@ -103,14 +103,14 @@ class ErrorHandler /** * Same init value as thrownErrors * - * @deprecated since 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ private $displayErrors = 0x1FFF; /** * Registers the error handler. * - * @param self|null|int $handler The handler to register, or @deprecated (since 2.6, to be removed in 3.0) bit field of thrown levels + * @param self|null|int $handler The handler to register, or @deprecated (since version 2.6, to be removed in 3.0) bit field of thrown levels * @param bool $replace Whether to replace or not any existing handler * * @return self The registered error handler @@ -256,7 +256,7 @@ public function throwAt($levels, $replace = false) } $this->reRegister($prev | $this->loggedErrors); - // $this->displayErrors is @deprecated since 2.6 + // $this->displayErrors is @deprecated since version 2.6 $this->displayErrors = $this->thrownErrors; return $prev; @@ -586,10 +586,12 @@ protected function getFatalErrorHandlers() * * @param int|null $level The level (null to use the error_reporting() value and 0 to disable) * - * @deprecated since 2.6, to be removed in 3.0. Use throwAt() instead. + * @deprecated since version 2.6, to be removed in 3.0. Use throwAt() instead. */ 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); + $level = null === $level ? error_reporting() : $level; $this->throwAt($level, true); } @@ -599,10 +601,12 @@ public function setLevel($level) * * @param int $displayErrors The display_errors flag value * - * @deprecated since 2.6, to be removed in 3.0. Use throwAt() instead. + * @deprecated since version 2.6, to be removed in 3.0. Use throwAt() instead. */ 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); + if ($displayErrors) { $this->throwAt($this->displayErrors, true); } else { @@ -618,10 +622,12 @@ public function setDisplayErrors($displayErrors) * @param LoggerInterface $logger A logger interface * @param string $channel The channel associated with the logger (deprecation, emergency or scream) * - * @deprecated since 2.6, to be removed in 3.0. Use setLoggers() or setDefaultLogger() instead. + * @deprecated since version 2.6, to be removed in 3.0. Use setLoggers() or setDefaultLogger() instead. */ 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); + $handler = set_error_handler('var_dump', 0); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); @@ -641,20 +647,24 @@ public static function setLogger(LoggerInterface $logger, $channel = 'deprecatio } /** - * @deprecated since 2.6, to be removed in 3.0. Use handleError() instead. + * @deprecated since version 2.6, to be removed in 3.0. Use handleError() instead. */ public function handle($level, $message, $file = 'unknown', $line = 0, $context = array()) { + $this->handleError(E_USER_DEPRECATED, 'The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the handleError() method instead.', __FILE__, __LINE__, array()); + return $this->handleError($level, $message, $file, $line, (array) $context); } /** * Handles PHP fatal errors. * - * @deprecated since 2.6, to be removed in 3.0. Use handleFatalError() instead. + * @deprecated since version 2.6, to be removed in 3.0. Use handleFatalError() instead. */ 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); + static::handleFatalError(); } } diff --git a/src/Symfony/Component/Debug/Exception/DummyException.php b/src/Symfony/Component/Debug/Exception/DummyException.php index 967e033777322..378cbcc10f804 100644 --- a/src/Symfony/Component/Debug/Exception/DummyException.php +++ b/src/Symfony/Component/Debug/Exception/DummyException.php @@ -11,6 +11,8 @@ 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); + /** * @author Fabien Potencier * diff --git a/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php b/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php index c75f17edff344..2af08597929d3 100644 --- a/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -101,7 +101,7 @@ private function getClassCandidates($class) if ($function[0] instanceof DebugClassLoader) { $function = $function[0]->getClassLoader(); - // Since 2.5, returning an object from DebugClassLoader::getClassLoader() is @deprecated + // @deprecated since version 2.5. Returning an object from DebugClassLoader::getClassLoader() is deprecated. if (is_object($function)) { $function = array($function); } diff --git a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php index 663d6cad9ef21..4d764574a5b3d 100644 --- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -386,7 +386,7 @@ public function testLegacyInterface() ; $handler = ErrorHandler::register(E_NOTICE); - $handler->setLogger($logger, 'scream'); + @$handler->setLogger($logger, 'scream'); unset($undefVar); @$undefVar++; diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index 2273ee56d8334..97cd849dda9bf 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -94,11 +94,11 @@ public function getFactory() * @return Definition The current instance * * @api - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryClass($factoryClass) { - trigger_error('Definition::setFactoryClass() is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED); $this->factoryClass = $factoryClass; @@ -111,10 +111,12 @@ public function setFactoryClass($factoryClass) * @return string|null The factory class name * * @api - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryClass() { + trigger_error('The '.__METHOD__.' is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); + return $this->factoryClass; } @@ -126,11 +128,11 @@ public function getFactoryClass() * @return Definition The current instance * * @api - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryMethod($factoryMethod) { - trigger_error('Definition::setFactoryMethod() is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED); $this->factoryMethod = $factoryMethod; @@ -178,10 +180,12 @@ public function getDecoratedService() * @return string|null The factory method name * * @api - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryMethod() { + trigger_error('The '.__METHOD__.' is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); + return $this->factoryMethod; } @@ -193,11 +197,11 @@ public function getFactoryMethod() * @return Definition The current instance * * @api - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function setFactoryService($factoryService) { - trigger_error('Definition::setFactoryService() is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead.', E_USER_DEPRECATED); $this->factoryService = $factoryService; @@ -210,10 +214,12 @@ public function setFactoryService($factoryService) * @return string|null The factory service id * * @api - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function getFactoryService() { + trigger_error('The '.__METHOD__.' is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); + return $this->factoryService; } diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 35d64ec0d1ab2..6e2369144e636 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1402,12 +1402,15 @@ public function dumpParameter($name) } /** - * @deprecated Deprecated since 2.6.2, to be removed in 3.0. Use Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider instead. + * @deprecated since version 2.6.2, to be removed in 3.0. + * Use \Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider instead. * * @param 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); + $this->expressionLanguageProviders[] = $provider; } diff --git a/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php b/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php index 2e20b6cf31b73..1b318fd9e4231 100644 --- a/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php +++ b/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php @@ -11,6 +11,8 @@ 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); + use Symfony\Component\Config\Util\XmlUtils; use Symfony\Component\ExpressionLanguage\Expression; @@ -19,7 +21,7 @@ * * @author Fabien Potencier * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ class SimpleXMLElement extends \SimpleXMLElement { diff --git a/src/Symfony/Component/EventDispatcher/Event.php b/src/Symfony/Component/EventDispatcher/Event.php index dc39b05d524e7..e411ca81360ad 100644 --- a/src/Symfony/Component/EventDispatcher/Event.php +++ b/src/Symfony/Component/EventDispatcher/Event.php @@ -77,7 +77,7 @@ public function stopPropagation() * * @param EventDispatcherInterface $dispatcher * - * @deprecated Deprecated in 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call. + * @deprecated since version 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call. * * @api */ @@ -91,12 +91,14 @@ public function setDispatcher(EventDispatcherInterface $dispatcher) * * @return EventDispatcherInterface * - * @deprecated Deprecated in 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call. + * @deprecated since version 2.4, to be removed in 3.0. The event dispatcher is passed to the listener call. * * @api */ 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); + return $this->dispatcher; } @@ -105,12 +107,14 @@ public function getDispatcher() * * @return string * - * @deprecated Deprecated in 2.4, to be removed in 3.0. The event name is passed to the listener call. + * @deprecated since version 2.4, to be removed in 3.0. The event name is passed to the listener call. * * @api */ 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); + return $this->name; } @@ -119,7 +123,7 @@ public function getName() * * @param string $name The event name. * - * @deprecated Deprecated in 2.4, to be removed in 3.0. The event name is passed to the listener call. + * @deprecated since version 2.4, to be removed in 3.0. The event name is passed to the listener call. * * @api */ diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php index 8cb8088f4aa44..d51945a2b891f 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -592,12 +592,12 @@ public function getByReference() * * @return bool Always returns false. * - * @deprecated since version 2.3, to be removed in 3.0. Use - * {@link getInheritData()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link getInheritData()} instead. */ public function getVirtual() { - trigger_error('ButtonBuilder::getVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use FormConfigBuilder::getInheritData() 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; } diff --git a/src/Symfony/Component/Form/Deprecated/FormEvents.php b/src/Symfony/Component/Form/Deprecated/FormEvents.php index 862879e75a610..54175af657775 100644 --- a/src/Symfony/Component/Form/Deprecated/FormEvents.php +++ b/src/Symfony/Component/Form/Deprecated/FormEvents.php @@ -1,4 +1,5 @@ fixChoices($choices); $indices = array(); @@ -225,10 +227,12 @@ public function getIndicesForChoices(array $choices) /** * {@inheritdoc} * - * @deprecated 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) { + 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); $indices = array(); diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php index f0d8ec44d4714..8f09179a2a8fb 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceListInterface.php @@ -139,7 +139,7 @@ public function getValuesForChoices(array $choices); * * @return array An array of indices with ascending, 0-based numeric keys * - * @deprecated 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 $choices); @@ -159,7 +159,7 @@ public function getIndicesForChoices(array $choices); * * @return array An array of indices with ascending, 0-based numeric keys * - * @deprecated 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); } diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php index cc364d998c9b4..ee136f79780f5 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php @@ -106,10 +106,12 @@ public function getValuesForChoices(array $choices) /** * {@inheritdoc} * - * @deprecated 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 $choices) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (!$this->choiceList) { $this->load(); } @@ -120,10 +122,12 @@ public function getIndicesForChoices(array $choices) /** * {@inheritdoc} * - * @deprecated 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) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (!$this->choiceList) { $this->load(); } diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php index 398ae3ddd1712..c7fb9ad1a88ed 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php @@ -187,10 +187,12 @@ public function getValuesForChoices(array $choices) /** * {@inheritdoc} * - * @deprecated 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 $choices) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (!$this->valuePath) { return parent::getIndicesForChoices($choices); } diff --git a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php index 7587086ea12e4..45159b9313f03 100644 --- a/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php +++ b/src/Symfony/Component/Form/Extension/Core/DataTransformer/NumberToLocalizedStringTransformer.php @@ -76,21 +76,21 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface /** * Alias for {@link self::ROUND_HALF_EVEN}. * - * @deprecated Deprecated as of Symfony 2.4, to be removed in Symfony 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ const ROUND_HALFEVEN = Deprecated::ROUND_HALFEVEN; /** * Alias for {@link self::ROUND_HALF_UP}. * - * @deprecated Deprecated as of Symfony 2.4, to be removed in Symfony 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ const ROUND_HALFUP = Deprecated::ROUND_HALFUP; /** * Alias for {@link self::ROUND_HALF_DOWN}. * - * @deprecated Deprecated as of Symfony 2.4, to be removed in Symfony 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ const ROUND_HALFDOWN = Deprecated::ROUND_HALFDOWN; diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php index 8e72b04137b79..b201802fbcfff 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php @@ -81,11 +81,13 @@ public function preSubmit(FormEvent $event) /** * Alias of {@link preSubmit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link preSubmit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link preSubmit()} instead. */ 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); + $this->preSubmit($event); } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php index a3e27d57e362c..c5f871756bab4 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php @@ -63,11 +63,13 @@ public function preSubmit(FormEvent $event) /** * Alias of {@link preSubmit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link preSubmit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link preSubmit()} instead. */ 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); + $this->preSubmit($event); } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php index 4a5a1df6af212..50e60d8287d6c 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php @@ -46,11 +46,13 @@ public function onSubmit(FormEvent $event) /** * Alias of {@link onSubmit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link onSubmit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link onSubmit()} instead. */ 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); + $this->onSubmit($event); } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php index a14f99a985f44..ef8dffed7bcb7 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php @@ -129,11 +129,13 @@ public function onSubmit(FormEvent $event) /** * Alias of {@link onSubmit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link onSubmit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link onSubmit()} instead. */ 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); + $this->onSubmit($event); } } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php index 043cc275973a8..97aba300b9b90 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -184,22 +184,26 @@ public function onSubmit(FormEvent $event) /** * Alias of {@link preSubmit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link preSubmit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link preSubmit()} instead. */ 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); + $this->preSubmit($event); } /** * Alias of {@link onSubmit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link onSubmit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link onSubmit()} instead. */ 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); + $this->onSubmit($event); } } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php index eaec5c163b8f2..dd64a53ecea9a 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php @@ -40,11 +40,13 @@ public function preSubmit(FormEvent $event) /** * Alias of {@link preSubmit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link preSubmit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link preSubmit()} instead. */ 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); + $this->preSubmit($event); } diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php index 642d60af441fc..b70a8e823d26d 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; -trigger_error('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderAdapter was deprecated in version 2.4 and will be removed in version 3.0. Please use Symfony\Component\Security\Csrf\CsrfTokenManager 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\Security\Csrf\CsrfToken; @@ -24,7 +24,7 @@ * @since 2.4 * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.4, to be removed in Symfony 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ class CsrfProviderAdapter implements CsrfTokenManagerInterface { diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php index 260134d5c0768..dd5b1fce1f41b 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; -trigger_error('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface was deprecated in version 2.4 and will be removed in version 3.0. Please use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface instead.', E_USER_DEPRECATED); - /** * Marks classes able to provide CSRF protection. * @@ -29,9 +27,8 @@ * * @author Bernhard Schussek * - * @deprecated since version 2.4, to be removed in Symfony 3.0. Use - * {@link \Symfony\Component\Security\Csrf\CsrfTokenManagerInterface} - * instead. + * @deprecated since version 2.4, to be removed in 3.0. + * Use {@link \Symfony\Component\Security\Csrf\CsrfTokenManagerInterface} instead. */ interface CsrfProviderInterface { diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php index b7db6fa4f639a..c16cc291526fa 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; -trigger_error('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfTokenManagerAdapter was deprecated in version 2.4 and will be removed in version 3.0. Please use Symfony\Component\Security\Csrf\CsrfTokenManager instead.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\CsrfTokenManagerAdapter 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\Security\Csrf\CsrfToken; use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; @@ -22,7 +22,7 @@ * @since 2.4 * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.4, to be removed in Symfony 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ class CsrfTokenManagerAdapter implements CsrfProviderInterface { diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.php index fd9110d3b1527..7747f9e1dd78f 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; -trigger_error('Symfony\Component\Security\Csrf\CsrfTokenManager was deprecated in version 2.4 and will be removed in version 3.0. Please use \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage 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. @@ -21,8 +21,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.4, to be removed in Symfony 3.0. Use - * {@link \Symfony\Component\Security\Csrf\CsrfTokenManager} in + * @deprecated since version 2.4, to be removed in 3.0. + * Use {@link \Symfony\Component\Security\Csrf\CsrfTokenManager} in * combination with {@link \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage} * instead. */ diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php index 91e4897b5a4ff..6159071352958 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; -trigger_error('Symfony\Component\Security\Csrf\CsrfTokenManager was deprecated in version 2.4 and will be removed in version 3.0. Please use Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage 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; @@ -23,8 +23,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.4, to be removed in Symfony 3.0. Use - * {@link \Symfony\Component\Security\Csrf\CsrfTokenManager} in + * @deprecated since version 2.4, to be removed in 3.0. + * Use {@link \Symfony\Component\Security\Csrf\CsrfTokenManager} in * combination with {@link \Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage} * instead. */ diff --git a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php index c6a467eb05d4a..bdc02b5ad2cfa 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php @@ -118,11 +118,13 @@ public function preSubmit(FormEvent $event) /** * Alias of {@link preSubmit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link preSubmit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link preSubmit()} instead. */ 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); + $this->preSubmit($event); } } diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php b/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php index bb144ed65ad6e..499a4d78aa6bc 100644 --- a/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php +++ b/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Form\Extension\HttpFoundation\EventListener; +trigger_error('The '.__NAMESPACE__.'\BindRequestListener 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); + use Symfony\Component\Form\FormEvents; use Symfony\Component\Form\FormEvent; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -19,8 +21,8 @@ /** * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Pass the - * Request instance to {@link Form::handleRequest()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Pass the Request instance to {@link Form::handleRequest()} instead. */ class BindRequestListener implements EventSubscriberInterface { diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/Deprecated/Form.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/Deprecated/Form.php new file mode 100644 index 0000000000000..d513269ef3dd0 --- /dev/null +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/Deprecated/Form.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Form\Extension\Validator\Constraints\Deprecated; + +trigger_error('Constant ERR_INVALID in class Symfony\Component\Form\Extension\Validator\Constraints\Form is deprecated since version 2.6 and will be removed in 3.0. Use NOT_SYNCHRONIZED_ERROR constant instead.', E_USER_DEPRECATED); + +/** + * @deprecated since version 2.7, to be removed in 3.0. + * @internal + */ +final class Form +{ + const ERR_INVALID = 1; + + private function __construct() + { + } +} diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php index da1a92b5e40bc..1f48d702e06c0 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Form\Extension\Validator\Constraints; +use Symfony\Component\Form\Extension\Validator\Constraints\Deprecated\Form as Deprecated; use Symfony\Component\Validator\Constraint; /** @@ -22,10 +23,10 @@ class Form extends Constraint const NO_SUCH_FIELD_ERROR = 2; /** - * @deprecated Deprecated since Symfony 2.6, to be removed in 3.0. Use - * {@self NOT_SYNCHRONIZED_ERROR} instead. + * @deprecated since version 2.6, to be removed in 3.0. + * Use {@self NOT_SYNCHRONIZED_ERROR} instead. */ - const ERR_INVALID = 1; + const ERR_INVALID = Deprecated::ERR_INVALID; protected static $errorNames = array( self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR', diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 8e05f1a9f846b..99d25c2ef09cc 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -507,7 +507,7 @@ public function handleRequest($request = null) public function submit($submittedData, $clearMissing = true) { if ($submittedData instanceof Request) { - trigger_error('Passing a Symfony\Component\HttpFoundation\Request object to '.__CLASS__.'::bind() and '.__METHOD__.'() is deprecated since 2.3 and will be removed in 3.0, please use '.__CLASS__.'::handleRequest(). If you want to test whether the form was submitted separately, you can use the method '.__CLASS__.'::isSubmitted()', 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) { @@ -676,15 +676,15 @@ public function submit($submittedData, $clearMissing = true) /** * Alias of {@link submit()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link submit()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link submit()} instead. */ public function bind($submittedData) { // This method is deprecated for Request too, but the error is // triggered in Form::submit() method. if (!$submittedData instanceof Request) { - trigger_error(__METHOD__.'() is deprecated since 2.3 and will be removed in 3.0. Please use '.__CLASS__.'::submit() 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); @@ -719,12 +719,12 @@ public function isSubmitted() /** * Alias of {@link isSubmitted()}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link isSubmitted()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link isSubmitted()} instead. */ public function isBound() { - trigger_error(__METHOD__.'() is deprecated since 2.3 and will be removed in 3.0. Please use '.__CLASS__.'::isSubmitted() 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; } @@ -843,12 +843,12 @@ public function getErrors($deep = false, $flatten = true) * * @return string A string representation of all errors * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. Use - * {@link getErrors()} instead and cast the result to a string. + * @deprecated since version 2.5, to be removed in 3.0. + * Use {@link getErrors()} instead and cast the result to a string. */ public function getErrorsAsString($level = 0) { - trigger_error('Form::getErrorsAsString() is deprecated since 2.5 and will be removed in 3.0. Please use Form::getErrors(true, false) instead and cast the result to a string.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the Form::getErrors(true, false) method instead and cast the result to a string.', E_USER_DEPRECATED); return self::indent((string) $this->getErrors(true, false), $level); } diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php index 8ebfd543b9a9f..381a9acabf4f1 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -351,12 +351,12 @@ public function getInheritData() * * @return FormConfigBuilder The configuration object. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link getInheritData()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link getInheritData()} instead. */ public function getVirtual() { - trigger_error('FormConfigBuilder::getVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use FormConfigBuilder::getInheritData() 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(); } @@ -717,12 +717,12 @@ public function setInheritData($inheritData) * * @return FormConfigBuilder The configuration object. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link setInheritData()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link setInheritData()} instead. */ public function setVirtual($inheritData) { - trigger_error('FormConfigBuilder::setVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use FormConfigBuilder::setInheritData() 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); } diff --git a/src/Symfony/Component/Form/FormEvents.php b/src/Symfony/Component/Form/FormEvents.php index 317472c8a00a4..79c3baafebe3c 100644 --- a/src/Symfony/Component/Form/FormEvents.php +++ b/src/Symfony/Component/Form/FormEvents.php @@ -74,24 +74,24 @@ final class FormEvents const POST_SET_DATA = 'form.post_set_data'; /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link PRE_SUBMIT} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link PRE_SUBMIT} instead. * * @Event */ const PRE_BIND = Deprecated::PRE_BIND; /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link SUBMIT} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link SUBMIT} instead. * * @Event */ const BIND = Deprecated::BIND; /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link POST_SUBMIT} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link POST_SUBMIT} instead. * * @Event */ diff --git a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php index 35f615415ec57..23f873466f50e 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php @@ -14,13 +14,14 @@ use Symfony\Component\Form\Test\TypeTestCase as BaseTypeTestCase; /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use Symfony\Component\Form\Test\TypeTestCase instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Form\Test\TypeTestCase} instead. */ abstract class TypeTestCase extends BaseTypeTestCase { protected function setUp() { - trigger_error('Abstract class "Symfony\Component\Form\Tests\Extension\Core\Type\TypeTestCase" is deprecated since version 2.3 and will be removed in 3.0. Use "Symfony\Component\Form\Test\TypeTestCase" 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(); } } diff --git a/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php b/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php index e9e16640d8204..0ebb90ea0cc34 100644 --- a/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php +++ b/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php @@ -14,7 +14,8 @@ use Symfony\Component\Form\Test\FormIntegrationTestCase as BaseFormIntegrationTestCase; /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use Symfony\Component\Form\Test\FormIntegrationTestCase instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Form\Test\FormIntegrationTestCase} instead. */ abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase { @@ -23,7 +24,7 @@ abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase */ protected function setUp() { - trigger_error('This class is deprecated. Use Symfony\Component\Form\Test\FormIntegrationTestCase 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(); } } diff --git a/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php b/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php index 72054b9a27cac..15ba9303719b5 100644 --- a/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php +++ b/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php @@ -14,7 +14,8 @@ use Symfony\Component\Form\Test\FormPerformanceTestCase as BaseFormPerformanceTestCase; /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use Symfony\Component\Form\Test\FormPerformanceTestCase instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Form\Test\FormPerformanceTestCase} instead. */ abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase { @@ -23,7 +24,7 @@ abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase */ protected function setUp() { - trigger_error('This class is deprecated. Use Symfony\Component\Form\Test\FormPerformanceTestCase 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(); } } diff --git a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php index d49ba78fc0087..3e5965e596e44 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Form\Util; -trigger_error('Symfony\Component\Form\Util\VirtualFormAwareIterator is deprecated since Symfony 2.3 and will be removed in 3.0. Use Symfony\Component\Form\Util\InheritDataAwareIterator instead.', E_USER_DEPRECATED); - /** * Iterator that traverses an array of forms. * @@ -22,11 +20,26 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link InheritDataAwareIterator} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link InheritDataAwareIterator} instead. */ class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator { + public function __construct(\Traversable $iterator) + { + /* + * Prevent to trigger deprecation notice when already using the + * InheritDataAwareIterator class that extends this deprecated one. + * The {@link Symfony\Component\Form\Util\InheritDataAwareIterator::__construct} method + * forces this argument to false. + */ + 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); + } + + parent::__construct($iterator); + } + /** * {@inheritdoc} */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php index ac412d7dc83cb..bbe7561be7c7c 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -169,12 +169,14 @@ public function clear() /** * Returns an iterator for flashes. * - * @deprecated Will be removed in 3.0. + * @deprecated since version 2.4, to be removed in 3.0. * * @return \ArrayIterator An \ArrayIterator instance */ public function getIterator() { + 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()); } } diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php index df31832701d58..fd0c58275df8e 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php @@ -11,6 +11,8 @@ 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); + /** * Session handler using a PDO connection to read and write data. * @@ -24,7 +26,7 @@ * @author Michael Williams * @author Tobias Schultze * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use + * @deprecated since version 2.6, to be removed in 3.0. Use * {@link PdoSessionHandler} instead. */ class LegacyPdoSessionHandler implements \SessionHandlerInterface @@ -77,8 +79,6 @@ public function __construct(\PDO $pdo, array $dbOptions = array()) throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__)); } - trigger_error('"Symfony\Component\HttpFoundation\Session\Storage\Handler\LegacyPdoSessionHandler" is deprecated since version 2.6 and will be removed in 3.0. Use "Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler" instead.', E_USER_DEPRECATED); - $this->pdo = $pdo; $dbOptions = array_merge(array( 'db_id_col' => 'sess_id', diff --git a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php index 38203d4adf7ff..577265bfa04d3 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php @@ -11,7 +11,7 @@ namespace Symfony\Component\HttpKernel\Debug; -trigger_error('Symfony\Component\HttpKernel\Debug\ErrorHandler is deprecated since version 2.3 and will be removed in 3.0. Use the same class from the Debug component 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; @@ -20,7 +20,7 @@ * * @author Fabien Potencier * - * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. + * @deprecated since version 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class ErrorHandler extends DebugErrorHandler { diff --git a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php index 7e31b090c284a..6ffba89f891ff 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php @@ -11,7 +11,7 @@ namespace Symfony\Component\HttpKernel\Debug; -trigger_error('Symfony\Component\HttpKernel\Debug\ExceptionHandler is deprecated since version 2.3 and will be removed in 3.0. Use the same class from the Debug component 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; @@ -20,7 +20,7 @@ * * @author Fabien Potencier * - * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. + * @deprecated since version 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class ExceptionHandler extends DebugExceptionHandler { diff --git a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php index 02df5242bfc47..0a82d76525491 100644 --- a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -34,10 +34,11 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher * * @param Profiler|null $profiler A Profiler instance * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ 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); } /** diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php index 15dffb035d207..386476b3c9ed2 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RegisterListenersPass.php @@ -11,14 +11,14 @@ namespace Symfony\Component\HttpKernel\DependencyInjection; -trigger_error('Class "Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass" is deprecated since 2.5 and will be removed in 3.0. Use "Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass" instead.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\RegisterListenersPass is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass class instead.', E_USER_DEPRECATED); use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass as BaseRegisterListenersPass; /** * Compiler pass to register tagged services for an event dispatcher. * - * @deprecated Deprecated in 2.5, to be removed in 3.0. Use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass instead. + * @deprecated since version 2.5, to be removed in 3.0. Use the Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass class instead. */ class RegisterListenersPass extends BaseRegisterListenersPass { diff --git a/src/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php index d5400b7d6ee01..230a949436270 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ErrorsLoggerListener.php @@ -11,6 +11,8 @@ namespace Symfony\Component\HttpKernel\EventListener; +trigger_error('The '.__NAMESPACE__.'\ErrorsLoggerListener class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\EventListener\DebugHandlersListener class instead.', E_USER_DEPRECATED); + use Psr\Log\LoggerInterface; use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -22,12 +24,11 @@ * @author Colin Frei * @author Konstantin Myakshin * - * @deprecated since 2.6, to be removed in 3.0. Use DebugHandlersListener instead. + * @deprecated since version 2.6, to be removed in 3.0. Use the DebugHandlersListener class instead. */ class ErrorsLoggerListener implements EventSubscriberInterface { private $channel; - private $logger; public function __construct($channel, LoggerInterface $logger = null) diff --git a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php index 63801690174da..9bede00564ba6 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php @@ -11,12 +11,14 @@ namespace Symfony\Component\HttpKernel\EventListener; +trigger_error('The '.__NAMESPACE__.'\EsiListener class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\EventListener\SurrogateListener class instead.', E_USER_DEPRECATED); + /** * EsiListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for ESI. * * @author Fabien Potencier * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use SurrogateListener instead + * @deprecated since version 2.6, to be removed in 3.0. Use SurrogateListener instead */ class EsiListener extends SurrogateListener { diff --git a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php index 5b0ec0ec509e1..46c298e1b8d9a 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -116,7 +116,7 @@ protected function duplicateRequest(\Exception $exception, Request $request) 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, // keep for BC -- as $format can be an argument of the controller callable // see src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php - // @deprecated in 2.4, to be removed in 3.0 + // @deprecated since version 2.4, to be removed in 3.0 'format' => $request->getRequestFormat(), ); $request = $request->duplicate(null, null, $attributes); diff --git a/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php b/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php index d0a2298d1f5ed..3309c2bef9d5a 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php @@ -88,12 +88,14 @@ protected function validateRequest(Request $request) } /** - * @deprecated Deprecated since 2.3.19, to be removed in 3.0. + * @deprecated since version 2.3.19, to be removed in 3.0. * * @return string[] */ protected function getLocalIpAddresses() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3.19 and will be removed in 3.0.', E_USER_DEPRECATED); + return array('127.0.0.1', 'fe80::1', '::1'); } diff --git a/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php index bdcf4c7644a76..ef3911694a970 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -54,10 +54,12 @@ public function __construct($defaultLocale = 'en', RequestContextAwareInterface * * @param Request|null $request A Request instance * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ public function setRequest(Request $request = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (null === $request) { return; } diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index 43d8d03a7f218..781475a9925d2 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -22,7 +22,7 @@ use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** - * ProfilerListener collects data for the current request by listening to the onKernelResponse event. + * ProfilerListener collects data for the current request by listening to the kernel events. * * @author Fabien Potencier */ @@ -49,6 +49,13 @@ class ProfilerListener implements EventSubscriberInterface */ public function __construct(Profiler $profiler, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false, RequestStack $requestStack = null) { + if (null === $requestStack) { + // Prevent the deprecation notice to be triggered all the time. + // The onKernelRequest() method fires some logic only when the + // RequestStack instance is not provided as a dependency. + trigger_error('Since version 2.4, the '.__METHOD__.' method must accept a RequestStack instance to get the request instead of using the '.__CLASS__.'::onKernelRequest method that will be removed in 3.0.', E_USER_DEPRECATED); + } + $this->profiler = $profiler; $this->matcher = $matcher; $this->onlyException = (bool) $onlyException; @@ -73,7 +80,7 @@ public function onKernelException(GetResponseForExceptionEvent $event) } /** - * @deprecated Deprecated since version 2.4, to be removed in 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ public function onKernelRequest(GetResponseEvent $event) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php index e82cde3c02ed9..a116e55e8894b 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -67,6 +67,10 @@ public function __construct($matcher, RequestContext $context = null, LoggerInte throw new \InvalidArgumentException('You must either pass a RequestContext or the matcher must implement RequestContextAwareInterface.'); } + if (!$requestStack instanceof RequestStack) { + trigger_error('The '.__METHOD__.' method now requires a RequestStack instance as '.__CLASS__.'::setRequest method will not be supported anymore in 3.0.'); + } + $this->matcher = $matcher; $this->context = $context ?: $matcher->getContext(); $this->requestStack = $requestStack; @@ -82,13 +86,21 @@ public function __construct($matcher, RequestContext $context = null, LoggerInte * * @param Request|null $request A Request instance * - * @deprecated Deprecated since version 2.4, to be moved to a private function in 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ public function setRequest(Request $request = null) + { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be made private in 3.0.', E_USER_DEPRECATED); + + $this->setCurrentRequest($request); + } + + private function setCurrentRequest(Request $request = null) { if (null !== $request && $this->request !== $request) { $this->context->fromRequest($request); } + $this->request = $request; } @@ -98,7 +110,7 @@ public function onKernelFinishRequest(FinishRequestEvent $event) return; // removed when requestStack is required } - $this->setRequest($this->requestStack->getParentRequest()); + $this->setCurrentRequest($this->requestStack->getParentRequest()); } public function onKernelRequest(GetResponseEvent $event) @@ -106,11 +118,11 @@ public function onKernelRequest(GetResponseEvent $event) $request = $event->getRequest(); // initialize the context that is also used by the generator (assuming matcher and generator share the same context instance) - // we call setRequest even if most of the time, it has already been done to keep compatibility + // we call setCurrentRequest even if most of the time, it has already been done to keep compatibility // with frameworks which do not use the Symfony service container // when we have a RequestStack, no need to do it if (null !== $this->requestStack) { - $this->setRequest($request); + $this->setCurrentRequest($request); } if ($request->attributes->has('_controller')) { diff --git a/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php b/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php index 332916518fb54..04f927313bee4 100644 --- a/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php +++ b/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php @@ -11,13 +11,13 @@ namespace Symfony\Component\HttpKernel\Exception; -trigger_error('Symfony\Component\HttpKernel\Exception\FatalErrorException is deprecated since version 2.3 and will be removed in 3.0. Use the same class from the Debug component instead.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\FatalErrorException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\Exception\FatalErrorException class instead.', E_USER_DEPRECATED); /** * Fatal Error Exception. * * @author Konstanton Myakshin * - * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. + * @deprecated since version 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class_exists('Symfony\Component\Debug\Exception\FatalErrorException'); diff --git a/src/Symfony/Component/HttpKernel/Exception/FlattenException.php b/src/Symfony/Component/HttpKernel/Exception/FlattenException.php index 0089012b9697a..70be1ec8a145b 100644 --- a/src/Symfony/Component/HttpKernel/Exception/FlattenException.php +++ b/src/Symfony/Component/HttpKernel/Exception/FlattenException.php @@ -11,7 +11,7 @@ namespace Symfony\Component\HttpKernel\Exception; -trigger_error('Symfony\Component\HttpKernel\Exception\FlattenException is deprecated since version 2.3 and will be removed in 3.0. Use the same class from the Debug component instead.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\FlattenException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Debug\Exception\FlattenException class instead.', E_USER_DEPRECATED); /** * FlattenException wraps a PHP Exception to be able to serialize it. @@ -20,6 +20,6 @@ * * @author Fabien Potencier * - * @deprecated Deprecated in 2.3, to be removed in 3.0. Use the same class from the Debug component instead. + * @deprecated since version 2.3, to be removed in 3.0. Use the same class from the Debug component instead. */ class_exists('Symfony\Component\Debug\Exception\FlattenException'); diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php index 27fa7eabec3ca..eae715e8acb5e 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -76,10 +76,12 @@ public function addRenderer(FragmentRendererInterface $renderer) * * @param Request|null $request A Request instance * - * @deprecated Deprecated since version 2.4, to be removed in 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ public function setRequest(Request $request = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + $this->request = $request; } diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php index ad8382e55234d..952021dcf544c 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -75,10 +75,12 @@ public function hasSurrogateCapability(Request $request) * * @return bool true if one surrogate has ESI/1.0 capability, false otherwise * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use hasSurrogateCapability() instead + * @deprecated since version 2.6, to be removed in 3.0. Use hasSurrogateCapability() instead */ public function hasSurrogateEsiCapability(Request $request) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the hasSurrogateCapability() method instead.', E_USER_DEPRECATED); + if (null === $value = $request->headers->get('Surrogate-Capability')) { return false; } @@ -101,10 +103,12 @@ public function addSurrogateCapability(Request $request) * * @param Request $request A Request instance * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use addSurrogateCapability() instead + * @deprecated since version 2.6, to be removed in 3.0. Use addSurrogateCapability() instead */ public function addSurrogateEsiCapability(Request $request) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the addSurrogateCapability() method instead.', E_USER_DEPRECATED); + $current = $request->headers->get('Surrogate-Capability'); $new = 'symfony2="ESI/1.0"'; @@ -144,10 +148,12 @@ public function needsParsing(Response $response) * * @return bool true if the Response needs to be parsed, false otherwise * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use needsParsing() instead + * @deprecated since version 2.6, to be removed in 3.0. Use needsParsing() instead */ public function needsEsiParsing(Response $response) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the needsParsing() method instead.', E_USER_DEPRECATED); + if (!$control = $response->headers->get('Surrogate-Control')) { return false; } diff --git a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php index 1bef147595897..0d855464a37e4 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php @@ -15,6 +15,8 @@ namespace Symfony\Component\HttpKernel\HttpCache; +trigger_error('The '.__NAMESPACE__.'\EsiResponseCacheStrategy class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\HttpCache\ResponseCacheStrategy class instead.', E_USER_DEPRECATED); + /** * EsiResponseCacheStrategy knows how to compute the Response cache HTTP header * based on the different ESI response cache headers. @@ -24,7 +26,7 @@ * * @author Fabien Potencier * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use ResponseCacheStrategy instead + * @deprecated since version 2.6, to be removed in 3.0. Use ResponseCacheStrategy instead */ class EsiResponseCacheStrategy extends ResponseCacheStrategy implements EsiResponseCacheStrategyInterface { diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index 83a7e4e3e9ae5..b6ccafc18815c 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -170,10 +170,12 @@ public function getSurrogate() * * @return Esi An Esi instance * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead + * @deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead */ public function getEsi() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getSurrogate() method instead.', E_USER_DEPRECATED); + if (!$this->surrogate instanceof Esi) { throw new \LogicException('This instance of HttpCache was not set up to use ESI as surrogate handler. You must overwrite and use createSurrogate'); } diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 5f533f9587c15..480a9898fa5f8 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -89,16 +89,17 @@ public function __construct($environment, $debug) $defClass = $defClass->getDeclaringClass()->name; if (__CLASS__ !== $defClass) { - trigger_error(sprintf('Calling %s::init() was deprecated in Symfony 2.3 and will be removed in 3.0. Move your logic to the constructor instead.', $defClass), E_USER_DEPRECATED); + trigger_error(sprintf('Calling the %s::init() method is deprecated since version 2.3 and will be removed in 3.0. Move your logic to the constructor method instead.', $defClass), E_USER_DEPRECATED); $this->init(); } } /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Move your logic in the constructor instead. + * @deprecated since version 2.3, to be removed in 3.0. Move your logic in the constructor instead. */ public function init() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Move your logic to the constructor method instead.', E_USER_DEPRECATED); } public function __clone() @@ -216,11 +217,11 @@ public function getBundles() * * @api * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function isClassInActiveBundle($class) { - trigger_error('Symfony\\Component\\HttpKernel\\Kernel::isClassInActiveBundle() is deprecated since version 2.6 and will be removed in version 3.0.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in version 3.0.', E_USER_DEPRECATED); foreach ($this->getBundles() as $bundle) { if (0 === strpos($class, $bundle->getNamespace())) { diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/Component/HttpKernel/KernelInterface.php index 04e5bd640a196..0f6b1db554753 100644 --- a/src/Symfony/Component/HttpKernel/KernelInterface.php +++ b/src/Symfony/Component/HttpKernel/KernelInterface.php @@ -78,7 +78,7 @@ public function getBundles(); * * @api * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function isClassInActiveBundle($class); diff --git a/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php b/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php index 4681dabb1f0d6..737ba4e0f65d0 100644 --- a/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php +++ b/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php @@ -27,28 +27,28 @@ interface LoggerInterface extends PsrLogger /** * @api * - * @deprecated since 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible. + * @deprecated since version 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible. */ public function emerg($message, array $context = array()); /** * @api * - * @deprecated since 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible. + * @deprecated since version 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible. */ public function crit($message, array $context = array()); /** * @api * - * @deprecated since 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible. + * @deprecated since version 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible. */ public function err($message, array $context = array()); /** * @api * - * @deprecated since 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible. + * @deprecated since version 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible. */ public function warn($message, array $context = array()); } diff --git a/src/Symfony/Component/HttpKernel/Log/NullLogger.php b/src/Symfony/Component/HttpKernel/Log/NullLogger.php index ec253e0213bf2..0b2bb4253cb6b 100644 --- a/src/Symfony/Component/HttpKernel/Log/NullLogger.php +++ b/src/Symfony/Component/HttpKernel/Log/NullLogger.php @@ -11,6 +11,8 @@ namespace Symfony\Component\HttpKernel\Log; +trigger_error('The '.__NAMESPACE__.'\NullLogger class is deprecated since version 2.2 and will be removed in 3.0. Use the Psr\Log\NullLogger class instead from the psr/log Composer package.'); + use Psr\Log\NullLogger as PsrNullLogger; /** @@ -24,41 +26,33 @@ class NullLogger extends PsrNullLogger implements LoggerInterface { /** * @api - * - * @deprecated since 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible. */ public function emerg($message, array $context = array()) { - trigger_error('The emerg() method of the NullLogger was removed. You should use the new method emergency() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. You should use the new emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); } /** * @api - * - * @deprecated since 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible. */ public function crit($message, array $context = array()) { - trigger_error('The crit() method of the NullLogger was removed. You should use the new method critical() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. You should use the new critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); } /** * @api - * - * @deprecated since 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible. */ public function err($message, array $context = array()) { - trigger_error('The err() method of the NullLogger was removed. You should use the new method error() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. You should use the new error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); } /** * @api - * - * @deprecated since 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible. */ public function warn($message, array $context = array()) { - trigger_error('The warn() method of the NullLogger was removed. You should use the new method warning() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. You should use the new warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); } } diff --git a/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php index e818c9845f7ce..d94d61c4e6b0a 100644 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Exception; +trigger_error('The '.__NAMESPACE__.'\MethodArgumentNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException as BaseMethodArgumentNotImplementedException; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException} * instead. */ class MethodArgumentNotImplementedException extends BaseMethodArgumentNotImplementedException diff --git a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php index 2b3e0a8c25655..171487a10ac6b 100644 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Exception; +trigger_error('The '.__NAMESPACE__.'\MethodArgumentValueNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException as BaseMethodArgumentValueNotImplementedException; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException} * instead. */ class MethodArgumentValueNotImplementedException extends BaseMethodArgumentValueNotImplementedException diff --git a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php index 205c4517f05be..1ebcc4809debb 100644 --- a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Exception; +trigger_error('The '.__NAMESPACE__.'\MethodNotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\MethodNotImplementedException class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\Exception\MethodNotImplementedException as BaseMethodNotImplementedException; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\Exception\MethodNotImplementedException} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\Exception\MethodNotImplementedException} * instead. */ class MethodNotImplementedException extends BaseMethodNotImplementedException diff --git a/src/Symfony/Component/Locale/Exception/NotImplementedException.php b/src/Symfony/Component/Locale/Exception/NotImplementedException.php index 555f991b24bfb..885c9e56f1401 100644 --- a/src/Symfony/Component/Locale/Exception/NotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/NotImplementedException.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Exception; +trigger_error('The '.__NAMESPACE__.'\NotImplementedException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Exception\NotImplementedException class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\Exception\NotImplementedException as BaseNotImplementedException; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\Exception\NotImplementedException} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\Exception\NotImplementedException} * instead. */ class NotImplementedException extends BaseNotImplementedException diff --git a/src/Symfony/Component/Locale/Locale.php b/src/Symfony/Component/Locale/Locale.php index bd82cf83e66d6..c0c854356481b 100644 --- a/src/Symfony/Component/Locale/Locale.php +++ b/src/Symfony/Component/Locale/Locale.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Locale; -trigger_error('\Symfony\Component\Locale\Locale is deprecated since version 2.7, to be removed in Symfony 3.0. Use the methods provided by \Symfony\Component\Intl\Intl instead.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\Locale class is deprecated since version 2.7, to be removed in Symfony 3.0. Use the methods provided by the \Symfony\Component\Intl\Intl class instead.', E_USER_DEPRECATED); use Symfony\Component\Intl\Intl; @@ -20,7 +20,7 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. + * @deprecated since version 2.3, to be removed in 3.0. * Use {@link \Locale} and {@link \Symfony\Component\Intl\Intl} instead. */ class Locale extends \Locale diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php index 8bc8e087ea7c1..7c3b9fdc08965 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\AmPmTransformer class is deprecated since version 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer as BaseAmPmTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer} * instead. */ class AmPmTransformer extends BaseAmPmTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php index e730881c56d95..5368c6609841b 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\DayOfWeekTransformer class is deprecated since version 2.3 and will be removed in Symfony 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer as BaseDayOfWeekTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer} * instead. */ class DayOfWeekTransformer extends BaseDayOfWeekTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php index 157c51d38b71f..442085287b657 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\DayOfYearTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer as BaseDayOfYearTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer} * instead. */ class DayOfYearTransformer extends BaseDayOfYearTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php index ba5fc75145838..a85ea820bafc2 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\DayTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer as BaseDayTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer} * instead. */ class DayTransformer extends BaseDayTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php index 4e487d661bb4f..2c2c0d2266b24 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\FullTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer as BaseFullTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer} * instead. */ class FullTransformer extends BaseFullTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php index 7a43e9e92ab9b..253f7274b1e9f 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\Hour1200Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer as BaseHour1200Transformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer} * instead. */ class Hour1200Transformer extends BaseHour1200Transformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php index 8bde89d28fed2..f689c45a6ef82 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\Hour1201Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer as BaseHour1201Transformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer} * instead. */ class Hour1201Transformer extends BaseHour1201Transformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php index b8081e3b32737..2e34f168ad720 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\Hour2400Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer as BaseHour2400Transformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer} * instead. */ class Hour2400Transformer extends BaseHour2400Transformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php index 20dd4aece5d17..f9cb610df61cb 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\Hour2401Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer as BaseHour2401Transformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer} * instead. */ class Hour2401Transformer extends BaseHour2401Transformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php index a3e0c0f644ffe..7e5df5a729c3b 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\HourTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer as BaseHourTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer} * instead. */ abstract class HourTransformer extends BaseHourTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php index 9b4b943fe66f9..6768404fd993d 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\MinuteTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer as BaseMinuteTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer} * instead. */ class MinuteTransformer extends BaseMinuteTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php index 7247d747b06f3..351ff0e6f68f9 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\MonthTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer as BaseMonthTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer} * instead. */ class MonthTransformer extends BaseMonthTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php index 56fb4d14ae860..ef09fa4bceaf7 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\QuarterTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer as BaseQuarterTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer} * instead. */ class QuarterTransformer extends BaseQuarterTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php index 160ac2a282060..6afc55004daf1 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\SecondTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer as BaseSecondTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer} * instead. */ class SecondTransformer extends BaseSecondTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php index b28f024a71c65..7af84f2971789 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\TimeZoneTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer as BaseTimeZoneTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer} * instead. */ class TimeZoneTransformer extends BaseTimeZoneTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php index 447f8714d3c02..7b9cf155c8e27 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\Transformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\Transformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\Transformer as BaseTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Transformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Transformer} * instead. */ abstract class Transformer extends BaseTransformer diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php index a9adae5131526..f733c8abf9aae 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub\DateFormat; +trigger_error('The '.__NAMESPACE__.'\YearTransformer class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer as BaseYearTransformer; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer} * instead. */ class YearTransformer extends BaseYearTransformer diff --git a/src/Symfony/Component/Locale/Stub/StubCollator.php b/src/Symfony/Component/Locale/Stub/StubCollator.php index 078078ce90b86..eeffde1ec27dd 100644 --- a/src/Symfony/Component/Locale/Stub/StubCollator.php +++ b/src/Symfony/Component/Locale/Stub/StubCollator.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub; +trigger_error('The '.__NAMESPACE__.'\StubCollator class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Collator\Collator class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\Collator\Collator; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\Collator\Collator} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\Collator\Collator} instead. */ class StubCollator extends Collator { diff --git a/src/Symfony/Component/Locale/Stub/StubIntl.php b/src/Symfony/Component/Locale/Stub/StubIntl.php index b7fd087c1bf21..4562791291956 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntl.php +++ b/src/Symfony/Component/Locale/Stub/StubIntl.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub; +trigger_error('The '.__NAMESPACE__.'\StubIntl class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Globals\IntlGlobals class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\Globals\IntlGlobals; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\Globals\IntlGlobals} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\Globals\IntlGlobals} instead. */ abstract class StubIntl extends IntlGlobals { diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php index ccb94d211aac6..4826f27ade9a0 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub; +trigger_error('The '.__NAMESPACE__.'\StubIntlDateFormatter class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\DateFormatter\IntlDateFormatter class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\DateFormatter\IntlDateFormatter} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\DateFormatter\IntlDateFormatter} * instead. */ class StubIntlDateFormatter extends IntlDateFormatter diff --git a/src/Symfony/Component/Locale/Stub/StubLocale.php b/src/Symfony/Component/Locale/Stub/StubLocale.php index 3ef259c06bb29..001bf53c0012d 100644 --- a/src/Symfony/Component/Locale/Stub/StubLocale.php +++ b/src/Symfony/Component/Locale/Stub/StubLocale.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub; +trigger_error('The '.__NAMESPACE__.'\StubLocale class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\Locale\Locale and Symfony\Component\Intl\Intl classes instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\Locale\Locale; @@ -19,8 +21,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\Locale\Locale} and + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\Locale\Locale} and * {@link \Symfony\Component\Intl\Intl} instead. */ class StubLocale extends Locale diff --git a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php index d1900692e68d2..aa4aae014d4b1 100644 --- a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Locale\Stub; +trigger_error('The '.__NAMESPACE__.'\StubNumberFormatter class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Intl\NumberFormatter\NumberFormatter class instead.', E_USER_DEPRECATED); + use Symfony\Component\Intl\NumberFormatter\NumberFormatter; /** @@ -18,8 +20,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Intl\NumberFormatter\NumberFormatter} + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Intl\NumberFormatter\NumberFormatter} * instead. */ class StubNumberFormatter extends NumberFormatter diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php index 42c3d249daa7b..96f28cc348ad8 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -1011,20 +1011,24 @@ public function count() /** * Alias of {@link setDefault()}. * - * @deprecated Deprecated as of Symfony 2.6, to be removed in Symfony 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function set($option, $value) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefaults() method instead.', E_USER_DEPRECATED); + return $this->setDefault($option, $value); } /** * Shortcut for {@link clear()} and {@link setDefaults()}. * - * @deprecated Deprecated as of Symfony 2.6, to be removed in Symfony 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function replace(array $defaults) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED); + $this->clear(); return $this->setDefaults($defaults); @@ -1033,40 +1037,48 @@ public function replace(array $defaults) /** * Alias of {@link setDefault()}. * - * @deprecated Deprecated as of Symfony 2.6, to be removed in Symfony 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function overload($option, $value) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefault() method instead.', E_USER_DEPRECATED); + return $this->setDefault($option, $value); } /** * Alias of {@link offsetGet()}. * - * @deprecated Deprecated as of Symfony 2.6, to be removed in Symfony 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function get($option) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED); + return $this->offsetGet($option); } /** * Alias of {@link offsetExists()}. * - * @deprecated Deprecated as of Symfony 2.6, to be removed in Symfony 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function has($option) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the ArrayAccess syntax instead to get an option value.', E_USER_DEPRECATED); + return $this->offsetExists($option); } /** * Shortcut for {@link clear()} and {@link setDefaults()}. * - * @deprecated Deprecated as of Symfony 2.6, to be removed in Symfony 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function replaceDefaults(array $defaultValues) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the clear() and setDefaults() methods instead.', E_USER_DEPRECATED); + $this->clear(); return $this->setDefaults($defaultValues); @@ -1075,20 +1087,24 @@ public function replaceDefaults(array $defaultValues) /** * Alias of {@link setDefined()}. * - * @deprecated Deprecated as of Symfony 2.6, to be removed in Symfony 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function setOptional(array $optionNames) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setDefined() method instead.', E_USER_DEPRECATED); + return $this->setDefined($optionNames); } /** * Alias of {@link isDefined()}. * - * @deprecated Deprecated as of Symfony 2.6, to be removed in Symfony 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ public function isKnown($option) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the isDefined() method instead.', E_USER_DEPRECATED); + return $this->isDefined($option); } diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php index cc177487d0eda..7e983f22f958a 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\OptionsResolver; -trigger_error('The "Symfony\Component\OptionsResolver\OptionsResolverInterface" interface was deprecated in version 2.6 and will be removed in 3.0. Use "Symfony\Component\OptionsResolver\OptionsResolver" instead.', E_USER_DEPRECATED); - use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException; @@ -22,6 +20,7 @@ * * @deprecated since version 2.6, to be removed in Symfony 3.0. * Use {@link OptionsResolver} instead. + * @deprecated since version 2.6, to be removed in 3.0. Use {@link OptionsResolver} instead. */ interface OptionsResolverInterface { diff --git a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php index 4353c0f49f0a7..6f98ecc35976e 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php @@ -33,7 +33,7 @@ public function testSetLazyOption() $test = $this; $this->options->set('foo', function (Options $options) use ($test) { - return 'dynamic'; + return 'dynamic'; }); $this->assertEquals(array('foo' => 'dynamic'), $this->options->resolve()); diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 8b12cb87089e1..9242eb3f720fb 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1062,12 +1062,13 @@ public function setEnv(array $env) * * @return string|null The current contents * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. + * Use setInput() instead. * This method is deprecated in favor of getInput. */ public function getStdin() { - trigger_error('getStdin() is deprecated since version 2.5 and will be removed in 3.0, use getInput() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getInput() method instead.', E_USER_DEPRECATED); return $this->getInput(); } @@ -1089,15 +1090,15 @@ public function getInput() * * @return self The current Process instance * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. - * This method is deprecated in favor of setInput. + * @deprecated since version 2.5, to be removed in 3.0. + * Use setInput() instead. * * @throws LogicException In case the process is running * @throws InvalidArgumentException In case the argument is invalid */ public function setStdin($stdin) { - trigger_error('setStdin() is deprecated since version 2.5 and will be removed in 3.0, use setInput() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the setInput() method instead.', E_USER_DEPRECATED); return $this->setInput($stdin); } diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccess.php b/src/Symfony/Component/PropertyAccess/PropertyAccess.php index b0effd12984b5..91f2ec371e0e9 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -43,12 +43,12 @@ public static function createPropertyAccessorBuilder() * * @return PropertyAccessor The new property accessor * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link createPropertyAccessor()} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link createPropertyAccessor()} instead. */ public static function getPropertyAccessor() { - trigger_error('PropertyAccess::getPropertyAccessor() is deprecated since version 2.3 and will be removed in 3.0. Use PropertyAccess::createPropertyAccessor() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the createPropertyAccessor() method instead.', E_USER_DEPRECATED); return self::createPropertyAccessor(); } diff --git a/src/Symfony/Component/Routing/Annotation/Route.php b/src/Symfony/Component/Routing/Annotation/Route.php index 90521c0be8e0d..af2158250c770 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -55,18 +55,22 @@ public function __construct(array $data) } /** - * @deprecated Deprecated in 2.2, to be removed in 3.0. Use setPath instead. + * @deprecated since version 2.2, to be removed in 3.0. Use setPath instead. */ public function setPattern($pattern) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the setPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); + $this->path = $pattern; } /** - * @deprecated Deprecated in 2.2, to be removed in 3.0. Use getPath instead. + * @deprecated since version 2.2, to be removed in 3.0. Use getPath instead. */ public function getPattern() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the getPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); + return $this->path; } diff --git a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php index adc435c5cd487..57ad67ab5626e 100644 --- a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -11,14 +11,14 @@ namespace Symfony\Component\Routing\Matcher; -trigger_error('The Symfony\Component\Routing\Matcher\Dumper\ApacheUrlMatcher is deprecated since it\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\ApacheUrlMatcher class is deprecated since version 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); use Symfony\Component\Routing\Exception\MethodNotAllowedException; /** * ApacheUrlMatcher matches URL based on Apache mod_rewrite matching (see ApacheMatcherDumper). * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * The performance gains are minimal and it's very hard to replicate * the behavior of PHP implementation. * diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index b03d596bbd54e..a7cc485b925a2 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -11,14 +11,14 @@ namespace Symfony\Component\Routing\Matcher\Dumper; -trigger_error('The Symfony\Component\Routing\Matcher\Dumper\ApacheMatcherDumper is deprecated since it\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\ApacheMatcherDumper class is deprecated since version 2.5 and will be removed in 3.0. It\'s hard to replicate the behaviour of the PHP implementation and the performance gains are minimal.', E_USER_DEPRECATED); use Symfony\Component\Routing\Route; /** * Dumps a set of Apache mod_rewrite rules. * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * The performance gains are minimal and it's very hard to replicate * the behavior of PHP implementation. * diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index d2ddbd3932246..02b81b3483f9f 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -147,10 +147,12 @@ public function unserialize($serialized) * * @return string The pattern * - * @deprecated Deprecated in 2.2, to be removed in 3.0. Use getPath instead. + * @deprecated since version 2.2, to be removed in 3.0. Use getPath instead. */ public function getPattern() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the getPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); + return $this->path; } @@ -163,10 +165,12 @@ public function getPattern() * * @return Route The current Route instance * - * @deprecated Deprecated in 2.2, to be removed in 3.0. Use setPath instead. + * @deprecated since version 2.2, to be removed in 3.0. Use setPath instead. */ public function setPattern($pattern) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Use the setPath() method instead and use the "path" option instead of the "pattern" option in the route definition.', E_USER_DEPRECATED); + return $this->setPath($pattern); } diff --git a/src/Symfony/Component/Security/Core/SecurityContext.php b/src/Symfony/Component/Security/Core/SecurityContext.php index 165c22ada617a..7695959037740 100644 --- a/src/Symfony/Component/Security/Core/SecurityContext.php +++ b/src/Symfony/Component/Security/Core/SecurityContext.php @@ -26,7 +26,7 @@ * * @author Fabien Potencier * @author Johannes M. Schmitt - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ class SecurityContext implements SecurityContextInterface { @@ -70,26 +70,38 @@ public function __construct($tokenStorage, $authorizationChecker, $alwaysAuthent } /** + * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::getToken() instead. + * * {@inheritdoc} */ public function getToken() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage::getToken() method instead.', E_USER_DEPRECATED); + return $this->tokenStorage->getToken(); } /** + * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::setToken() instead. + * * {@inheritdoc} */ public function setToken(TokenInterface $token = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage::setToken() method instead.', E_USER_DEPRECATED); + return $this->tokenStorage->setToken($token); } /** + * @deprecated since version 2.6, to be removed in 3.0. Use AuthorizationCheckerInterface::isGranted() instead. + * * {@inheritdoc} */ public function isGranted($attributes, $object = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::isGranted() method instead.', E_USER_DEPRECATED); + return $this->authorizationChecker->isGranted($attributes, $object); } } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 4bb5b43dd0945..14c1a752c9465 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -55,12 +55,15 @@ public function __construct($associative = false, $depth = 512) * * @return int * - * @deprecated since 2.5, decode() throws an exception if error found, will be removed in 3.0 + * @deprecated since version 2.5, to be removed in 3.0. + * The {@self decode()} method throws an exception if error found. * * @see http://php.net/manual/en/function.json-last-error.php json_last_error */ public function getLastError() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED); + return $this->lastError; } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index ff377db9939b6..76345bed694b2 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -33,12 +33,15 @@ public function __construct($bitmask = 0) * * @return int * - * @deprecated since 2.5, encode() throws an exception if error found, will be removed in 3.0 + * @deprecated since version 2.5, to be removed in 3.0. + * The {@self encode()} throws an exception if error found. * * @see http://php.net/manual/en/function.json-last-error.php json_last_error */ public function getLastError() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED); + return $this->lastError; } diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php index 2231dd624add9..1f7a1fb0e3301 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -41,10 +41,12 @@ public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodin * * @return int * - * @deprecated since 2.5, JsonEncode throws exception if an error is found, will be removed in 3.0 + * @deprecated since version 2.5, to be removed in 3.0. JsonEncode throws exception if an error is found. */ public function getLastEncodingError() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonEncode::encode() method instead to get the last JSON encoding error.', E_USER_DEPRECATED); + return $this->encodingImpl->getLastError(); } @@ -53,10 +55,12 @@ public function getLastEncodingError() * * @return int * - * @deprecated since 2.5, JsonDecode throws exception if an error is found, will be removed in 3.0 + * @deprecated since version 2.5, to be removed in 3.0. JsonDecode throws exception if an error is found. */ public function getLastDecodingError() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Catch the exception raised by the Symfony\Component\Serializer\Encoder\JsonDecode::decode() method instead to get the last JSON decoding error.', E_USER_DEPRECATED); + return $this->decodingImpl->getLastError(); } diff --git a/src/Symfony/Component/Templating/Loader/Loader.php b/src/Symfony/Component/Templating/Loader/Loader.php index 7239ac73d2a86..2572892f28550 100644 --- a/src/Symfony/Component/Templating/Loader/Loader.php +++ b/src/Symfony/Component/Templating/Loader/Loader.php @@ -27,7 +27,7 @@ abstract class Loader implements LoaderInterface protected $logger; /** - * @deprecated Deprecated in 2.4, to be removed in 3.0. Use $this->logger instead. + * @deprecated since version 2.4, to be removed in 3.0. Use $this->logger instead. */ protected $debugger; @@ -46,10 +46,12 @@ public function setLogger(LoggerInterface $logger) * * @param DebuggerInterface $debugger A debugger instance * - * @deprecated Deprecated in 2.4, to be removed in 3.0. Use $this->setLogger() instead. + * @deprecated since version 2.4, to be removed in 3.0. Use $this->setLogger() instead. */ public function setDebugger(DebuggerInterface $debugger) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. Use the setLogger() method instead.', E_USER_DEPRECATED); + $this->debugger = $debugger; } } diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 7ad2043f975de..69d765b78ed5c 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -154,13 +154,13 @@ public function getLocale() * * @throws \InvalidArgumentException If a locale contains invalid characters * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use setFallbackLocales() instead. + * @deprecated since version 2.3, to be removed in 3.0. Use setFallbackLocales() instead. * * @api */ public function setFallbackLocale($locales) { - trigger_error('The setFallbackLocale() method is deprecated since version 2.3 and will be removed in 3.0. Use setFallbackLocales() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the setFallbackLocales() method instead.', E_USER_DEPRECATED); $this->setFallbackLocales(is_array($locales) ? $locales : array($locales)); } diff --git a/src/Symfony/Component/Validator/ClassBasedInterface.php b/src/Symfony/Component/Validator/ClassBasedInterface.php index cc8679e099165..7c2eb8f0f7c92 100644 --- a/src/Symfony/Component/Validator/ClassBasedInterface.php +++ b/src/Symfony/Component/Validator/ClassBasedInterface.php @@ -11,14 +11,12 @@ namespace Symfony\Component\Validator; -trigger_error('The Symfony\Component\Validator\ClassBasedInterface interface was deprecated in version 2.7 and will be removed in 3.0. Use Symfony\Component\Validator\Mapping\ClassMetadataInterface instead', E_USER_DEPRECATED); - /** * An object backed by a PHP class. * * @author Bernhard Schussek * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\ClassMetadataInterface} instead. */ interface ClassBasedInterface diff --git a/src/Symfony/Component/Validator/ConstraintValidator.php b/src/Symfony/Component/Validator/ConstraintValidator.php index 61c994a6293b6..7a412737bd9a1 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -61,10 +61,12 @@ public function initialize(ExecutionContextInterface $context) * * @return ConstraintViolationBuilderInterface The violation builder * - * @deprecated This method will be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ protected function buildViolation($message, array $parameters = array()) { + trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + if ($this->context instanceof ExecutionContextInterface2Dot5) { return $this->context->buildViolation($message, $parameters); } @@ -82,10 +84,12 @@ protected function buildViolation($message, array $parameters = array()) * * @return ConstraintViolationBuilderInterface The violation builder * - * @deprecated This method will be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ protected function buildViolationInContext(ExecutionContextInterface $context, $message, array $parameters = array()) { + trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + if ($context instanceof ExecutionContextInterface2Dot5) { return $context->buildViolation($message, $parameters); } diff --git a/src/Symfony/Component/Validator/ConstraintViolation.php b/src/Symfony/Component/Validator/ConstraintViolation.php index 9ed829a76bacc..7df3f3fadeef7 100644 --- a/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/Symfony/Component/Validator/ConstraintViolation.php @@ -142,12 +142,12 @@ public function getMessageTemplate() /** * {@inheritdoc} * - * @deprecated Deprecated since version 2.7, to be removed in 3.0. + * @deprecated since version 2.7, to be removed in 3.0. * Use getParameters() instead */ public function getMessageParameters() { - trigger_error('ConstraintViolation::getMessageParameters() was deprecated since version 2.7, to be removed in 3.0. Use ConstraintViolation::getParameters() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getParameters() method instead.', E_USER_DEPRECATED); return $this->parameters; } @@ -163,12 +163,12 @@ public function getParameters() /** * {@inheritdoc} * - * @deprecated Deprecated since version 2.7, to be removed in 3.0. + * @deprecated since version 2.7, to be removed in 3.0. * Use getPlural() instead */ public function getMessagePluralization() { - trigger_error('ConstraintViolation::getMessagePluralization() was deprecated since version 2.7, to be removed in 3.0. Use ConstraintViolation::getPlural() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.7, to be removed in 3.0. Use the ConstraintViolation::getPlural() method instead.', E_USER_DEPRECATED); return $this->plural; } diff --git a/src/Symfony/Component/Validator/Constraints/Callback.php b/src/Symfony/Component/Validator/Constraints/Callback.php index 312952a7fa2f8..95dc45979a85c 100644 --- a/src/Symfony/Component/Validator/Constraints/Callback.php +++ b/src/Symfony/Component/Validator/Constraints/Callback.php @@ -33,7 +33,7 @@ class Callback extends Constraint /** * @var array * - * @deprecated Deprecated since version 2.4, to be removed in Symfony 3.0. + * @deprecated since version 2.4, to be removed in 3.0. */ public $methods; @@ -52,6 +52,7 @@ public function __construct($options = null) $options = array('callback' => $options); } else { // BC with Symfony < 2.4 + trigger_error('The "methods" option of the '.__CLASS__.' class is deprecated since version 2.4 and will be removed in 3.0. Use the "callback" option instead.', E_USER_DEPRECATED); $options = array('methods' => $options); } } diff --git a/src/Symfony/Component/Validator/Constraints/Collection/Optional.php b/src/Symfony/Component/Validator/Constraints/Collection/Optional.php index 66463e55e45fd..cd9af50b9acfa 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection/Optional.php +++ b/src/Symfony/Component/Validator/Constraints/Collection/Optional.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints\Collection; -trigger_error('Symfony\Component\Validator\Constraints\Collection\Optional was deprecated in version 2.3 and will be removed in 3.0. You should use Symfony\Component\Validator\Constraints\Optional instead.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\Optional class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Optional class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Constraints\Optional as BaseOptional; @@ -21,8 +21,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated in 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Validator\Constraints\Optional} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Validator\Constraints\Optional} instead. */ class Optional extends BaseOptional { diff --git a/src/Symfony/Component/Validator/Constraints/Collection/Required.php b/src/Symfony/Component/Validator/Constraints/Collection/Required.php index 3a2e96d82a0c9..55041020b7a56 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection/Required.php +++ b/src/Symfony/Component/Validator/Constraints/Collection/Required.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Constraints\Collection; -trigger_error('Symfony\Component\Validator\Constraints\Collection\Required was deprecated in version 2.3 and will be removed in 3.0. You should use Symfony\Component\Validator\Constraints\Required instead.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\Required class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Validator\Constraints\Required class instead.', E_USER_DEPRECATED); use Symfony\Component\Validator\Constraints\Required as BaseRequired; @@ -21,8 +21,8 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated in 2.3, to be removed in 3.0. Use - * {@link \Symfony\Component\Validator\Constraints\Required} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link \Symfony\Component\Validator\Constraints\Required} instead. */ class Required extends BaseRequired { diff --git a/src/Symfony/Component/Validator/Constraints/Deprecated/UuidValidator.php b/src/Symfony/Component/Validator/Constraints/Deprecated/UuidValidator.php new file mode 100644 index 0000000000000..46ca7ba67c156 --- /dev/null +++ b/src/Symfony/Component/Validator/Constraints/Deprecated/UuidValidator.php @@ -0,0 +1,30 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Constraints\Deprecated; + +trigger_error('Constants STRICT_PATTERN, LOOSE_PATTERN and STRICT_UUID_LENGTH in class Symfony\Component\Validator\Constraints\UuidValidator are deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); + +/** + * @deprecated since version 2.7, to be removed in 3.0. + * @internal + */ +final class UuidValidator +{ + const STRICT_PATTERN = '/^[a-f0-9]{8}-[a-f0-9]{4}-[%s][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i'; + const LOOSE_PATTERN = '/^[a-f0-9]{4}(?:-?[a-f0-9]{4}){7}$/i'; + const STRICT_UUID_LENGTH = 36; + + private function __construct() + { + + } +} diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index 72bfb16d2c862..52d75394313a8 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -97,47 +97,56 @@ public function __construct(array $groups) /** * Returns an iterator for this group. * + * Implemented for backwards compatibility with Symfony < 2.5. + * * @return \Traversable The iterator * * @see \IteratorAggregate::getIterator() * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function getIterator() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + return new \ArrayIterator($this->groups); } /** * Returns whether the given offset exists in the sequence. * + * Implemented for backwards compatibility with Symfony < 2.5. + * * @param int $offset The offset * * @return bool Whether the offset exists * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function offsetExists($offset) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + return isset($this->groups[$offset]); } /** * Returns the group at the given offset. * + * Implemented for backwards compatibility with Symfony < 2.5. + * * @param int $offset The offset * * @return string The group a the given offset * * @throws OutOfBoundsException If the object does not exist * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function offsetGet($offset) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + if (!isset($this->groups[$offset])) { throw new OutOfBoundsException(sprintf( 'The offset "%s" does not exist.', @@ -151,14 +160,17 @@ public function offsetGet($offset) /** * Sets the group at the given offset. * + * Implemented for backwards compatibility with Symfony < 2.5. + * * @param int $offset The offset * @param string $value The group name * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function offsetSet($offset, $value) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + if (null !== $offset) { $this->groups[$offset] = $value; @@ -171,26 +183,32 @@ public function offsetSet($offset, $value) /** * Removes the group at the given offset. * + * Implemented for backwards compatibility with Symfony < 2.5. + * * @param int $offset The offset * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function offsetUnset($offset) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + unset($this->groups[$offset]); } /** * Returns the number of groups in the sequence. * + * Implemented for backwards compatibility with Symfony < 2.5. + * * @return int The number of groups * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function count() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + return count($this->groups); } } diff --git a/src/Symfony/Component/Validator/Constraints/Isbn.php b/src/Symfony/Component/Validator/Constraints/Isbn.php index 67d177f4e0439..35cb82204e245 100644 --- a/src/Symfony/Component/Validator/Constraints/Isbn.php +++ b/src/Symfony/Component/Validator/Constraints/Isbn.php @@ -44,13 +44,13 @@ class Isbn extends Constraint public $message; /** - * @deprecated Deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. + * @deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. * @var bool */ public $isbn10 = false; /** - * @deprecated Deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. + * @deprecated since version 2.5, to be removed in 3.0. Use option "type" instead. * @var bool */ public $isbn13 = false; diff --git a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php index 8a53fe7941d19..403ee93b3fab4 100644 --- a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php @@ -48,8 +48,10 @@ public function validate($value, Constraint $constraint) if (null == $constraint->type) { if ($constraint->isbn10 && !$constraint->isbn13) { + trigger_error('The "isbn10" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); $constraint->type = 'isbn10'; } elseif ($constraint->isbn13 && !$constraint->isbn10) { + trigger_error('The "isbn13" option of the Isbn constraint is deprecated since version 2.5 and will be removed in 3.0. Use the "type" option instead.', E_USER_DEPRECATED); $constraint->type = 'isbn13'; } } diff --git a/src/Symfony/Component/Validator/Constraints/UuidValidator.php b/src/Symfony/Component/Validator/Constraints/UuidValidator.php index 0ae04e2694f37..e026705c04553 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -13,6 +13,7 @@ use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; +use Symfony\Component\Validator\Constraints\Deprecated\UuidValidator as Deprecated; use Symfony\Component\Validator\Exception\UnexpectedTypeException; /** @@ -56,19 +57,19 @@ class UuidValidator extends ConstraintValidator const LOOSE_FIRST_HYPHEN_POSITION = 4; /** - * @deprecated Deprecated since Symfony 2.6, to be removed in 3.0 + * @deprecated since version 2.6, to be removed in 3.0 */ - const STRICT_PATTERN = '/^[a-f0-9]{8}-[a-f0-9]{4}-[%s][a-f0-9]{3}-[89ab][a-f0-9]{3}-[a-f0-9]{12}$/i'; + const STRICT_PATTERN = Deprecated::STRICT_PATTERN; /** - * @deprecated Deprecated since Symfony 2.6, to be removed in 3.0 + * @deprecated since version 2.6, to be removed in 3.0 */ - const LOOSE_PATTERN = '/^[a-f0-9]{4}(?:-?[a-f0-9]{4}){7}$/i'; + const LOOSE_PATTERN = Deprecated::LOOSE_PATTERN; /** - * @deprecated Deprecated since Symfony 2.6, to be removed in 3.0 + * @deprecated since version 2.6, to be removed in 3.0 */ - const STRICT_UUID_LENGTH = self::STRICT_LENGTH; + const STRICT_UUID_LENGTH = Deprecated::STRICT_UUID_LENGTH; /** * {@inheritdoc} diff --git a/src/Symfony/Component/Validator/Constraints/Valid.php b/src/Symfony/Component/Validator/Constraints/Valid.php index 1cff5e27dac6c..cb520c93d4c55 100644 --- a/src/Symfony/Component/Validator/Constraints/Valid.php +++ b/src/Symfony/Component/Validator/Constraints/Valid.php @@ -27,7 +27,7 @@ class Valid extends Constraint public $traverse = true; /** - * @deprecated Deprecated as of version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in Symfony 3.0. */ public $deep = true; @@ -41,7 +41,7 @@ public function __construct($options = null) } if (is_array($options) && array_key_exists('deep', $options)) { - trigger_error('The "deep" option for the Valid constraint is deprecated since 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED); + trigger_error('The "deep" option for the Valid constraint is deprecated since version 2.5 and will be removed in 3.0. When traversing arrays, nested arrays are always traversed. When traversing nested objects, their traversal strategy is used.', E_USER_DEPRECATED); } parent::__construct($options); diff --git a/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/Symfony/Component/Validator/Context/ExecutionContext.php index d7f157da1c3fa..0079d23272bb3 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -188,7 +188,7 @@ public function addViolation($message, array $parameters = array(), $invalidValu // You should use buildViolation() instead. if (func_num_args() > 2) { throw new BadMethodCallException( - 'The parameters $invalidValue, $pluralization and $code are '. + 'The parameters $invalidValue, $plural and $code are '. 'not supported anymore as of Symfony 2.5. Please use '. 'buildViolation() instead or enable the legacy mode.' ); @@ -321,8 +321,6 @@ public function addViolationAt($subPath, $message, array $parameters = array(), */ public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false) { - trigger_error('ExecutionContext::validate() is deprecated since version 2.5 and will be removed in 3.0. Use ExecutionContext::getValidator() together with inContext() instead.', E_USER_DEPRECATED); - throw new BadMethodCallException( 'validate() is not supported anymore as of Symfony 2.5. '. 'Please use getValidator() instead or enable the legacy mode.' @@ -334,8 +332,6 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals */ public function validateValue($value, $constraints, $subPath = '', $groups = null) { - trigger_error('ExecutionContext::validateValue() is deprecated since version 2.5 and will be removed in 3.0. Use ExecutionContext::getValidator() together with inContext() instead.', E_USER_DEPRECATED); - throw new BadMethodCallException( 'validateValue() is not supported anymore as of Symfony 2.5. '. 'Please use getValidator() instead or enable the legacy mode.' diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php index de34b1fc2cae6..8ce6bdb304b4f 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php @@ -22,8 +22,7 @@ * @since 2.5 * @author Bernhard Schussek * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ class LegacyExecutionContext extends ExecutionContext { @@ -58,6 +57,8 @@ public function __construct(ValidatorInterface $validator, $root, MetadataFactor public function addViolation($message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) { if (func_num_args() > 2) { + trigger_error('The parameters $invalidValue, $plural and $code in method '.__METHOD__.' are deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); + $this ->buildViolation($message, $parameters) ->setInvalidValue($invalidValue) @@ -77,6 +78,8 @@ public function addViolation($message, array $parameters = array(), $invalidValu */ public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); + if (func_num_args() > 2) { $this ->buildViolation($message, $parameters) @@ -138,6 +141,8 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals */ public function validateValue($value, $constraints, $subPath = '', $groups = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::validate method instead.', E_USER_DEPRECATED); + return $this ->getValidator() ->inContext($this) @@ -151,6 +156,8 @@ public function validateValue($value, $constraints, $subPath = '', $groups = nul */ public function getMetadataFactory() { + trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext::getValidator method in combination with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); + return $this->metadataFactory; } } diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php index cf5cd07e9ef54..c24c1fad3d6eb 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php @@ -18,11 +18,12 @@ /** * Creates new {@link LegacyExecutionContext} instances. * + * Implemented for backward compatibility with Symfony < 2.5. + * * @since 2.5 * @author Bernhard Schussek * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ class LegacyExecutionContextFactory implements ExecutionContextFactoryInterface { diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index 31911b8d712c6..d21dd780f1c06 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator; +trigger_error('The '.__NAMESPACE__.'\ExecutionContext class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); + use Symfony\Component\Translation\TranslatorInterface; /** @@ -21,7 +23,7 @@ * @author Fabien Potencier * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContext} instead. */ class ExecutionContext implements ExecutionContextInterface diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 2da670f00fac1..3fedfe15de02f 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('The "Symfony\Component\Validator\ExecutionContextInterface" interface was deprecated in version 2.5 and will be removed in 3.0. Use "Symfony\Component\Validator\Context\ExecutionContextInterface" instead.', E_USER_DEPRECATED); - /** * Stores the validator's state during validation. * @@ -85,7 +83,7 @@ * * @api * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface} instead. */ interface ExecutionContextInterface @@ -101,9 +99,7 @@ interface ExecutionContextInterface * * @api * - * @deprecated The parameters $invalidValue, $pluralization and $code are - * deprecated since version 2.5 and will be removed in - * Symfony 3.0. + * @deprecated the parameters $invalidValue, $plural and $code are deprecated since version 2.5 and will be removed in 3.0. */ public function addViolation($message, array $params = array(), $invalidValue = null, $plural = null, $code = null); @@ -120,7 +116,7 @@ public function addViolation($message, array $params = array(), $invalidValue = * * @api * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::buildViolation()} * instead. */ @@ -165,7 +161,7 @@ public function addViolationAt($subPath, $message, array $parameters = array(), * @param bool $deep Whether to traverse the value recursively if * it is a collection of collections. * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::getValidator()} * instead. */ @@ -198,7 +194,7 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals * groups here, the current group of the context * will be used. * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::getValidator()} * instead. */ @@ -259,7 +255,7 @@ public function getMetadata(); * * @return MetadataFactoryInterface The metadata factory. * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface::getValidator()} * instead and call * {@link Validator\ValidatorInterface::getMetadataFor()} or diff --git a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php index f07afc8345a5f..5c646f294baee 100644 --- a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('Symfony\Component\Validator\GlobalExecutionContextInterface was deprecated in version 2.5 and will be removed in version 3.0. Please use Symfony\Component\Validator\Context\ExecutionContextInterface instead', E_USER_DEPRECATED); - /** * Stores the node-independent state of a validation run. * @@ -29,7 +27,7 @@ * * @author Bernhard Schussek * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Context\ExecutionContextInterface} instead. */ interface GlobalExecutionContextInterface diff --git a/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php index 7913e15625499..ad5a980e4ca31 100644 --- a/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php @@ -11,14 +11,18 @@ namespace Symfony\Component\Validator\Mapping; +trigger_error('The '.__NAMESPACE__.'\BlackholeMetadataFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory class instead.', E_USER_DEPRECATED); + +use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory as MappingBlackHoleMetadataFactory; + /** * Alias of {@link Factory\BlackHoleMetadataFactory}. * * @author Fabien Potencier * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Factory\BlackHoleMetadataFactory} instead. */ -class BlackholeMetadataFactory extends \Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory +class BlackholeMetadataFactory extends MappingBlackHoleMetadataFactory { } diff --git a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php index 893bd67a36abb..5dbe9f406a148 100644 --- a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php +++ b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php @@ -11,11 +11,13 @@ namespace Symfony\Component\Validator\Mapping\Cache; +trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since version 2.5 and will be removed in 3.0. Use DoctrineCache with the Doctrine\Common\Cache\ApcCache class instead.', E_USER_DEPRECATED); + use Symfony\Component\Validator\Mapping\ClassMetadata; /** - * @deprecated Deprecated since version 2.5, to be removed in 3.0. - * Use DoctrineCache with Doctrine\Common\Cache\ApcCache instead. + * @deprecated since version 2.5, to be removed in 3.0. + * Use DoctrineCache with \Doctrine\Common\Cache\ApcCache instead. */ class ApcCache implements CacheInterface { @@ -23,8 +25,6 @@ class ApcCache implements CacheInterface public function __construct($prefix) { - trigger_error('The Symfony\Component\Validator\Mapping\Cache\ApcCache class is deprecated since version 2.5 and will be removed in 3.0. Use DoctrineCache with Doctrine\Common\Cache\ApcCache instead.', E_USER_DEPRECATED); - if (!extension_loaded('apc')) { throw new \RuntimeException('Unable to use ApcCache to cache validator mappings as APC is not enabled.'); } diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index a75cfbc86770f..ab945f0c30572 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -129,11 +129,11 @@ public function __construct($class) /** * {@inheritdoc} * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) { - trigger_error('The Symfony\Component\Validator\MetadataInterface::accept() method is deprecated since Symfony 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 (null === $propagatedGroup && Constraint::DEFAULT_GROUP === $group && ($this->hasGroupSequence() || $this->isGroupSequenceProvider())) { @@ -373,10 +373,12 @@ public function mergeConstraints(ClassMetadata $source) * * @param MemberMetadata $metadata * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ protected function addMemberMetadata(MemberMetadata $metadata) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the addPropertyMetadata() method instead.', E_USER_DEPRECATED); + $this->addPropertyMetadata($metadata); } @@ -387,10 +389,12 @@ protected function addMemberMetadata(MemberMetadata $metadata) * * @return bool * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use {@link hasPropertyMetadata} instead. + * @deprecated since version 2.6, to be removed in 3.0. Use {@link hasPropertyMetadata} instead. */ public function hasMemberMetadatas($property) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the hasPropertyMetadata() method instead.', E_USER_DEPRECATED); + return $this->hasPropertyMetadata($property); } @@ -401,10 +405,12 @@ public function hasMemberMetadatas($property) * * @return MemberMetadata[] An array of MemberMetadata * - * @deprecated Deprecated since version 2.6, to be removed in 3.0. Use {@link getPropertyMetadata} instead. + * @deprecated since version 2.6, to be removed in 3.0. Use {@link getPropertyMetadata} instead. */ public function getMemberMetadatas($property) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getPropertyMetadata() method instead.', E_USER_DEPRECATED); + return $this->getPropertyMetadata($property); } diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php index 9b05edde8f3cc..92cc85b2ef67d 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator\Mapping; +trigger_error('The '.__NAMESPACE__.'\ClassMetadataFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory class instead.', E_USER_DEPRECATED); + use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; /** @@ -18,7 +20,7 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link LazyLoadingMetadataFactory} instead. */ class ClassMetadataFactory extends LazyLoadingMetadataFactory diff --git a/src/Symfony/Component/Validator/Mapping/Deprecated/TraversalStrategy.php b/src/Symfony/Component/Validator/Mapping/Deprecated/TraversalStrategy.php new file mode 100644 index 0000000000000..28921e0b0b7ea --- /dev/null +++ b/src/Symfony/Component/Validator/Mapping/Deprecated/TraversalStrategy.php @@ -0,0 +1,27 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +namespace Symfony\Component\Validator\Mapping\Deprecated; + +trigger_error('Constants STOP_RECURSION in class Symfony\Component\Validator\Mapping\TraversalStrategy is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); + +/** + * @deprecated since version 2.7, to be removed in 3.0. + * @internal + */ +final class TraversalStrategy +{ + const STOP_RECURSION = 8; + + private function __construct() + { + } +} diff --git a/src/Symfony/Component/Validator/Mapping/ElementMetadata.php b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php index 5e4566646d1bf..d036dcf2f18da 100644 --- a/src/Symfony/Component/Validator/Mapping/ElementMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php @@ -11,14 +11,14 @@ namespace Symfony\Component\Validator\Mapping; -trigger_error('The "Symfony\Component\Validator\Mapping\ElementMetadata" class was deprecated in version 2.5 and will be removed in 3.0. Use "Symfony\Component\Validator\Mapping\GenericMetadata" instead.', E_USER_DEPRECATED); +trigger_error('The '.__NAMESPACE__.'\ElementMetadata class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\GenericMetadata class instead.', E_USER_DEPRECATED); /** * Contains the metadata of a structural element. * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Extend {@link GenericMetadata} instead. */ abstract class ElementMetadata extends GenericMetadata diff --git a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index 904dcd768862f..cc0e54d3619e8 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -231,10 +231,11 @@ public function getTraversalStrategy() * * Should not be used. * + * Implemented for backward compatibility with Symfony < 2.5. + * * @throws BadMethodCallException * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * Will be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath) { diff --git a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php index a0bbe0dbf0275..394fa2059fd8c 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -78,10 +78,12 @@ public function __construct($class, $name, $property) /** * {@inheritdoc} * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath, $propagatedGroup = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + $visitor->visit($this, $value, $group, $propertyPath); if ($this->isCascaded()) { @@ -185,11 +187,13 @@ public function isPrivate($objectOrClassName) * * @return bool * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link getCascadingStrategy()} instead. */ public function isCascaded() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getCascadingStrategy() method instead.', E_USER_DEPRECATED); + return (bool) ($this->cascadingStrategy & CascadingStrategy::CASCADE); } @@ -199,11 +203,13 @@ public function isCascaded() * * @return bool * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link getTraversalStrategy()} instead. */ public function isCollectionCascaded() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); + return (bool) ($this->traversalStrategy & (TraversalStrategy::IMPLICIT | TraversalStrategy::TRAVERSE)); } @@ -213,11 +219,13 @@ public function isCollectionCascaded() * * @return bool * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link getTraversalStrategy()} instead. */ public function isCollectionCascadedDeeply() { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. Use the getTraversalStrategy() method instead.', E_USER_DEPRECATED); + return !($this->traversalStrategy & TraversalStrategy::STOP_RECURSION); } diff --git a/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php b/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php index d44733b61c5e7..2c26614f2ad3f 100644 --- a/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php +++ b/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator\Mapping; +use Symfony\Component\Validator\Mapping\Deprecated\TraversalStrategy as Deprecated; + /** * Specifies whether and how a traversable object should be traversed. * @@ -51,10 +53,11 @@ class TraversalStrategy * Specifies that nested instances of {@link \Traversable} should never be * iterated. Can be combined with {@link IMPLICIT} or {@link TRAVERSE}. * - * @deprecated This constant was added for backwards compatibility only. - * It will be removed in Symfony 3.0. + * This constant was added for backward compatibility only. + * + * @deprecated since version 2.5, to be removed in 3.0. */ - const STOP_RECURSION = 8; + const STOP_RECURSION = Deprecated::STOP_RECURSION; /** * Not instantiable. diff --git a/src/Symfony/Component/Validator/MetadataFactoryInterface.php b/src/Symfony/Component/Validator/MetadataFactoryInterface.php index a1c88933284ca..555bea9aa21e5 100644 --- a/src/Symfony/Component/Validator/MetadataFactoryInterface.php +++ b/src/Symfony/Component/Validator/MetadataFactoryInterface.php @@ -11,14 +11,12 @@ namespace Symfony\Component\Validator; -trigger_error('The "Symfony\Component\Validator\MetadataFactoryInterface" interface is deprecated since version 2.5 and will be removed in Symfony 3.0. You should use the "Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface" interface instead.', E_USER_DEPRECATED); - /** * Returns {@link MetadataInterface} instances for values. * * @author Bernhard Schussek * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\Factory\MetadataFactoryInterface} instead. */ interface MetadataFactoryInterface diff --git a/src/Symfony/Component/Validator/MetadataInterface.php b/src/Symfony/Component/Validator/MetadataInterface.php index b5c7acf806e35..2c8944903c6bf 100644 --- a/src/Symfony/Component/Validator/MetadataInterface.php +++ b/src/Symfony/Component/Validator/MetadataInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('Symfony\Component\Validator\MetadataInterface was deprecated in version 2.5 and will be removed in 3.0. Use Symfony\Component\Validator\Mapping\MetadataInterface instead.', E_USER_DEPRECATED); - /** * A container for validation metadata. * @@ -44,7 +42,7 @@ * * @author Bernhard Schussek * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\MetadataInterface} instead. */ interface MetadataInterface @@ -60,7 +58,7 @@ interface MetadataInterface * @param string|string[] $group The validation group to validate in * @param string $propertyPath The current property path in the validation graph * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath); diff --git a/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php b/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php index cc2ab4c296c57..5441be1c3d063 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php @@ -11,14 +11,12 @@ namespace Symfony\Component\Validator; -trigger_error('Symfony\Component\Validator\PropertyMetadataContainerInterface is deprecated since version 2.5 and will be removed in 3.0. Use Symfony\Component\Validator\Mapping\ClassMetadataInterface instead.', E_USER_DEPRECATED); - /** * A container for {@link PropertyMetadataInterface} instances. * * @author Bernhard Schussek * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\ClassMetadataInterface} instead. */ interface PropertyMetadataContainerInterface diff --git a/src/Symfony/Component/Validator/PropertyMetadataInterface.php b/src/Symfony/Component/Validator/PropertyMetadataInterface.php index 12ddd89039a87..20af8a993bcda 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('Symfony\Component\Validator\PropertyMetadataInterface was deprecated in version 2.5 and will be removed in version 3.0. Please use Symfony\Component\Validator\Mapping\PropertyMetadataInterface instead', E_USER_DEPRECATED); - /** * A container for validation metadata of a property. * @@ -26,7 +24,7 @@ * * @see MetadataInterface * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Mapping\PropertyMetadataInterface} instead. */ interface PropertyMetadataInterface extends MetadataInterface diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php index f2a92b0e9ad08..1998c919e73e5 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php @@ -25,7 +25,7 @@ use Symfony\Component\Validator\Validation; /** - * @since 2.5.3 + * @since 2.5.3 * * @author Bernhard Schussek */ @@ -42,19 +42,12 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa protected $validator; protected $group; - protected $metadata; - protected $object; - protected $value; - protected $root; - protected $propertyPath; - protected $constraint; - protected $defaultTimezone; protected function setUp() @@ -174,8 +167,7 @@ protected function createContext() * * @return ConstraintViolation * - * @deprecated To be removed in Symfony 3.0. Use - * {@link buildViolation()} instead. + * @deprecated to be removed in Symfony 3.0. Use {@link buildViolation()} instead. */ protected function createViolation($message, array $parameters = array(), $propertyPath = 'property.path', $invalidValue = 'InvalidValue', $plural = null, $code = null) { @@ -367,6 +359,8 @@ protected function assertNoViolation() */ protected function assertViolation($message, array $parameters = array(), $propertyPath = 'property.path', $invalidValue = 'InvalidValue', $plural = null, $code = null) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); + $this->buildViolation($message) ->setParameters($parameters) ->atPath($propertyPath) @@ -384,6 +378,8 @@ protected function assertViolation($message, array $parameters = array(), $prope */ protected function assertViolations(array $expected) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the buildViolation() method instead.', E_USER_DEPRECATED); + $violations = $this->context->getViolations(); $this->assertCount(count($expected), $violations); diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php b/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php index 6ae3663f04f52..84c5a80bf2d16 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php @@ -20,14 +20,12 @@ * * @author Bernhard Schussek * - * @deprecated + * @deprecated since version 2.5, to be removed in 3.0 */ class StubGlobalExecutionContext implements GlobalExecutionContextInterface { private $violations; - private $root; - private $visitor; public function __construct($root = null, ValidationVisitorInterface $visitor = null) diff --git a/src/Symfony/Component/Validator/ValidationVisitor.php b/src/Symfony/Component/Validator/ValidationVisitor.php index 2edf1386b7d62..c7e06554b8cb5 100644 --- a/src/Symfony/Component/Validator/ValidationVisitor.php +++ b/src/Symfony/Component/Validator/ValidationVisitor.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator; +trigger_error('The '.__NAMESPACE__.'\ValidationVisitor class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Exception\NoSuchMetadataException; use Symfony\Component\Validator\Exception\UnexpectedTypeException; @@ -21,7 +23,7 @@ * * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ class ValidationVisitor implements ValidationVisitorInterface, GlobalExecutionContextInterface { @@ -79,8 +81,6 @@ class ValidationVisitor implements ValidationVisitorInterface, GlobalExecutionCo */ public function __construct($root, MetadataFactoryInterface $metadataFactory, ConstraintValidatorFactoryInterface $validatorFactory, TranslatorInterface $translator, $translationDomain = null, array $objectInitializers = array()) { - trigger_error('Symfony\Component\Validator\ValidationVisitor was deprecated in version 2.5 and will be removed in version 3.0.', E_USER_DEPRECATED); - foreach ($objectInitializers as $initializer) { if (!$initializer instanceof ObjectInitializerInterface) { throw new UnexpectedTypeException($initializer, 'Symfony\Component\Validator\ObjectInitializerInterface'); diff --git a/src/Symfony/Component/Validator/ValidationVisitorInterface.php b/src/Symfony/Component/Validator/ValidationVisitorInterface.php index a1227e9c55372..0ab7b7366776c 100644 --- a/src/Symfony/Component/Validator/ValidationVisitorInterface.php +++ b/src/Symfony/Component/Validator/ValidationVisitorInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('Symfony\Component\Validator\ValidationVisitorInterface was deprecated in version 2.5 and will be removed in version 3.0.', E_USER_DEPRECATED); - /** * Validates values against constraints defined in {@link MetadataInterface} * instances. @@ -36,7 +34,7 @@ * * @author Bernhard Schussek * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ interface ValidationVisitorInterface { @@ -66,8 +64,6 @@ interface ValidationVisitorInterface * * @throws Exception\NoSuchMetadataException If no metadata can be found for * the given value. - * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. */ public function validate($value, $group, $propertyPath, $traverse = false, $deep = false); @@ -81,8 +77,6 @@ public function validate($value, $group, $propertyPath, $traverse = false, $deep * @param mixed $value The value to validate. * @param string $group The validation group to validate. * @param string $propertyPath The current property path in the validation graph. - * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. */ public function visit(MetadataInterface $metadata, $value, $group, $propertyPath); } diff --git a/src/Symfony/Component/Validator/Validator.php b/src/Symfony/Component/Validator/Validator.php index 6edbb7ac566a5..8243f17acbf6b 100644 --- a/src/Symfony/Component/Validator/Validator.php +++ b/src/Symfony/Component/Validator/Validator.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator; +trigger_error('The '.__NAMESPACE__.'\Validator class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Validator\RecursiveValidator class instead.', E_USER_DEPRECATED); + use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\Exception\ValidatorException; @@ -21,7 +23,7 @@ * @author Fabien Potencier * @author Bernhard Schussek * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Validator\RecursiveValidator} instead. */ class Validator implements ValidatorInterface, Mapping\Factory\MetadataFactoryInterface diff --git a/src/Symfony/Component/Validator/Validator/LegacyValidator.php b/src/Symfony/Component/Validator/Validator/LegacyValidator.php index 63a1ddc6cdfde..1d4153733d426 100644 --- a/src/Symfony/Component/Validator/Validator/LegacyValidator.php +++ b/src/Symfony/Component/Validator/Validator/LegacyValidator.php @@ -34,8 +34,7 @@ * @see \Symfony\Component\Validator\ValidatorInterface * @see \Symfony\Component\Validator\Validator\ValidatorInterface * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. - * To be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ class LegacyValidator extends RecursiveValidator implements LegacyValidatorInterface { @@ -52,7 +51,7 @@ public function validate($value, $groups = null, $traverse = false, $deep = fals return parent::validate($value, $constraints, $groups); } - trigger_error('Symfony\\Component\\Validator\\ValidatorInterface::validate() was deprecated in version 2.5 and will be removed in version 3.0. Please use Symfony\\Component\\Validator\\Validator\\ValidatorInterface::validate() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::validate method instead.', E_USER_DEPRECATED); $constraint = new Valid(array('traverse' => $traverse, 'deep' => $deep)); @@ -61,13 +60,15 @@ public function validate($value, $groups = null, $traverse = false, $deep = fals public function validateValue($value, $constraints, $groups = null) { - trigger_error('Symfony\\Component\\Validator\\ValidatorInterface::validateValue() was deprecated in version 2.5 and will be removed in version 3.0. Please use Symfony\\Component\\Validator\\Validator\\ValidatorInterface::validate() instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::validate method instead.', E_USER_DEPRECATED); return parent::validate($value, $constraints, $groups); } public function getMetadataFactory() { + trigger_error('The '.__METHOD__.' method is deprecated in version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); + return $this->metadataFactory; } diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 232af7dcc3be7..f80435a4dacd2 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -303,11 +303,12 @@ public function setTranslationDomain($translationDomain) /** * {@inheritdoc} * - * @deprecated Deprecated since version 2.5 and will be removed in 3.0. The validator will function without a property accessor. + * @deprecated since version 2.5, to be removed in 3.0. + * The validator will function without a property accessor. */ public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor) { - trigger_error('ValidatorBuilder::setPropertyAccessor() is deprecated since version 2.5 and will be removed in 3.0. The validator will function without a property accessor.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.5 and will be removed in 3.0. The validator will function without a property accessor.', E_USER_DEPRECATED); if (null !== $this->validatorFactory) { throw new ValidatorException('You cannot set a property accessor after setting a custom validator factory. Configure your validator factory instead.'); diff --git a/src/Symfony/Component/Validator/ValidatorBuilderInterface.php b/src/Symfony/Component/Validator/ValidatorBuilderInterface.php index 2fd0f9c58bf94..dc4f4277b4264 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilderInterface.php +++ b/src/Symfony/Component/Validator/ValidatorBuilderInterface.php @@ -167,7 +167,7 @@ public function setTranslationDomain($translationDomain); * * @return ValidatorBuilderInterface The builder object * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor); diff --git a/src/Symfony/Component/Validator/ValidatorInterface.php b/src/Symfony/Component/Validator/ValidatorInterface.php index a9c0a0d8fbad2..d207a9c940e35 100644 --- a/src/Symfony/Component/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/ValidatorInterface.php @@ -18,7 +18,7 @@ * * @api * - * @deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Validator\ValidatorInterface} instead. */ interface ValidatorInterface @@ -93,8 +93,9 @@ public function validatePropertyValue($containingValue, $property, $value, $grou * * @api * - * @deprecated Renamed to {@link Validator\ValidatorInterface::validate()} - * in Symfony 2.5. Will be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. + * Renamed to {@link Validator\ValidatorInterface::validate()} + * in Symfony 2.5. */ public function validateValue($value, $constraints, $groups = null); @@ -105,7 +106,7 @@ public function validateValue($value, $constraints, $groups = null); * * @api * - * @deprecated Deprecated since version 2.5, to be removed in Symfony 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * Use {@link Validator\ValidatorInterface::getMetadataFor()} or * {@link Validator\ValidatorInterface::hasMetadataFor()} * instead. diff --git a/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php b/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php index 0607552cfc886..01effe46c8db7 100644 --- a/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php +++ b/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator\Violation; +trigger_error('The '.__NAMESPACE__.'\LegacyConstraintViolationBuilder class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + use Symfony\Component\Validator\ExecutionContextInterface; /** @@ -21,7 +23,7 @@ * @internal You should not instantiate or use this class. Code against * {@link ConstraintViolationBuilderInterface} instead. * - * @deprecated This class will be removed in Symfony 3.0. + * @deprecated since version 2.5.5, to be removed in 3.0. */ class LegacyConstraintViolationBuilder implements ConstraintViolationBuilderInterface { diff --git a/src/Symfony/Component/Yaml/Deprecated/Unescaper.php b/src/Symfony/Component/Yaml/Deprecated/Unescaper.php new file mode 100644 index 0000000000000..3885dee7ce754 --- /dev/null +++ b/src/Symfony/Component/Yaml/Deprecated/Unescaper.php @@ -0,0 +1,19 @@ +