From 86b9f6b0c6a94a0b9a9233a58c909f1f09cae142 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Sun, 21 Dec 2014 12:39:54 +0100 Subject: [PATCH 01/13] Adds deprecation notices for structures to be removed in 3.0. --- .../Form/ChoiceList/EntityChoiceList.php | 4 +++ .../Doctrine/Tests/DoctrineOrmTestCase.php | 2 ++ src/Symfony/Bridge/Monolog/Logger.php | 16 +++++------ .../Form/ChoiceList/ModelChoiceList.php | 4 +++ .../Bridge/Twig/Node/FormEnctypeNode.php | 3 +- .../Command/RouterApacheDumperCommand.php | 2 +- .../FrameworkBundle/Controller/Controller.php | 2 +- .../DependencyInjection/Configuration.php | 2 +- .../FrameworkBundle/Templating/Debugger.php | 2 ++ .../Templating/GlobalVariables.php | 2 ++ .../Templating/Helper/RequestHelper.php | 3 +- .../Templating/Helper/SessionHelper.php | 3 +- .../DependencyInjection/Configuration.php | 2 +- .../TwigBundle/Extension/ActionsExtension.php | 2 ++ .../Resources/config/schema/twig-1.0.xsd | 2 +- .../DependencyInjection/TwigExtensionTest.php | 2 +- .../ClassLoader/DebugClassLoader.php | 2 ++ .../ClassLoader/UniversalClassLoader.php | 2 +- .../Config/Definition/ReferenceDumper.php | 2 ++ src/Symfony/Component/Console/Application.php | 4 +++ .../Component/Console/Command/Command.php | 4 +++ .../Component/Console/Helper/ProgressBar.php | 8 ++++-- .../Console/Helper/ProgressHelper.php | 4 +-- .../Component/Console/Helper/TableHelper.php | 4 +-- .../Console/Input/InputDefinition.php | 4 +++ .../Component/Console/Input/StringInput.php | 4 +++ .../Component/Debug/DebugClassLoader.php | 12 ++++---- src/Symfony/Component/Debug/ErrorHandler.php | 28 +++++++++++++------ .../Debug/Exception/DummyException.php | 2 ++ .../Debug/Tests/ErrorHandlerTest.php | 2 +- .../DependencyInjection/Definition.php | 12 ++++++-- .../DependencyInjection/Dumper/PhpDumper.php | 4 ++- .../DependencyInjection/SimpleXMLElement.php | 2 ++ .../Component/EventDispatcher/Event.php | 8 ++++++ src/Symfony/Component/Form/ButtonBuilder.php | 2 +- .../Component/Form/Deprecated/FormEvents.php | 5 ++-- .../NumberToLocalizedStringTransformer.php | 4 +-- .../Form/Exception/AlreadyBoundException.php | 2 ++ .../Extension/Core/ChoiceList/ChoiceList.php | 4 +++ .../Core/ChoiceList/LazyChoiceList.php | 4 +++ .../Core/ChoiceList/ObjectChoiceList.php | 2 ++ .../FixCheckboxInputListener.php | 2 ++ .../EventListener/FixRadioInputListener.php | 2 ++ .../EventListener/FixUrlProtocolListener.php | 2 ++ .../EventListener/MergeCollectionListener.php | 2 ++ .../Core/EventListener/ResizeFormListener.php | 4 +++ .../Core/EventListener/TrimListener.php | 2 ++ .../Csrf/CsrfProvider/CsrfProviderAdapter.php | 2 +- .../CsrfProvider/CsrfProviderInterface.php | 2 +- .../CsrfProvider/CsrfTokenManagerAdapter.php | 2 +- .../Csrf/CsrfProvider/DefaultCsrfProvider.php | 2 +- .../Csrf/CsrfProvider/SessionCsrfProvider.php | 2 +- .../EventListener/CsrfValidationListener.php | 2 ++ .../EventListener/BindRequestListener.php | 2 ++ .../Extension/Validator/Constraints/Form.php | 2 +- src/Symfony/Component/Form/Form.php | 8 +++--- .../Component/Form/FormConfigBuilder.php | 4 +-- .../Extension/Core/Type/TypeTestCase.php | 2 +- .../Form/Tests/FormIntegrationTestCase.php | 2 +- .../Form/Tests/FormPerformanceTestCase.php | 2 +- .../Form/Util/VirtualFormAwareIterator.php | 2 +- .../HttpFoundation/Session/Flash/FlashBag.php | 2 ++ .../HttpKernel/Debug/ErrorHandler.php | 2 +- .../HttpKernel/Debug/ExceptionHandler.php | 2 +- .../Debug/TraceableEventDispatcher.php | 1 + .../RegisterListenersPass.php | 4 +-- .../EventListener/ErrorsLoggerListener.php | 5 ++-- .../HttpKernel/EventListener/EsiListener.php | 2 ++ .../EventListener/FragmentListener.php | 4 ++- .../EventListener/LocaleListener.php | 2 ++ .../EventListener/ProfilerListener.php | 2 ++ .../EventListener/RouterListener.php | 2 ++ .../Exception/FatalErrorException.php | 2 +- .../HttpKernel/Exception/FlattenException.php | 2 +- .../HttpKernel/Fragment/FragmentHandler.php | 2 ++ .../Component/HttpKernel/HttpCache/Esi.php | 6 ++++ .../HttpCache/EsiResponseCacheStrategy.php | 2 ++ .../EsiResponseCacheStrategyInterface.php | 2 ++ .../HttpKernel/HttpCache/HttpCache.php | 2 ++ src/Symfony/Component/HttpKernel/Kernel.php | 5 ++-- .../HttpKernel/Log/LoggerInterface.php | 10 ++++--- .../Component/HttpKernel/Log/NullLogger.php | 16 +++++------ .../MethodArgumentNotImplementedException.php | 2 ++ ...odArgumentValueNotImplementedException.php | 2 ++ .../MethodNotImplementedException.php | 2 ++ .../Exception/NotImplementedException.php | 2 ++ src/Symfony/Component/Locale/Locale.php | 2 +- .../Stub/DateFormat/AmPmTransformer.php | 2 ++ .../Stub/DateFormat/DayOfWeekTransformer.php | 2 ++ .../Stub/DateFormat/DayOfYearTransformer.php | 2 ++ .../Locale/Stub/DateFormat/DayTransformer.php | 2 ++ .../Stub/DateFormat/FullTransformer.php | 2 ++ .../Stub/DateFormat/Hour1200Transformer.php | 2 ++ .../Stub/DateFormat/Hour1201Transformer.php | 2 ++ .../Stub/DateFormat/Hour2400Transformer.php | 2 ++ .../Stub/DateFormat/Hour2401Transformer.php | 2 ++ .../Stub/DateFormat/HourTransformer.php | 2 ++ .../Stub/DateFormat/MinuteTransformer.php | 2 ++ .../Stub/DateFormat/MonthTransformer.php | 2 ++ .../Stub/DateFormat/QuarterTransformer.php | 2 ++ .../Stub/DateFormat/SecondTransformer.php | 2 ++ .../Stub/DateFormat/TimeZoneTransformer.php | 2 ++ .../Locale/Stub/DateFormat/Transformer.php | 2 ++ .../Stub/DateFormat/YearTransformer.php | 2 ++ .../Component/Locale/Stub/StubCollator.php | 2 ++ .../Component/Locale/Stub/StubIntl.php | 2 ++ .../Locale/Stub/StubIntlDateFormatter.php | 2 ++ .../Component/Locale/Stub/StubLocale.php | 6 ++-- .../Locale/Stub/StubNumberFormatter.php | 2 ++ .../OptionsResolver/OptionsResolver.php | 16 +++++++++++ .../OptionsResolverInterface.php | 3 +- src/Symfony/Component/Process/Process.php | 4 +-- .../PropertyAccess/PropertyAccess.php | 2 +- .../Component/Routing/Annotation/Route.php | 4 +++ .../Routing/Matcher/ApacheUrlMatcher.php | 2 +- .../Matcher/Dumper/ApacheMatcherDumper.php | 2 +- src/Symfony/Component/Routing/Route.php | 4 +++ .../Security/Core/SecurityContext.php | 8 ++++++ .../Core/SecurityContextInterface.php | 2 ++ .../LegacySecurityContextInterfaceTest.php | 2 ++ .../Serializer/Encoder/JsonDecode.php | 4 ++- .../Serializer/Encoder/JsonEncode.php | 4 ++- .../Serializer/Encoder/JsonEncoder.php | 8 ++++-- .../Templating/DebuggerInterface.php | 2 ++ .../Component/Templating/Loader/Loader.php | 2 ++ .../Component/Translation/Translator.php | 2 +- .../Validator/ClassBasedInterface.php | 2 +- .../Validator/ConstraintValidator.php | 4 +++ .../Validator/ConstraintViolation.php | 4 +-- .../Validator/Constraints/Callback.php | 1 + .../Constraints/Collection/Optional.php | 2 +- .../Constraints/Collection/Required.php | 2 +- .../Validator/Constraints/GroupSequence.php | 12 ++++++++ .../Validator/Constraints/IsbnValidator.php | 2 ++ .../Validator/Constraints/UuidValidator.php | 6 ++-- .../Component/Validator/Constraints/Valid.php | 4 +-- .../Context/LegacyExecutionContext.php | 4 ++- .../Context/LegacyExecutionContextFactory.php | 4 ++- .../Component/Validator/ExecutionContext.php | 4 ++- .../Validator/ExecutionContextInterface.php | 2 +- .../GlobalExecutionContextInterface.php | 2 +- .../Mapping/BlackholeMetadataFactory.php | 6 +++- .../Validator/Mapping/Cache/ApcCache.php | 4 +-- .../Validator/Mapping/ClassMetadata.php | 8 +++++- .../Mapping/ClassMetadataFactory.php | 2 ++ .../Validator/Mapping/ElementMetadata.php | 2 +- .../Validator/Mapping/GenericMetadata.php | 4 ++- .../Validator/Mapping/MemberMetadata.php | 8 ++++++ .../Validator/Mapping/TraversalStrategy.php | 2 +- .../Validator/MetadataFactoryInterface.php | 2 +- .../Component/Validator/MetadataInterface.php | 2 +- .../PropertyMetadataContainerInterface.php | 2 +- .../Validator/PropertyMetadataInterface.php | 2 +- .../AbstractConstraintValidatorTest.php | 13 ++++----- .../Fixtures/StubGlobalExecutionContext.php | 6 ++-- .../Component/Validator/ValidationVisitor.php | 2 ++ .../Validator/ValidationVisitorInterface.php | 2 +- src/Symfony/Component/Validator/Validator.php | 2 ++ .../Validator/Validator/LegacyValidator.php | 4 ++- .../Component/Validator/ValidatorBuilder.php | 2 +- .../Validator/ValidatorInterface.php | 2 ++ .../LegacyConstraintViolationBuilder.php | 2 ++ src/Symfony/Component/Yaml/Unescaper.php | 2 +- src/Symfony/Component/Yaml/Yaml.php | 4 +-- 164 files changed, 435 insertions(+), 145 deletions(-) diff --git a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php index 1b1731554e80c..3ea0bac65a103 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -300,6 +300,8 @@ public function getValuesForChoices(array $entities) */ public function getIndicesForChoices(array $entities) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + // Performance optimization if (empty($entities)) { return array(); @@ -342,6 +344,8 @@ public function getIndicesForChoices(array $entities) */ 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..ce084faa6ee19 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php @@ -11,6 +11,8 @@ 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 Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; /** diff --git a/src/Symfony/Bridge/Monolog/Logger.php b/src/Symfony/Bridge/Monolog/Logger.php index 23af86453f323..260b266fe3fdf 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 of the Monolog Logger was removed. 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 of the Monolog Logger was removed. 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 of the Monolog Logger was removed. 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 of the Monolog Logger was removed. 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..0d4cf87539f86 100644 --- a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php +++ b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php @@ -304,6 +304,8 @@ public function getValuesForChoices(array $models) */ 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(); } @@ -350,6 +352,8 @@ public function getIndicesForChoices(array $models) */ 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/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..69cb9df9ecfe0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -74,7 +74,7 @@ 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); + trigger_error('The router:dump-apache command is deprecated since version 2.5 and will be removed in 3.0', E_USER_DEPRECATED); $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..89cf9cbf2ff7c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -273,7 +273,7 @@ public function createFormBuilder($data = null, array $options = array()) */ 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/Templating/Debugger.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php index ff2d5edc4b3a6..0015b1d35f004 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; diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php index 3d2ae2be917a7..c31d2baef0a9b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -42,6 +42,8 @@ public function __construct(ContainerInterface $container) */ 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/RequestHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php index 0d7fec1dd1c58..297b2884f6ea1 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..b23a26fe223a4 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..c801fe251e5b2 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php +++ b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php @@ -11,6 +11,8 @@ namespace Symfony\Bundle\TwigBundle\Extension; +trigger_error('The '.__NAMESPACE__.'\ActionsExtension class is deprecated since version 2.2 and will be removed in Symfony 3.0.', E_USER_DEPRECATED); + use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpKernel\Fragment\FragmentHandler; 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/Component/ClassLoader/DebugClassLoader.php b/src/Symfony/Component/ClassLoader/DebugClassLoader.php index 897919b20ae21..1f974daa57310 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. * diff --git a/src/Symfony/Component/ClassLoader/UniversalClassLoader.php b/src/Symfony/Component/ClassLoader/UniversalClassLoader.php index 63cc58af73a82..31f6c4c588153 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. diff --git a/src/Symfony/Component/Config/Definition/ReferenceDumper.php b/src/Symfony/Component/Config/Definition/ReferenceDumper.php index 7fe336d8fbf11..089aecc6ed0ba 100644 --- a/src/Symfony/Component/Config/Definition/ReferenceDumper.php +++ b/src/Symfony/Component/Config/Definition/ReferenceDumper.php @@ -11,6 +11,8 @@ 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; /** diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 833eb6d54387a..fe27de5ae44b1 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -628,6 +628,8 @@ public static function getAbbreviations($names) */ 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)); @@ -647,6 +649,8 @@ public function asText($namespace = null, $raw = false) */ public function asXml($namespace = null, $asDom = false) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0.', E_USER_DEPRECATED); + $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..5ab3c7e1e5ebe 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -609,6 +609,8 @@ public function getHelper($name) */ 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)); @@ -627,6 +629,8 @@ public function asText() */ 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/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..98b9f80910007 100644 --- a/src/Symfony/Component/Console/Helper/ProgressHelper.php +++ b/src/Symfony/Component/Console/Helper/ProgressHelper.php @@ -20,7 +20,7 @@ * @author Chris Jones * @author Fabien Potencier * - * @deprecated Deprecated since 2.5, to be removed in 3.0; use ProgressBar instead. + * @deprecated Deprecated since version 2.5, to be removed in 3.0; use ProgressBar instead. */ class ProgressHelper extends Helper { @@ -120,7 +120,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..f8dca28ab63f9 100644 --- a/src/Symfony/Component/Console/Helper/TableHelper.php +++ b/src/Symfony/Component/Console/Helper/TableHelper.php @@ -20,7 +20,7 @@ * @author Саша Стаменковић * @author Fabien Potencier * - * @deprecated Deprecated since 2.5, to be removed in 3.0; use Table instead. + * @deprecated Deprecated since version 2.5, to be removed in 3.0; use Table instead. */ class TableHelper extends Helper { @@ -36,7 +36,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..608b42072bec2 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -421,6 +421,8 @@ public function getSynopsis() */ 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)); @@ -439,6 +441,8 @@ public function asText() */ 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..8fd4d84b515b5 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('Since version 2.5, passing an object in the $classLoader argument of the '.__METHOD__.' is deprecated and support for it will be removed 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 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/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..a8ad02792409a 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -98,7 +98,7 @@ public function getFactory() */ 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; @@ -115,6 +115,8 @@ public function setFactoryClass($factoryClass) */ 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; } @@ -130,7 +132,7 @@ public function getFactoryClass() */ 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; @@ -182,6 +184,8 @@ public function getDecoratedService() */ 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; } @@ -197,7 +201,7 @@ public function getFactoryMethod() */ 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; @@ -214,6 +218,8 @@ public function setFactoryService($factoryService) */ 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..f23ff69f90206 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1402,12 +1402,14 @@ public function dumpParameter($name) } /** - * @deprecated Deprecated since 2.6.2, to be removed in 3.0. Use Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider instead. + * @deprecated 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..9a1c845be0a37 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; diff --git a/src/Symfony/Component/EventDispatcher/Event.php b/src/Symfony/Component/EventDispatcher/Event.php index dc39b05d524e7..0d26ec551df28 100644 --- a/src/Symfony/Component/EventDispatcher/Event.php +++ b/src/Symfony/Component/EventDispatcher/Event.php @@ -83,6 +83,8 @@ public function stopPropagation() */ public function setDispatcher(EventDispatcherInterface $dispatcher) { + 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); + $this->dispatcher = $dispatcher; } @@ -97,6 +99,8 @@ public function setDispatcher(EventDispatcherInterface $dispatcher) */ 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; } @@ -111,6 +115,8 @@ public function getDispatcher() */ 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; } @@ -125,6 +131,8 @@ public function getName() */ public function setName($name) { + 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); + $this->name = $name; } } diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php index 8cb8088f4aa44..1d5e789518b9a 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -597,7 +597,7 @@ public function getByReference() */ 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 FormConfigBuilder::getInheritData() 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(); @@ -229,6 +231,8 @@ public function getIndicesForChoices(array $choices) */ 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/LazyChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php index cc364d998c9b4..ab8b40f7a6079 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php @@ -110,6 +110,8 @@ public function getValuesForChoices(array $choices) */ public function getIndicesForChoices(array $choices) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (!$this->choiceList) { $this->load(); } @@ -124,6 +126,8 @@ public function getIndicesForChoices(array $choices) */ 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..80ae464526992 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php @@ -191,6 +191,8 @@ public function getValuesForChoices(array $choices) */ public function getIndicesForChoices(array $choices) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (!$this->valuePath) { return parent::getIndicesForChoices($choices); } diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php index 8e72b04137b79..e69f5af53a0f6 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php @@ -86,6 +86,8 @@ public function preSubmit(FormEvent $event) */ public function preBind(FormEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); + $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..af6eacae54783 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php @@ -68,6 +68,8 @@ public function preSubmit(FormEvent $event) */ public function preBind(FormEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); + $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..9f946085a52a8 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php @@ -51,6 +51,8 @@ public function onSubmit(FormEvent $event) */ public function onBind(FormEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED); + $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..d99b3b7002772 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php @@ -134,6 +134,8 @@ public function onSubmit(FormEvent $event) */ public function onBind(FormEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED); + $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..849b7c96942d3 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -189,6 +189,8 @@ public function onSubmit(FormEvent $event) */ public function preBind(FormEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); + $this->preSubmit($event); } @@ -200,6 +202,8 @@ public function preBind(FormEvent $event) */ public function onBind(FormEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the onSubmit() method instead.', E_USER_DEPRECATED); + $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..c866cde85f29d 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php @@ -45,6 +45,8 @@ public function preSubmit(FormEvent $event) */ public function preBind(FormEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); + $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..bdadb5e73b00d 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; diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php index 260134d5c0768..c6d4a51ef6c07 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\CsrfProviderInterface interface is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManagerInterface interface instead.', E_USER_DEPRECATED); /** * Marks classes able to provide CSRF protection. diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php index b7db6fa4f639a..cf811a0d26455 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; diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.php index fd9110d3b1527..3083266d09109 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. diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php index 91e4897b5a4ff..531a253e7b61d 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; diff --git a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php index c6a467eb05d4a..ac88d659090a4 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php @@ -123,6 +123,8 @@ public function preSubmit(FormEvent $event) */ public function preBind(FormEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED); + $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..899552de38618 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; diff --git a/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php b/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php index da1a92b5e40bc..b47f01d7c6b68 100644 --- a/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php +++ b/src/Symfony/Component/Form/Extension/Validator/Constraints/Form.php @@ -22,7 +22,7 @@ class Form extends Constraint const NO_SUCH_FIELD_ERROR = 2; /** - * @deprecated Deprecated since Symfony 2.6, to be removed in 3.0. Use + * @deprecated since version 2.6, to be removed in 3.0. Use * {@self NOT_SYNCHRONIZED_ERROR} instead. */ const ERR_INVALID = 1; diff --git a/src/Symfony/Component/Form/Form.php b/src/Symfony/Component/Form/Form.php index 8e05f1a9f846b..beaffb8cb0b2c 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) { @@ -684,7 +684,7 @@ 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); @@ -724,7 +724,7 @@ public function isSubmitted() */ 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; } @@ -848,7 +848,7 @@ public function getErrors($deep = false, $flatten = true) */ 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..01c4067499161 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -356,7 +356,7 @@ public function getInheritData() */ 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(); } @@ -722,7 +722,7 @@ public function setInheritData($inheritData) */ 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/Tests/Extension/Core/Type/TypeTestCase.php b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php index 35f615415ec57..e3f0f2dcfb2f7 100644 --- a/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php +++ b/src/Symfony/Component/Form/Tests/Extension/Core/Type/TypeTestCase.php @@ -20,7 +20,7 @@ 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..7c3c242c26eaa 100644 --- a/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php +++ b/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php @@ -23,7 +23,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..f11d698286872 100644 --- a/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php +++ b/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php @@ -23,7 +23,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..2453c810b8468 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\VirtualFormAwareIterator 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); /** * Iterator that traverses an array of forms. diff --git a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php index ac412d7dc83cb..b8a62bb07fc8f 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -175,6 +175,8 @@ public function clear() */ 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/HttpKernel/Debug/ErrorHandler.php b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php index 38203d4adf7ff..d6c3a283acaa8 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; diff --git a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php index 7e31b090c284a..68b9d519818ab 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; diff --git a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php index 02df5242bfc47..7c679c94e7eb0 100644 --- a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -38,6 +38,7 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher */ 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..64cf48ba231f1 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php @@ -11,6 +11,8 @@ 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. * 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..ef50e6e8fc6e7 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -58,6 +58,8 @@ public function __construct($defaultLocale = 'en', RequestContextAwareInterface */ 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..60d15f4e54097 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -77,6 +77,8 @@ public function onKernelException(GetResponseForExceptionEvent $event) */ public function onKernelRequest(GetResponseEvent $event) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + if (null === $this->requestStack) { $this->requests[] = $event->getRequest(); } diff --git a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php index e82cde3c02ed9..95bfc5e7f6679 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -86,6 +86,8 @@ public function __construct($matcher, RequestContext $context = null, LoggerInte */ 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); + if (null !== $request && $this->request !== $request) { $this->context->fromRequest($request); } diff --git a/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php b/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php index 332916518fb54..f5736ef6902b7 100644 --- a/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php +++ b/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php @@ -11,7 +11,7 @@ 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. diff --git a/src/Symfony/Component/HttpKernel/Exception/FlattenException.php b/src/Symfony/Component/HttpKernel/Exception/FlattenException.php index 0089012b9697a..912b20e93e75f 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. diff --git a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php index 27fa7eabec3ca..a28b292f07965 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -80,6 +80,8 @@ public function addRenderer(FragmentRendererInterface $renderer) */ 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..359e4a7b911ea 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -79,6 +79,8 @@ public function hasSurrogateCapability(Request $request) */ 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; } @@ -105,6 +107,8 @@ public function addSurrogateCapability(Request $request) */ 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"'; @@ -148,6 +152,8 @@ public function needsParsing(Response $response) */ 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..39a10a2e815f1 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. diff --git a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php index 5388e99c9ab37..325f5b09377ae 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php @@ -15,6 +15,8 @@ namespace Symfony\Component\HttpKernel\HttpCache; +trigger_error('The '.__NAMESPACE__.'\EsiResponseCacheStrategyInterface interface is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\HttpCache\ResponseCacheStrategyInterface interface instead.', E_USER_DEPRECATED); + /** * ResponseCacheStrategyInterface implementations know how to compute the * Response cache HTTP header based on the different response cache headers. diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index 83a7e4e3e9ae5..47dbe1b87f5ce 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -174,6 +174,8 @@ public function getSurrogate() */ 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..8dd287873a1fb 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -89,7 +89,7 @@ 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(); } } @@ -99,6 +99,7 @@ public function __construct($environment, $debug) */ 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() @@ -220,7 +221,7 @@ public function getBundles() */ 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/Log/LoggerInterface.php b/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php index 4681dabb1f0d6..d6e22c7ffbcb8 100644 --- a/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php +++ b/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\HttpKernel\Log; +trigger_error('The '.__NAMESPACE__.'\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Type-hint with the \Psr\Log\LoggerInterface interface instead.', E_USER_DEPRECATED); + use Psr\Log\LoggerInterface as PsrLogger; /** @@ -27,28 +29,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..16a7807643c26 100644 --- a/src/Symfony/Component/HttpKernel/Log/NullLogger.php +++ b/src/Symfony/Component/HttpKernel/Log/NullLogger.php @@ -25,40 +25,40 @@ class NullLogger extends PsrNullLogger implements LoggerInterface /** * @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()) { - 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. + * @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 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. + * @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 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. + * @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 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..4176d2bb8ebd3 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; /** diff --git a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php index 2b3e0a8c25655..ab2e1c0d556a9 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; /** diff --git a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php index 205c4517f05be..39d0608328322 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; /** diff --git a/src/Symfony/Component/Locale/Exception/NotImplementedException.php b/src/Symfony/Component/Locale/Exception/NotImplementedException.php index 555f991b24bfb..8b122d70ab0ad 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; /** diff --git a/src/Symfony/Component/Locale/Locale.php b/src/Symfony/Component/Locale/Locale.php index bd82cf83e66d6..82360172cfb90 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; diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php index 8bc8e087ea7c1..6f5b09e5482e3 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php index e730881c56d95..3ffa3672e08e6 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php index 157c51d38b71f..625f38240cc38 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php index ba5fc75145838..5e60ed7f4f75c 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php index 4e487d661bb4f..d8f23dd703b39 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php index 7a43e9e92ab9b..c4fd9af5c7f9e 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php index 8bde89d28fed2..89bfd8f824a9c 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php index b8081e3b32737..4736a2b95b173 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php index 20dd4aece5d17..574f338edabb9 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php index a3e0c0f644ffe..cd28c7f05d2f8 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php index 9b4b943fe66f9..278d399977d6e 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php index 7247d747b06f3..375819bb0ccf7 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php index 56fb4d14ae860..e9e45642da990 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php index 160ac2a282060..d5add3bcebfba 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php index b28f024a71c65..7a1f50d68b67b 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php index 447f8714d3c02..3b71cffe953f5 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; /** diff --git a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php b/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php index a9adae5131526..3cfd594f39f4d 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; /** diff --git a/src/Symfony/Component/Locale/Stub/StubCollator.php b/src/Symfony/Component/Locale/Stub/StubCollator.php index 078078ce90b86..8b36a64c7e2c7 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; /** diff --git a/src/Symfony/Component/Locale/Stub/StubIntl.php b/src/Symfony/Component/Locale/Stub/StubIntl.php index b7fd087c1bf21..aeea2a9b2bc35 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; /** diff --git a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php index ccb94d211aac6..df70d7b3524e5 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; /** diff --git a/src/Symfony/Component/Locale/Stub/StubLocale.php b/src/Symfony/Component/Locale/Stub/StubLocale.php index 3ef259c06bb29..7ecae64b7ea52 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 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..bcd2f065015ee 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; /** diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolver.php b/src/Symfony/Component/OptionsResolver/OptionsResolver.php index 42c3d249daa7b..a7575f1b8979c 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -1015,6 +1015,8 @@ public function count() */ 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); } @@ -1025,6 +1027,8 @@ public function set($option, $value) */ 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); @@ -1037,6 +1041,8 @@ public function replace(array $defaults) */ 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); } @@ -1047,6 +1053,8 @@ public function overload($option, $value) */ 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); } @@ -1057,6 +1065,8 @@ public function get($option) */ 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); } @@ -1067,6 +1077,8 @@ public function has($option) */ 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); @@ -1079,6 +1091,8 @@ public function replaceDefaults(array $defaultValues) */ 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); } @@ -1089,6 +1103,8 @@ public function setOptional(array $optionNames) */ 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..2571b35a30a28 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\OptionsResolverInterface interface is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\OptionsResolver\OptionsResolver class instead.', E_USER_DEPRECATED); use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; @@ -22,6 +22,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/Process/Process.php b/src/Symfony/Component/Process/Process.php index 8b12cb87089e1..9d5f8c6abece4 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1067,7 +1067,7 @@ public function setEnv(array $env) */ 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(); } @@ -1097,7 +1097,7 @@ public function getInput() */ 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..705b35cd4adec 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -48,7 +48,7 @@ public static function createPropertyAccessorBuilder() */ 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..275531cff0a16 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -59,6 +59,8 @@ public function __construct(array $data) */ 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; } @@ -67,6 +69,8 @@ public function setPattern($pattern) */ 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..3147843ba2fb2 100644 --- a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -11,7 +11,7 @@ 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; diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index b03d596bbd54e..c09cdc142692f 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -11,7 +11,7 @@ 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; diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index d2ddbd3932246..4fbac27610a73 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -151,6 +151,8 @@ public function unserialize($serialized) */ 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; } @@ -167,6 +169,8 @@ public function getPattern() */ 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..7edea64beda80 100644 --- a/src/Symfony/Component/Security/Core/SecurityContext.php +++ b/src/Symfony/Component/Security/Core/SecurityContext.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core; +trigger_error('The '.__NAMESPACE__.'\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface and Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface implementation to check for authentication and authorization.', E_USER_DEPRECATED); + use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; @@ -74,6 +76,8 @@ public function __construct($tokenStorage, $authorizationChecker, $alwaysAuthent */ 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(); } @@ -82,6 +86,8 @@ public function getToken() */ 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); } @@ -90,6 +96,8 @@ public function setToken(TokenInterface $token = null) */ 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/Security/Core/SecurityContextInterface.php b/src/Symfony/Component/Security/Core/SecurityContextInterface.php index 0ad7bd3a8907f..0a77f00671c62 100644 --- a/src/Symfony/Component/Security/Core/SecurityContextInterface.php +++ b/src/Symfony/Component/Security/Core/SecurityContextInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Core; +trigger_error('The '.__NAMESPACE__.'\SecurityContextInterface interface is deprecated since version 2.6 and will be removed in 3.0. Use both Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface and Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface interfaces instead.', E_USER_DEPRECATED); + use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; diff --git a/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php b/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php index 764a43d37a897..3ff91d5630de8 100644 --- a/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php +++ b/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Security\Tests\Core; +trigger_error('The '.__NAMESPACE__.'\SecurityContextInterfaceTest class is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); + use Symfony\Component\Security\Core\SecurityContextInterface; use Symfony\Component\Security\Core\Security; diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 4bb5b43dd0945..408ce07e3f9d9 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -55,12 +55,14 @@ 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, decode() throws an exception if error found, will be removed in 3.0 * * @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..f80072956eeed 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -33,12 +33,14 @@ 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, encode() throws an exception if error found, will be removed in 3.0 * * @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..18d27a554b2e0 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, JsonEncode throws exception if an error is found, will be removed in 3.0 */ 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, JsonDecode throws exception if an error is found, will be removed in 3.0 */ 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/DebuggerInterface.php b/src/Symfony/Component/Templating/DebuggerInterface.php index 57e250532d03b..9b856ccbcb1b9 100644 --- a/src/Symfony/Component/Templating/DebuggerInterface.php +++ b/src/Symfony/Component/Templating/DebuggerInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Templating; +trigger_error('The '.__NAMESPACE__.'\DebuggerInterface interface is deprecated since version 2.4 and will be removed in 3.0. Use Psr\Log\LoggerInterface instead.', E_USER_DEPRECATED); + /** * DebuggerInterface is the interface you need to implement * to debug template loader instances. diff --git a/src/Symfony/Component/Templating/Loader/Loader.php b/src/Symfony/Component/Templating/Loader/Loader.php index 7239ac73d2a86..9b492a6c65f4b 100644 --- a/src/Symfony/Component/Templating/Loader/Loader.php +++ b/src/Symfony/Component/Templating/Loader/Loader.php @@ -50,6 +50,8 @@ public function setLogger(LoggerInterface $logger) */ 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..79754ef518c30 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -160,7 +160,7 @@ public function getLocale() */ 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..60b631f16190b 100644 --- a/src/Symfony/Component/Validator/ClassBasedInterface.php +++ b/src/Symfony/Component/Validator/ClassBasedInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\ClassBasedInterface interface is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\ClassMetadataInterface interface instead', E_USER_DEPRECATED); /** * An object backed by a PHP class. diff --git a/src/Symfony/Component/Validator/ConstraintValidator.php b/src/Symfony/Component/Validator/ConstraintValidator.php index 61c994a6293b6..acf499c999e75 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -65,6 +65,8 @@ public function initialize(ExecutionContextInterface $context) */ 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); } @@ -86,6 +88,8 @@ protected function buildViolation($message, array $parameters = array()) */ 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..b509362729e15 100644 --- a/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/Symfony/Component/Validator/ConstraintViolation.php @@ -147,7 +147,7 @@ public function getMessageTemplate() */ 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; } @@ -168,7 +168,7 @@ public function getParameters() */ 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..14d3354482153 100644 --- a/src/Symfony/Component/Validator/Constraints/Callback.php +++ b/src/Symfony/Component/Validator/Constraints/Callback.php @@ -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..044ff17226570 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; diff --git a/src/Symfony/Component/Validator/Constraints/Collection/Required.php b/src/Symfony/Component/Validator/Constraints/Collection/Required.php index 3a2e96d82a0c9..0750f78b6e44d 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; diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index 72bfb16d2c862..c540c699b25ac 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -106,6 +106,8 @@ public function __construct(array $groups) */ 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); } @@ -121,6 +123,8 @@ public function getIterator() */ 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]); } @@ -138,6 +142,8 @@ public function offsetExists($offset) */ 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.', @@ -159,6 +165,8 @@ public function offsetGet($offset) */ 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; @@ -178,6 +186,8 @@ public function offsetSet($offset, $value) */ 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]); } @@ -191,6 +201,8 @@ public function offsetUnset($offset) */ 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/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..b0cab848bf8ac 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -56,17 +56,17 @@ class UuidValidator extends ConstraintValidator const LOOSE_FIRST_HYPHEN_POSITION = 4; /** - * @deprecated Deprecated since Symfony 2.6, to be removed in 3.0 + * @deprecated 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'; /** - * @deprecated Deprecated since Symfony 2.6, to be removed in 3.0 + * @deprecated Deprecated since version 2.6, to be removed in 3.0 */ const LOOSE_PATTERN = '/^[a-f0-9]{4}(?:-?[a-f0-9]{4}){7}$/i'; /** - * @deprecated Deprecated since Symfony 2.6, to be removed in 3.0 + * @deprecated Deprecated since version 2.6, to be removed in 3.0 */ const STRICT_UUID_LENGTH = self::STRICT_LENGTH; 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/LegacyExecutionContext.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php index de34b1fc2cae6..e922a5cbc8073 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator\Context; +trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); + use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\MetadataFactoryInterface; @@ -22,7 +24,7 @@ * @since 2.5 * @author Bernhard Schussek * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. + * @deprecated Implemented for backward compatibility with Symfony < 2.5. * To be removed in Symfony 3.0. */ class LegacyExecutionContext extends ExecutionContext diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php index cf5cd07e9ef54..e7ab3cdb3cf18 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator\Context; +trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContextFactory class instead.', E_USER_DEPRECATED); + use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; @@ -21,7 +23,7 @@ * @since 2.5 * @author Bernhard Schussek * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. + * @deprecated Implemented for backward compatibility with Symfony < 2.5. * To be removed in Symfony 3.0. */ class LegacyExecutionContextFactory implements ExecutionContextFactoryInterface diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index 31911b8d712c6..2469c389eb0e3 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 Symfony 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..3d789a090c91c 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\ExecutionContextInterface interface is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContextInterface interface instead.', E_USER_DEPRECATED); /** * Stores the validator's state during validation. diff --git a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php index f07afc8345a5f..aa783bc5b605f 100644 --- a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\GlobalExecutionContextInterface interface is deprecated since version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Context\ExecutionContextInterface interface instead', E_USER_DEPRECATED); /** * Stores the node-independent state of a validation run. diff --git a/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php index 7913e15625499..c49f43dc08e1a 100644 --- a/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php @@ -11,6 +11,10 @@ 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}. * @@ -19,6 +23,6 @@ * @deprecated Deprecated since version 2.5, to be removed in Symfony 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..0e94891ed447f 100644 --- a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php +++ b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php @@ -11,6 +11,8 @@ 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; /** @@ -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..29fbedfbdd617 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -133,7 +133,7 @@ public function __construct($class) */ 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())) { @@ -377,6 +377,8 @@ public function mergeConstraints(ClassMetadata $source) */ 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); } @@ -391,6 +393,8 @@ protected function addMemberMetadata(MemberMetadata $metadata) */ 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); } @@ -405,6 +409,8 @@ public function hasMemberMetadatas($property) */ 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..52842432c5c22 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; /** diff --git a/src/Symfony/Component/Validator/Mapping/ElementMetadata.php b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php index 5e4566646d1bf..9b37a4185f890 100644 --- a/src/Symfony/Component/Validator/Mapping/ElementMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php @@ -11,7 +11,7 @@ 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. diff --git a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index 904dcd768862f..044c884a9a28d 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -233,11 +233,13 @@ public function getTraversalStrategy() * * @throws BadMethodCallException * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. + * @deprecated Implemented for backward compatibility with Symfony < 2.5. * Will be removed in Symfony 3.0. */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath) { + trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + throw new BadMethodCallException('Not supported.'); } } diff --git a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php index a0bbe0dbf0275..279372fd1a61a 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -82,6 +82,8 @@ public function __construct($class, $name, $property) */ 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()) { @@ -190,6 +192,8 @@ public function isPrivate($objectOrClassName) */ 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); } @@ -204,6 +208,8 @@ public function isCascaded() */ 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)); } @@ -218,6 +224,8 @@ public function isCollectionCascaded() */ 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..44b760c1df211 100644 --- a/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php +++ b/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php @@ -51,7 +51,7 @@ 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. + * @deprecated This constant was added for backward compatibility only. * It will be removed in Symfony 3.0. */ const STOP_RECURSION = 8; diff --git a/src/Symfony/Component/Validator/MetadataFactoryInterface.php b/src/Symfony/Component/Validator/MetadataFactoryInterface.php index a1c88933284ca..c7ee454f05558 100644 --- a/src/Symfony/Component/Validator/MetadataFactoryInterface.php +++ b/src/Symfony/Component/Validator/MetadataFactoryInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\MetadataFactoryInterface interface is deprecated since version 2.5 and will be removed in Symfony 3.0. Use the Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface interface instead.', E_USER_DEPRECATED); /** * Returns {@link MetadataInterface} instances for values. diff --git a/src/Symfony/Component/Validator/MetadataInterface.php b/src/Symfony/Component/Validator/MetadataInterface.php index b5c7acf806e35..28c47271d67a9 100644 --- a/src/Symfony/Component/Validator/MetadataInterface.php +++ b/src/Symfony/Component/Validator/MetadataInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\MetadataInterface interface is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\MetadataInterface interface instead.', E_USER_DEPRECATED); /** * A container for validation metadata. diff --git a/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php b/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php index cc2ab4c296c57..4a8ffe3d1a0e2 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.' interface is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\ClassMetadataInterface interface instead.', E_USER_DEPRECATED); /** * A container for {@link PropertyMetadataInterface} instances. diff --git a/src/Symfony/Component/Validator/PropertyMetadataInterface.php b/src/Symfony/Component/Validator/PropertyMetadataInterface.php index 12ddd89039a87..b12aa1c65ca65 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\PropertyMetadataInterface interface is deprecated since version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Mapping\PropertyMetadataInterface interface instead', E_USER_DEPRECATED); /** * A container for validation metadata of a property. diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php index f2a92b0e9ad08..ab323a656af2b 100644 --- a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php +++ b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php @@ -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() @@ -179,6 +172,8 @@ protected function createContext() */ protected function createViolation($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); + return new ConstraintViolation( null, $message, @@ -367,6 +362,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 +381,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..c5b7c5d87a7e7 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator\Tests\Fixtures; +trigger_error('The '.__NAMESPACE__.'\StubGlobalExecutionContext class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\GlobalExecutionContextInterface; use Symfony\Component\Validator\ValidationVisitorInterface; @@ -20,14 +22,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..0348745d752c0 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; diff --git a/src/Symfony/Component/Validator/ValidationVisitorInterface.php b/src/Symfony/Component/Validator/ValidationVisitorInterface.php index a1227e9c55372..79450ce49659a 100644 --- a/src/Symfony/Component/Validator/ValidationVisitorInterface.php +++ b/src/Symfony/Component/Validator/ValidationVisitorInterface.php @@ -11,7 +11,7 @@ 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); +trigger_error('The '.__NAMESPACE__.'\ValidationVisitorInterface interface is deprecated since version 2.5 and will be removed in version 3.0.', E_USER_DEPRECATED); /** * Validates values against constraints defined in {@link MetadataInterface} diff --git a/src/Symfony/Component/Validator/Validator.php b/src/Symfony/Component/Validator/Validator.php index 6edbb7ac566a5..ddf2b64e93e14 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; diff --git a/src/Symfony/Component/Validator/Validator/LegacyValidator.php b/src/Symfony/Component/Validator/Validator/LegacyValidator.php index 63a1ddc6cdfde..2e98921df4ae1 100644 --- a/src/Symfony/Component/Validator/Validator/LegacyValidator.php +++ b/src/Symfony/Component/Validator/Validator/LegacyValidator.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator\Validator; +trigger_error('The '.__NAMESPACE__.'\LegacyValidator class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\RecursiveValidator class instead.', E_USER_DEPRECATED); + use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\Constraints\Valid; @@ -34,7 +36,7 @@ * @see \Symfony\Component\Validator\ValidatorInterface * @see \Symfony\Component\Validator\Validator\ValidatorInterface * - * @deprecated Implemented for backwards compatibility with Symfony < 2.5. + * @deprecated Implemented for backward compatibility with Symfony < 2.5. * To be removed in Symfony 3.0. */ class LegacyValidator extends RecursiveValidator implements LegacyValidatorInterface diff --git a/src/Symfony/Component/Validator/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 232af7dcc3be7..297c1bd35a54c 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -307,7 +307,7 @@ public function setTranslationDomain($translationDomain) */ 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/ValidatorInterface.php b/src/Symfony/Component/Validator/ValidatorInterface.php index a9c0a0d8fbad2..912da7c5cf0cc 100644 --- a/src/Symfony/Component/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/ValidatorInterface.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator; +trigger_error('The '.__NAMESPACE__.'\ValidatorInterface interface is deprecated since version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface interface instead.', E_USER_DEPRECATED); + /** * Validates values and graphs of objects and arrays. * diff --git a/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php b/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php index 0607552cfc886..a392a97ed258d 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; /** diff --git a/src/Symfony/Component/Yaml/Unescaper.php b/src/Symfony/Component/Yaml/Unescaper.php index ffddd95c7bc77..ad1ade4255da4 100644 --- a/src/Symfony/Component/Yaml/Unescaper.php +++ b/src/Symfony/Component/Yaml/Unescaper.php @@ -21,7 +21,7 @@ class Unescaper { // Parser and Inline assume UTF-8 encoding, so escaped Unicode characters // must be converted to that encoding. - // @deprecated since 2.5, to be removed in 3.0 + // @deprecated since version 2.5, to be removed in 3.0 const ENCODING = 'UTF-8'; // Regex fragment that matches an escaped character in a double quoted diff --git a/src/Symfony/Component/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index 0c3ada73568dc..0d1a0905e48a2 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -46,7 +46,7 @@ class Yaml * * @throws ParseException If the YAML is not valid * - * @deprecated The ability to pass file names to Yaml::parse() was deprecated in 2.2 and will be removed in 3.0. Please, pass the contents of the file instead. + * @deprecated The ability to pass file names to the Yaml::parse() method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. * * @api */ @@ -55,7 +55,7 @@ public static function parse($input, $exceptionOnInvalidType = false, $objectSup // if input is a file, process it $file = ''; if (strpos($input, "\n") === false && is_file($input)) { - trigger_error('The ability to pass file names to Yaml::parse() was deprecated in 2.2 and will be removed in 3.0. Please, pass the contents of the file instead.', E_USER_DEPRECATED); + trigger_error('The ability to pass file names to the Yaml::parse() method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED); if (false === is_readable($input)) { throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input)); From 6f57b7b552e77a12f8116460671d78a3eb0ddbb9 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Mon, 29 Dec 2014 17:12:05 +0100 Subject: [PATCH 02/13] Reverted trigger_error() function calls on deprecated interfaces to prevent breaking third party projects implementing them. --- .../Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php | 2 -- .../HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php | 2 -- src/Symfony/Component/HttpKernel/Log/LoggerInterface.php | 2 -- .../Component/OptionsResolver/OptionsResolverInterface.php | 2 -- .../Component/Security/Core/SecurityContextInterface.php | 2 -- src/Symfony/Component/Templating/DebuggerInterface.php | 2 -- src/Symfony/Component/Validator/ClassBasedInterface.php | 2 -- src/Symfony/Component/Validator/ExecutionContextInterface.php | 2 -- .../Component/Validator/GlobalExecutionContextInterface.php | 2 -- src/Symfony/Component/Validator/MetadataFactoryInterface.php | 2 -- src/Symfony/Component/Validator/MetadataInterface.php | 2 -- .../Component/Validator/PropertyMetadataContainerInterface.php | 2 -- src/Symfony/Component/Validator/PropertyMetadataInterface.php | 2 -- src/Symfony/Component/Validator/ValidationVisitorInterface.php | 2 -- src/Symfony/Component/Validator/ValidatorInterface.php | 2 -- 15 files changed, 30 deletions(-) diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php index c6d4a51ef6c07..be2aca581ceda 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('The '.__NAMESPACE__.'\CsrfProviderInterface interface is deprecated since version 2.4 and will be removed in version 3.0. Use the Symfony\Component\Security\Csrf\CsrfTokenManagerInterface interface instead.', E_USER_DEPRECATED); - /** * Marks classes able to provide CSRF protection. * diff --git a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php index 325f5b09377ae..5388e99c9ab37 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategyInterface.php @@ -15,8 +15,6 @@ namespace Symfony\Component\HttpKernel\HttpCache; -trigger_error('The '.__NAMESPACE__.'\EsiResponseCacheStrategyInterface interface is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpKernel\HttpCache\ResponseCacheStrategyInterface interface instead.', E_USER_DEPRECATED); - /** * ResponseCacheStrategyInterface implementations know how to compute the * Response cache HTTP header based on the different response cache headers. diff --git a/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php b/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php index d6e22c7ffbcb8..737ba4e0f65d0 100644 --- a/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php +++ b/src/Symfony/Component/HttpKernel/Log/LoggerInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\HttpKernel\Log; -trigger_error('The '.__NAMESPACE__.'\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Type-hint with the \Psr\Log\LoggerInterface interface instead.', E_USER_DEPRECATED); - use Psr\Log\LoggerInterface as PsrLogger; /** diff --git a/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php b/src/Symfony/Component/OptionsResolver/OptionsResolverInterface.php index 2571b35a30a28..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 '.__NAMESPACE__.'\OptionsResolverInterface interface is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\OptionsResolver\OptionsResolver class instead.', E_USER_DEPRECATED); - use Symfony\Component\OptionsResolver\Exception\InvalidOptionsException; use Symfony\Component\OptionsResolver\Exception\MissingOptionsException; use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException; diff --git a/src/Symfony/Component/Security/Core/SecurityContextInterface.php b/src/Symfony/Component/Security/Core/SecurityContextInterface.php index 0a77f00671c62..0ad7bd3a8907f 100644 --- a/src/Symfony/Component/Security/Core/SecurityContextInterface.php +++ b/src/Symfony/Component/Security/Core/SecurityContextInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Security\Core; -trigger_error('The '.__NAMESPACE__.'\SecurityContextInterface interface is deprecated since version 2.6 and will be removed in 3.0. Use both Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface and Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface interfaces instead.', E_USER_DEPRECATED); - use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; diff --git a/src/Symfony/Component/Templating/DebuggerInterface.php b/src/Symfony/Component/Templating/DebuggerInterface.php index 9b856ccbcb1b9..57e250532d03b 100644 --- a/src/Symfony/Component/Templating/DebuggerInterface.php +++ b/src/Symfony/Component/Templating/DebuggerInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Templating; -trigger_error('The '.__NAMESPACE__.'\DebuggerInterface interface is deprecated since version 2.4 and will be removed in 3.0. Use Psr\Log\LoggerInterface instead.', E_USER_DEPRECATED); - /** * DebuggerInterface is the interface you need to implement * to debug template loader instances. diff --git a/src/Symfony/Component/Validator/ClassBasedInterface.php b/src/Symfony/Component/Validator/ClassBasedInterface.php index 60b631f16190b..e63b8626d2734 100644 --- a/src/Symfony/Component/Validator/ClassBasedInterface.php +++ b/src/Symfony/Component/Validator/ClassBasedInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('The '.__NAMESPACE__.'\ClassBasedInterface interface is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\ClassMetadataInterface interface instead', E_USER_DEPRECATED); - /** * An object backed by a PHP class. * diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 3d789a090c91c..706e9f16a091d 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 '.__NAMESPACE__.'\ExecutionContextInterface interface is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Context\ExecutionContextInterface interface instead.', E_USER_DEPRECATED); - /** * Stores the validator's state during validation. * diff --git a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php index aa783bc5b605f..251e5c34022f1 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('The '.__NAMESPACE__.'\GlobalExecutionContextInterface interface is deprecated since version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Context\ExecutionContextInterface interface instead', E_USER_DEPRECATED); - /** * Stores the node-independent state of a validation run. * diff --git a/src/Symfony/Component/Validator/MetadataFactoryInterface.php b/src/Symfony/Component/Validator/MetadataFactoryInterface.php index c7ee454f05558..b25b10d2e6e56 100644 --- a/src/Symfony/Component/Validator/MetadataFactoryInterface.php +++ b/src/Symfony/Component/Validator/MetadataFactoryInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('The '.__NAMESPACE__.'\MetadataFactoryInterface interface is deprecated since version 2.5 and will be removed in Symfony 3.0. Use the Symfony\Component\Validator\Mapping\Factory\MetadataFactoryInterface interface instead.', E_USER_DEPRECATED); - /** * Returns {@link MetadataInterface} instances for values. * diff --git a/src/Symfony/Component/Validator/MetadataInterface.php b/src/Symfony/Component/Validator/MetadataInterface.php index 28c47271d67a9..5970b7d524da2 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('The '.__NAMESPACE__.'\MetadataInterface interface is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\MetadataInterface interface instead.', E_USER_DEPRECATED); - /** * A container for validation metadata. * diff --git a/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php b/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php index 4a8ffe3d1a0e2..a7cd36a12b462 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('The '.__NAMESPACE__.' interface is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\Mapping\ClassMetadataInterface interface instead.', E_USER_DEPRECATED); - /** * A container for {@link PropertyMetadataInterface} instances. * diff --git a/src/Symfony/Component/Validator/PropertyMetadataInterface.php b/src/Symfony/Component/Validator/PropertyMetadataInterface.php index b12aa1c65ca65..26c05e915a17d 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('The '.__NAMESPACE__.'\PropertyMetadataInterface interface is deprecated since version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Mapping\PropertyMetadataInterface interface instead', E_USER_DEPRECATED); - /** * A container for validation metadata of a property. * diff --git a/src/Symfony/Component/Validator/ValidationVisitorInterface.php b/src/Symfony/Component/Validator/ValidationVisitorInterface.php index 79450ce49659a..94413acd22d1e 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('The '.__NAMESPACE__.'\ValidationVisitorInterface interface is deprecated since version 2.5 and will be removed in version 3.0.', E_USER_DEPRECATED); - /** * Validates values against constraints defined in {@link MetadataInterface} * instances. diff --git a/src/Symfony/Component/Validator/ValidatorInterface.php b/src/Symfony/Component/Validator/ValidatorInterface.php index 912da7c5cf0cc..a9c0a0d8fbad2 100644 --- a/src/Symfony/Component/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/ValidatorInterface.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator; -trigger_error('The '.__NAMESPACE__.'\ValidatorInterface interface is deprecated since version 2.5 and will be removed in version 3.0. Use the Symfony\Component\Validator\Validator\ValidatorInterface interface instead.', E_USER_DEPRECATED); - /** * Validates values and graphs of objects and arrays. * From 2a9749d0f4801d4fac94f781bde5912a060531b0 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Mon, 29 Dec 2014 20:15:36 +0100 Subject: [PATCH 03/13] Fixes deprecation notices. --- src/Symfony/Component/EventDispatcher/Event.php | 16 ++++++---------- .../EventListener/ProfilerListener.php | 11 ++++++++--- .../Component/HttpKernel/Log/NullLogger.php | 10 ++-------- 3 files changed, 16 insertions(+), 21 deletions(-) diff --git a/src/Symfony/Component/EventDispatcher/Event.php b/src/Symfony/Component/EventDispatcher/Event.php index 0d26ec551df28..e873b24702e88 100644 --- a/src/Symfony/Component/EventDispatcher/Event.php +++ b/src/Symfony/Component/EventDispatcher/Event.php @@ -77,14 +77,12 @@ 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 */ public function setDispatcher(EventDispatcherInterface $dispatcher) { - 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); - $this->dispatcher = $dispatcher; } @@ -93,13 +91,13 @@ 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); + trigger_error('The '.__METHOD__.' and '.__CLASS__.'::setDispatcher methods are 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; } @@ -109,13 +107,13 @@ 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); + trigger_error('The '.__METHOD__.' and '.__CLASS__.'::setName methods are 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; } @@ -125,14 +123,12 @@ 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 */ public function setName($name) { - 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); - $this->name = $name; } } diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index 60d15f4e54097..c5a024d14740e 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('The '.__CLASS__.'::onKernelRequest method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + } + $this->profiler = $profiler; $this->matcher = $matcher; $this->onlyException = (bool) $onlyException; @@ -77,8 +84,6 @@ public function onKernelException(GetResponseForExceptionEvent $event) */ public function onKernelRequest(GetResponseEvent $event) { - trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); - if (null === $this->requestStack) { $this->requests[] = $event->getRequest(); } diff --git a/src/Symfony/Component/HttpKernel/Log/NullLogger.php b/src/Symfony/Component/HttpKernel/Log/NullLogger.php index 16a7807643c26..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,8 +26,6 @@ class NullLogger extends PsrNullLogger implements LoggerInterface { /** * @api - * - * @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()) { @@ -34,8 +34,6 @@ public function emerg($message, array $context = array()) /** * @api - * - * @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()) { @@ -44,8 +42,6 @@ public function crit($message, array $context = array()) /** * @api - * - * @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()) { @@ -54,8 +50,6 @@ public function err($message, array $context = array()) /** * @api - * - * @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()) { From 39cfd4744eca41736206b13d539b4036cf50a1d4 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Mon, 29 Dec 2014 20:40:35 +0100 Subject: [PATCH 04/13] Removed deprecation notices from test files. --- .../Component/OptionsResolver/Tests/LegacyOptionsTest.php | 2 +- .../Tests/Core/LegacySecurityContextInterfaceTest.php | 2 -- .../Tests/Constraints/AbstractConstraintValidatorTest.php | 7 ++----- .../Tests/Fixtures/StubGlobalExecutionContext.php | 2 -- 4 files changed, 3 insertions(+), 10 deletions(-) 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/Security/Tests/Core/LegacySecurityContextInterfaceTest.php b/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php index 3ff91d5630de8..764a43d37a897 100644 --- a/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php +++ b/src/Symfony/Component/Security/Tests/Core/LegacySecurityContextInterfaceTest.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Security\Tests\Core; -trigger_error('The '.__NAMESPACE__.'\SecurityContextInterfaceTest class is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED); - use Symfony\Component\Security\Core\SecurityContextInterface; use Symfony\Component\Security\Core\Security; diff --git a/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php b/src/Symfony/Component/Validator/Tests/Constraints/AbstractConstraintValidatorTest.php index ab323a656af2b..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 */ @@ -167,13 +167,10 @@ 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) { - 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); - return new ConstraintViolation( null, $message, diff --git a/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php b/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php index c5b7c5d87a7e7..84c5a80bf2d16 100644 --- a/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php +++ b/src/Symfony/Component/Validator/Tests/Fixtures/StubGlobalExecutionContext.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator\Tests\Fixtures; -trigger_error('The '.__NAMESPACE__.'\StubGlobalExecutionContext class is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - use Symfony\Component\Validator\ConstraintViolationList; use Symfony\Component\Validator\GlobalExecutionContextInterface; use Symfony\Component\Validator\ValidationVisitorInterface; From fd9c7bb39f4753746b1c77ea45c5d726be42df19 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 00:26:56 +0100 Subject: [PATCH 05/13] Normalized @deprecated annotations. --- src/Symfony/Bridge/Doctrine/CHANGELOG.md | 5 ++++ .../Form/ChoiceList/EntityChoiceList.php | 4 +-- .../Doctrine/Tests/DoctrineOrmTestCase.php | 5 ++-- .../Form/ChoiceList/ModelChoiceList.php | 6 ++-- .../DataCollector/MessageDataCollector.php | 4 +-- .../Command/RouterApacheDumperCommand.php | 2 +- .../FrameworkBundle/Controller/Controller.php | 4 +-- .../FrameworkBundle/HttpCache/HttpCache.php | 2 +- .../FrameworkBundle/Templating/Debugger.php | 3 +- .../Templating/GlobalVariables.php | 3 +- .../Templating/Helper/FormHelper.php | 4 +-- .../TwigBundle/Extension/ActionsExtension.php | 2 +- .../ClassLoader/DebugClassLoader.php | 3 +- .../ClassLoader/UniversalClassLoader.php | 3 +- .../Config/Definition/ReferenceDumper.php | 3 +- src/Symfony/Component/Console/Application.php | 4 +-- .../Component/Console/Command/Command.php | 4 +-- .../Component/Console/Helper/DialogHelper.php | 2 +- .../Console/Helper/ProgressHelper.php | 3 +- .../Component/Console/Helper/TableHelper.php | 3 +- .../Console/Input/InputDefinition.php | 4 +-- .../Component/Debug/DebugClassLoader.php | 2 +- .../DependencyInjection/Definition.php | 12 ++++---- .../DependencyInjection/Dumper/PhpDumper.php | 3 +- .../DependencyInjection/SimpleXMLElement.php | 2 +- .../Component/EventDispatcher/Event.php | 4 +-- src/Symfony/Component/Form/ButtonBuilder.php | 6 ++-- .../Form/Exception/AlreadyBoundException.php | 4 +-- .../Extension/Core/ChoiceList/ChoiceList.php | 4 +-- .../Core/ChoiceList/ChoiceListInterface.php | 4 +-- .../Core/ChoiceList/LazyChoiceList.php | 4 +-- .../Core/ChoiceList/ObjectChoiceList.php | 2 +- .../NumberToLocalizedStringTransformer.php | 6 ++-- .../FixCheckboxInputListener.php | 4 +-- .../EventListener/FixRadioInputListener.php | 4 +-- .../EventListener/FixUrlProtocolListener.php | 4 +-- .../EventListener/MergeCollectionListener.php | 4 +-- .../Core/EventListener/ResizeFormListener.php | 8 ++--- .../Core/EventListener/TrimListener.php | 4 +-- .../Csrf/CsrfProvider/CsrfProviderAdapter.php | 2 +- .../CsrfProvider/CsrfProviderInterface.php | 5 ++-- .../CsrfProvider/CsrfTokenManagerAdapter.php | 2 +- .../Csrf/CsrfProvider/DefaultCsrfProvider.php | 4 +-- .../Csrf/CsrfProvider/SessionCsrfProvider.php | 4 +-- .../EventListener/CsrfValidationListener.php | 4 +-- .../EventListener/BindRequestListener.php | 4 +-- src/Symfony/Component/Form/Form.php | 12 ++++---- .../Component/Form/FormConfigBuilder.php | 8 ++--- src/Symfony/Component/Form/FormEvents.php | 12 ++++---- .../Extension/Core/Type/TypeTestCase.php | 3 +- .../Form/Tests/FormIntegrationTestCase.php | 3 +- .../Form/Tests/FormPerformanceTestCase.php | 3 +- .../Form/Util/VirtualFormAwareIterator.php | 4 +-- .../Handler/LegacyPdoSessionHandler.php | 2 +- .../HttpKernel/Debug/ErrorHandler.php | 2 +- .../HttpKernel/Debug/ExceptionHandler.php | 2 +- .../Debug/TraceableEventDispatcher.php | 2 +- .../HttpKernel/EventListener/EsiListener.php | 2 +- .../EventListener/LocaleListener.php | 2 +- .../EventListener/ProfilerListener.php | 2 +- .../EventListener/RouterListener.php | 2 +- .../Exception/FatalErrorException.php | 2 +- .../HttpKernel/Exception/FlattenException.php | 2 +- .../HttpKernel/Fragment/FragmentHandler.php | 2 +- .../Component/HttpKernel/HttpCache/Esi.php | 6 ++-- .../HttpCache/EsiResponseCacheStrategy.php | 2 +- .../HttpKernel/HttpCache/HttpCache.php | 2 +- src/Symfony/Component/HttpKernel/Kernel.php | 4 +-- .../Component/HttpKernel/KernelInterface.php | 2 +- .../MethodArgumentNotImplementedException.php | 4 +-- ...odArgumentValueNotImplementedException.php | 4 +-- .../MethodNotImplementedException.php | 4 +-- .../Exception/NotImplementedException.php | 4 +-- src/Symfony/Component/Locale/Locale.php | 2 +- .../Stub/DateFormat/AmPmTransformer.php | 4 +-- .../Stub/DateFormat/DayOfWeekTransformer.php | 4 +-- .../Stub/DateFormat/DayOfYearTransformer.php | 4 +-- .../Locale/Stub/DateFormat/DayTransformer.php | 4 +-- .../Stub/DateFormat/FullTransformer.php | 4 +-- .../Stub/DateFormat/Hour1200Transformer.php | 4 +-- .../Stub/DateFormat/Hour1201Transformer.php | 4 +-- .../Stub/DateFormat/Hour2400Transformer.php | 4 +-- .../Stub/DateFormat/Hour2401Transformer.php | 4 +-- .../Stub/DateFormat/HourTransformer.php | 4 +-- .../Stub/DateFormat/MinuteTransformer.php | 4 +-- .../Stub/DateFormat/MonthTransformer.php | 4 +-- .../Stub/DateFormat/QuarterTransformer.php | 4 +-- .../Stub/DateFormat/SecondTransformer.php | 4 +-- .../Stub/DateFormat/TimeZoneTransformer.php | 4 +-- .../Locale/Stub/DateFormat/Transformer.php | 4 +-- .../Stub/DateFormat/YearTransformer.php | 4 +-- .../Component/Locale/Stub/StubCollator.php | 4 +-- .../Component/Locale/Stub/StubIntl.php | 4 +-- .../Locale/Stub/StubIntlDateFormatter.php | 4 +-- .../Component/Locale/Stub/StubLocale.php | 2 +- .../Locale/Stub/StubNumberFormatter.php | 4 +-- .../OptionsResolver/OptionsResolver.php | 16 +++++----- src/Symfony/Component/Process/Process.php | 7 +++-- .../PropertyAccess/PropertyAccess.php | 4 +-- .../Component/Routing/Annotation/Route.php | 4 +-- .../Routing/Matcher/ApacheUrlMatcher.php | 2 +- .../Matcher/Dumper/ApacheMatcherDumper.php | 2 +- src/Symfony/Component/Routing/Route.php | 4 +-- .../Security/Core/SecurityContext.php | 10 +++++-- .../Component/Templating/Loader/Loader.php | 4 +-- .../Component/Translation/Translator.php | 2 +- .../Validator/ClassBasedInterface.php | 2 +- .../Validator/ConstraintViolation.php | 4 +-- .../Validator/Constraints/Callback.php | 2 +- .../Constraints/Collection/Optional.php | 4 +-- .../Constraints/Collection/Required.php | 4 +-- .../Constraints/Deprecated/UuidValidator.php | 30 +++++++++++++++++++ .../Component/Validator/Constraints/Isbn.php | 4 +-- .../Validator/Constraints/UuidValidator.php | 13 ++++---- .../Context/LegacyExecutionContextFactory.php | 2 -- .../Validator/ExecutionContextInterface.php | 10 +++---- .../GlobalExecutionContextInterface.php | 2 +- .../Mapping/BlackholeMetadataFactory.php | 2 +- .../Validator/Mapping/Cache/ApcCache.php | 4 +-- .../Validator/Mapping/ClassMetadata.php | 8 ++--- .../Mapping/ClassMetadataFactory.php | 2 +- .../Validator/Mapping/ElementMetadata.php | 2 +- .../Validator/Mapping/MemberMetadata.php | 8 ++--- .../Validator/MetadataFactoryInterface.php | 2 +- .../Component/Validator/MetadataInterface.php | 4 +-- .../PropertyMetadataContainerInterface.php | 2 +- .../Validator/PropertyMetadataInterface.php | 2 +- .../Component/Validator/ValidationVisitor.php | 2 +- .../Validator/ValidationVisitorInterface.php | 6 ++-- src/Symfony/Component/Validator/Validator.php | 2 +- .../Component/Validator/ValidatorBuilder.php | 3 +- .../Validator/ValidatorBuilderInterface.php | 2 +- .../Validator/ValidatorInterface.php | 4 +-- src/Symfony/Component/Yaml/Yaml.php | 6 ++-- 134 files changed, 306 insertions(+), 253 deletions(-) create mode 100644 src/Symfony/Component/Validator/Constraints/Deprecated/UuidValidator.php 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 3ea0bac65a103..57e57e6e25db9 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -296,7 +296,7 @@ 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) { @@ -340,7 +340,7 @@ 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) { diff --git a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php index ce084faa6ee19..dae25951e471f 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php @@ -13,18 +13,19 @@ 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/Propel1/Form/ChoiceList/ModelChoiceList.php b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php index 0d4cf87539f86..b52826d9d6c5d 100644 --- a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php +++ b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php @@ -300,7 +300,7 @@ 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) { @@ -321,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) { @@ -348,7 +348,7 @@ 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) { 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/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php index 69cb9df9ecfe0..4e4ccf68c73b1 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. * diff --git a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php index 89cf9cbf2ff7c..06e6e90756bfe 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -267,8 +267,8 @@ 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() 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 0015b1d35f004..39c44e085fe01 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php @@ -21,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 c31d2baef0a9b..51fe53f2e0ba9 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -37,7 +37,8 @@ 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() 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/TwigBundle/Extension/ActionsExtension.php b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php index c801fe251e5b2..09a4c93f254b1 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php +++ b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php @@ -22,7 +22,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 { diff --git a/src/Symfony/Component/ClassLoader/DebugClassLoader.php b/src/Symfony/Component/ClassLoader/DebugClassLoader.php index 1f974daa57310..351869928c247 100644 --- a/src/Symfony/Component/ClassLoader/DebugClassLoader.php +++ b/src/Symfony/Component/ClassLoader/DebugClassLoader.php @@ -25,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/UniversalClassLoader.php b/src/Symfony/Component/ClassLoader/UniversalClassLoader.php index 31f6c4c588153..781d3a29a931b 100644 --- a/src/Symfony/Component/ClassLoader/UniversalClassLoader.php +++ b/src/Symfony/Component/ClassLoader/UniversalClassLoader.php @@ -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 089aecc6ed0ba..1fd632accdbdd 100644 --- a/src/Symfony/Component/Config/Definition/ReferenceDumper.php +++ b/src/Symfony/Component/Config/Definition/ReferenceDumper.php @@ -16,7 +16,8 @@ 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 fe27de5ae44b1..0b96743f7e16e 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -624,7 +624,7 @@ 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) { @@ -645,7 +645,7 @@ 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) { diff --git a/src/Symfony/Component/Console/Command/Command.php b/src/Symfony/Component/Console/Command/Command.php index 5ab3c7e1e5ebe..b70692fc6ab09 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -605,7 +605,7 @@ 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() { @@ -625,7 +625,7 @@ 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) { 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/ProgressHelper.php b/src/Symfony/Component/Console/Helper/ProgressHelper.php index 98b9f80910007..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 version 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 { diff --git a/src/Symfony/Component/Console/Helper/TableHelper.php b/src/Symfony/Component/Console/Helper/TableHelper.php index f8dca28ab63f9..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 version 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 { diff --git a/src/Symfony/Component/Console/Input/InputDefinition.php b/src/Symfony/Component/Console/Input/InputDefinition.php index 608b42072bec2..51d1bdd8aa188 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -417,7 +417,7 @@ 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() { @@ -437,7 +437,7 @@ 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) { diff --git a/src/Symfony/Component/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php index 8fd4d84b515b5..143fab91ae603 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -122,7 +122,7 @@ public static function disable() * * @return string|null * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. */ public function findFile($class) { diff --git a/src/Symfony/Component/DependencyInjection/Definition.php b/src/Symfony/Component/DependencyInjection/Definition.php index a8ad02792409a..97cd849dda9bf 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -94,7 +94,7 @@ 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) { @@ -111,7 +111,7 @@ 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() { @@ -128,7 +128,7 @@ 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) { @@ -180,7 +180,7 @@ 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() { @@ -197,7 +197,7 @@ 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) { @@ -214,7 +214,7 @@ 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() { diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index f23ff69f90206..6e2369144e636 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1402,7 +1402,8 @@ public function dumpParameter($name) } /** - * @deprecated Deprecated since version 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 */ diff --git a/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php b/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php index 9a1c845be0a37..1b318fd9e4231 100644 --- a/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php +++ b/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php @@ -21,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 e873b24702e88..e411ca81360ad 100644 --- a/src/Symfony/Component/EventDispatcher/Event.php +++ b/src/Symfony/Component/EventDispatcher/Event.php @@ -97,7 +97,7 @@ public function setDispatcher(EventDispatcherInterface $dispatcher) */ public function getDispatcher() { - trigger_error('The '.__METHOD__.' and '.__CLASS__.'::setDispatcher methods are deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED); return $this->dispatcher; } @@ -113,7 +113,7 @@ public function getDispatcher() */ public function getName() { - trigger_error('The '.__METHOD__.' and '.__CLASS__.'::setName methods are deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED); return $this->name; } diff --git a/src/Symfony/Component/Form/ButtonBuilder.php b/src/Symfony/Component/Form/ButtonBuilder.php index 1d5e789518b9a..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('The '.__METHOD__.' method 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/Exception/AlreadyBoundException.php b/src/Symfony/Component/Form/Exception/AlreadyBoundException.php index 7df837de8b626..03e258ff079c8 100644 --- a/src/Symfony/Component/Form/Exception/AlreadyBoundException.php +++ b/src/Symfony/Component/Form/Exception/AlreadyBoundException.php @@ -16,8 +16,8 @@ /** * Alias of {@link AlreadySubmittedException}. * - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use - * {@link AlreadySubmittedException} instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use {@link AlreadySubmittedException} instead. */ class AlreadyBoundException extends LogicException { diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php index 05929557d2d4f..99daf7095eb42 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ChoiceList.php @@ -199,7 +199,7 @@ 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) { @@ -227,7 +227,7 @@ 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) { 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 ab8b40f7a6079..ee136f79780f5 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/LazyChoiceList.php @@ -106,7 +106,7 @@ 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) { @@ -122,7 +122,7 @@ 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) { diff --git a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php index 80ae464526992..c7fb9ad1a88ed 100644 --- a/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php +++ b/src/Symfony/Component/Form/Extension/Core/ChoiceList/ObjectChoiceList.php @@ -187,7 +187,7 @@ 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) { 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 e69f5af53a0f6..b201802fbcfff 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixCheckboxInputListener.php @@ -81,8 +81,8 @@ 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) { diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php index af6eacae54783..c5f871756bab4 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixRadioInputListener.php @@ -63,8 +63,8 @@ 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) { diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php index 9f946085a52a8..50e60d8287d6c 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/FixUrlProtocolListener.php @@ -46,8 +46,8 @@ 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) { diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php index d99b3b7002772..ef8dffed7bcb7 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/MergeCollectionListener.php @@ -129,8 +129,8 @@ 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) { diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php index 849b7c96942d3..97aba300b9b90 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/ResizeFormListener.php @@ -184,8 +184,8 @@ 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) { @@ -197,8 +197,8 @@ public function preBind(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) { diff --git a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php index c866cde85f29d..dd64a53ecea9a 100644 --- a/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php +++ b/src/Symfony/Component/Form/Extension/Core/EventListener/TrimListener.php @@ -40,8 +40,8 @@ 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) { diff --git a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php index bdadb5e73b00d..b70a8e823d26d 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderAdapter.php @@ -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 be2aca581ceda..dd5b1fce1f41b 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfProviderInterface.php @@ -27,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 cf811a0d26455..c16cc291526fa 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/CsrfTokenManagerAdapter.php @@ -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 3083266d09109..7747f9e1dd78f 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/DefaultCsrfProvider.php @@ -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 531a253e7b61d..6159071352958 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php +++ b/src/Symfony/Component/Form/Extension/Csrf/CsrfProvider/SessionCsrfProvider.php @@ -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 ac88d659090a4..bdc02b5ad2cfa 100644 --- a/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php +++ b/src/Symfony/Component/Form/Extension/Csrf/EventListener/CsrfValidationListener.php @@ -118,8 +118,8 @@ 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) { diff --git a/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php b/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php index 899552de38618..499a4d78aa6bc 100644 --- a/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php +++ b/src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php @@ -21,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/Form.php b/src/Symfony/Component/Form/Form.php index beaffb8cb0b2c..99d25c2ef09cc 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -676,8 +676,8 @@ 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) { @@ -719,8 +719,8 @@ 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() { @@ -843,8 +843,8 @@ 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) { diff --git a/src/Symfony/Component/Form/FormConfigBuilder.php b/src/Symfony/Component/Form/FormConfigBuilder.php index 01c4067499161..381a9acabf4f1 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -351,8 +351,8 @@ 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() { @@ -717,8 +717,8 @@ 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) { 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 e3f0f2dcfb2f7..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,7 +14,8 @@ 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 { diff --git a/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php b/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php index 7c3c242c26eaa..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 { diff --git a/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php b/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php index f11d698286872..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 { diff --git a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php index 2453c810b8468..7f5f8cec0cd97 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -22,8 +22,8 @@ * * @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 { diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php index df31832701d58..6f89f38077596 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php @@ -24,7 +24,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 diff --git a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php index d6c3a283acaa8..577265bfa04d3 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php @@ -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 68b9d519818ab..6ffba89f891ff 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php @@ -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 7c679c94e7eb0..0a82d76525491 100644 --- a/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php +++ b/src/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php @@ -34,7 +34,7 @@ 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) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php index 64cf48ba231f1..9bede00564ba6 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php @@ -18,7 +18,7 @@ * * @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/LocaleListener.php b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php index ef50e6e8fc6e7..ef3911694a970 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -54,7 +54,7 @@ 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) { diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index c5a024d14740e..5e3961fe0c104 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -80,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 95bfc5e7f6679..5af7e7387f0df 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -82,7 +82,7 @@ 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 moved to a private function in 3.0. */ public function setRequest(Request $request = null) { diff --git a/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php b/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php index f5736ef6902b7..04f927313bee4 100644 --- a/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php +++ b/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php @@ -18,6 +18,6 @@ * * @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 912b20e93e75f..70be1ec8a145b 100644 --- a/src/Symfony/Component/HttpKernel/Exception/FlattenException.php +++ b/src/Symfony/Component/HttpKernel/Exception/FlattenException.php @@ -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 a28b292f07965..eae715e8acb5e 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -76,7 +76,7 @@ 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) { diff --git a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php index 359e4a7b911ea..952021dcf544c 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -75,7 +75,7 @@ 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) { @@ -103,7 +103,7 @@ 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) { @@ -148,7 +148,7 @@ 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) { diff --git a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php index 39a10a2e815f1..0d855464a37e4 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php @@ -26,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 47dbe1b87f5ce..b6ccafc18815c 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -170,7 +170,7 @@ 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() { diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 8dd287873a1fb..480a9898fa5f8 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -95,7 +95,7 @@ public function __construct($environment, $debug) } /** - * @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() { @@ -217,7 +217,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/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/Locale/Exception/MethodArgumentNotImplementedException.php b/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php index 4176d2bb8ebd3..d94d61c4e6b0a 100644 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php @@ -20,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 ab2e1c0d556a9..171487a10ac6b 100644 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php @@ -20,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 39d0608328322..1ebcc4809debb 100644 --- a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php @@ -20,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 8b122d70ab0ad..885c9e56f1401 100644 --- a/src/Symfony/Component/Locale/Exception/NotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/NotImplementedException.php @@ -20,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 82360172cfb90..c0c854356481b 100644 --- a/src/Symfony/Component/Locale/Locale.php +++ b/src/Symfony/Component/Locale/Locale.php @@ -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 6f5b09e5482e3..7c3b9fdc08965 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php @@ -20,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 3ffa3672e08e6..5368c6609841b 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php @@ -20,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 625f38240cc38..442085287b657 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php @@ -20,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 5e60ed7f4f75c..a85ea820bafc2 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php @@ -20,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 d8f23dd703b39..2c2c0d2266b24 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php @@ -20,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 c4fd9af5c7f9e..253f7274b1e9f 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php @@ -20,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 89bfd8f824a9c..f689c45a6ef82 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php @@ -20,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 4736a2b95b173..2e34f168ad720 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php @@ -20,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 574f338edabb9..f9cb610df61cb 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php @@ -20,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 cd28c7f05d2f8..7e5df5a729c3b 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php @@ -20,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 278d399977d6e..6768404fd993d 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php @@ -20,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 375819bb0ccf7..351ff0e6f68f9 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php @@ -20,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 e9e45642da990..ef09fa4bceaf7 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php @@ -20,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 d5add3bcebfba..6afc55004daf1 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php @@ -20,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 7a1f50d68b67b..7af84f2971789 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php @@ -20,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 3b71cffe953f5..7b9cf155c8e27 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php @@ -20,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 3cfd594f39f4d..f733c8abf9aae 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php @@ -20,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 8b36a64c7e2c7..eeffde1ec27dd 100644 --- a/src/Symfony/Component/Locale/Stub/StubCollator.php +++ b/src/Symfony/Component/Locale/Stub/StubCollator.php @@ -20,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 aeea2a9b2bc35..4562791291956 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntl.php +++ b/src/Symfony/Component/Locale/Stub/StubIntl.php @@ -20,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 df70d7b3524e5..4826f27ade9a0 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -20,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 7ecae64b7ea52..001bf53c0012d 100644 --- a/src/Symfony/Component/Locale/Stub/StubLocale.php +++ b/src/Symfony/Component/Locale/Stub/StubLocale.php @@ -21,7 +21,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 \Symfony\Component\Intl\Locale\Locale} and * {@link \Symfony\Component\Intl\Intl} instead. */ diff --git a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php index bcd2f065015ee..aa4aae014d4b1 100644 --- a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php @@ -20,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 a7575f1b8979c..96f28cc348ad8 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -1011,7 +1011,7 @@ 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) { @@ -1023,7 +1023,7 @@ public function set($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) { @@ -1037,7 +1037,7 @@ 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) { @@ -1049,7 +1049,7 @@ public function overload($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) { @@ -1061,7 +1061,7 @@ public function get($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) { @@ -1073,7 +1073,7 @@ public function has($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) { @@ -1087,7 +1087,7 @@ 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) { @@ -1099,7 +1099,7 @@ public function setOptional(array $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) { diff --git a/src/Symfony/Component/Process/Process.php b/src/Symfony/Component/Process/Process.php index 9d5f8c6abece4..9242eb3f720fb 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1062,7 +1062,8 @@ 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() @@ -1089,8 +1090,8 @@ 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 diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccess.php b/src/Symfony/Component/PropertyAccess/PropertyAccess.php index 705b35cd4adec..91f2ec371e0e9 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -43,8 +43,8 @@ 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() { diff --git a/src/Symfony/Component/Routing/Annotation/Route.php b/src/Symfony/Component/Routing/Annotation/Route.php index 275531cff0a16..af2158250c770 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -55,7 +55,7 @@ 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) { @@ -65,7 +65,7 @@ public function setPattern($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() { diff --git a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php index 3147843ba2fb2..57ad67ab5626e 100644 --- a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -18,7 +18,7 @@ /** * 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 c09cdc142692f..a7cc485b925a2 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -18,7 +18,7 @@ /** * 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 4fbac27610a73..02b81b3483f9f 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -147,7 +147,7 @@ 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() { @@ -165,7 +165,7 @@ 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) { diff --git a/src/Symfony/Component/Security/Core/SecurityContext.php b/src/Symfony/Component/Security/Core/SecurityContext.php index 7edea64beda80..7695959037740 100644 --- a/src/Symfony/Component/Security/Core/SecurityContext.php +++ b/src/Symfony/Component/Security/Core/SecurityContext.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Security\Core; -trigger_error('The '.__NAMESPACE__.'\SecurityContext class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface and Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface implementation to check for authentication and authorization.', E_USER_DEPRECATED); - use Symfony\Component\Security\Core\Authentication\AuthenticationManagerInterface; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage; use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface; @@ -28,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 { @@ -72,6 +70,8 @@ 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() @@ -82,6 +82,8 @@ public function getToken() } /** + * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::setToken() instead. + * * {@inheritdoc} */ public function setToken(TokenInterface $token = null) @@ -92,6 +94,8 @@ public function setToken(TokenInterface $token = null) } /** + * @deprecated since version 2.6, to be removed in 3.0. Use AuthorizationCheckerInterface::isGranted() instead. + * * {@inheritdoc} */ public function isGranted($attributes, $object = null) diff --git a/src/Symfony/Component/Templating/Loader/Loader.php b/src/Symfony/Component/Templating/Loader/Loader.php index 9b492a6c65f4b..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,7 +46,7 @@ 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) { diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 79754ef518c30..69d765b78ed5c 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -154,7 +154,7 @@ 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 */ diff --git a/src/Symfony/Component/Validator/ClassBasedInterface.php b/src/Symfony/Component/Validator/ClassBasedInterface.php index e63b8626d2734..7c2eb8f0f7c92 100644 --- a/src/Symfony/Component/Validator/ClassBasedInterface.php +++ b/src/Symfony/Component/Validator/ClassBasedInterface.php @@ -16,7 +16,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\ClassMetadataInterface} instead. */ interface ClassBasedInterface diff --git a/src/Symfony/Component/Validator/ConstraintViolation.php b/src/Symfony/Component/Validator/ConstraintViolation.php index b509362729e15..7df3f3fadeef7 100644 --- a/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/Symfony/Component/Validator/ConstraintViolation.php @@ -142,7 +142,7 @@ 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() @@ -163,7 +163,7 @@ 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() diff --git a/src/Symfony/Component/Validator/Constraints/Callback.php b/src/Symfony/Component/Validator/Constraints/Callback.php index 14d3354482153..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; diff --git a/src/Symfony/Component/Validator/Constraints/Collection/Optional.php b/src/Symfony/Component/Validator/Constraints/Collection/Optional.php index 044ff17226570..cd9af50b9acfa 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection/Optional.php +++ b/src/Symfony/Component/Validator/Constraints/Collection/Optional.php @@ -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 0750f78b6e44d..55041020b7a56 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection/Required.php +++ b/src/Symfony/Component/Validator/Constraints/Collection/Required.php @@ -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/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/UuidValidator.php b/src/Symfony/Component/Validator/Constraints/UuidValidator.php index b0cab848bf8ac..7c469ff52e040 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\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 version 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 version 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 version 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/Context/LegacyExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php index e7ab3cdb3cf18..b0fdbb176cd6d 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator\Context; -trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory class is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContextFactory class instead.', E_USER_DEPRECATED); - use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 706e9f16a091d..92d4230b28ce6 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -83,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 @@ -118,7 +118,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. */ @@ -163,7 +163,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. */ @@ -196,7 +196,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. */ @@ -257,7 +257,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 251e5c34022f1..5c646f294baee 100644 --- a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php @@ -27,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 c49f43dc08e1a..ad5a980e4ca31 100644 --- a/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php @@ -20,7 +20,7 @@ * * @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 MappingBlackHoleMetadataFactory diff --git a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php index 0e94891ed447f..5dbe9f406a148 100644 --- a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php +++ b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php @@ -16,8 +16,8 @@ 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 { diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index 29fbedfbdd617..72e0cec99cb01 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -129,7 +129,7 @@ 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) { @@ -373,7 +373,7 @@ 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 in 3.0. */ protected function addMemberMetadata(MemberMetadata $metadata) { @@ -389,7 +389,7 @@ 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) { @@ -405,7 +405,7 @@ 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) { diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php index 52842432c5c22..92cc85b2ef67d 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php @@ -20,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/ElementMetadata.php b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php index 9b37a4185f890..d036dcf2f18da 100644 --- a/src/Symfony/Component/Validator/Mapping/ElementMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php @@ -18,7 +18,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. * Extend {@link GenericMetadata} instead. */ abstract class ElementMetadata extends GenericMetadata diff --git a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php index 279372fd1a61a..394fa2059fd8c 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -78,7 +78,7 @@ 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) { @@ -187,7 +187,7 @@ 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() @@ -203,7 +203,7 @@ 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() @@ -219,7 +219,7 @@ 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() diff --git a/src/Symfony/Component/Validator/MetadataFactoryInterface.php b/src/Symfony/Component/Validator/MetadataFactoryInterface.php index b25b10d2e6e56..555bea9aa21e5 100644 --- a/src/Symfony/Component/Validator/MetadataFactoryInterface.php +++ b/src/Symfony/Component/Validator/MetadataFactoryInterface.php @@ -16,7 +16,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\Factory\MetadataFactoryInterface} instead. */ interface MetadataFactoryInterface diff --git a/src/Symfony/Component/Validator/MetadataInterface.php b/src/Symfony/Component/Validator/MetadataInterface.php index 5970b7d524da2..2c8944903c6bf 100644 --- a/src/Symfony/Component/Validator/MetadataInterface.php +++ b/src/Symfony/Component/Validator/MetadataInterface.php @@ -42,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 @@ -58,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 a7cd36a12b462..5441be1c3d063 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php @@ -16,7 +16,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\ClassMetadataInterface} instead. */ interface PropertyMetadataContainerInterface diff --git a/src/Symfony/Component/Validator/PropertyMetadataInterface.php b/src/Symfony/Component/Validator/PropertyMetadataInterface.php index 26c05e915a17d..20af8a993bcda 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataInterface.php @@ -24,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/ValidationVisitor.php b/src/Symfony/Component/Validator/ValidationVisitor.php index 0348745d752c0..401706cbf2134 100644 --- a/src/Symfony/Component/Validator/ValidationVisitor.php +++ b/src/Symfony/Component/Validator/ValidationVisitor.php @@ -23,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 { diff --git a/src/Symfony/Component/Validator/ValidationVisitorInterface.php b/src/Symfony/Component/Validator/ValidationVisitorInterface.php index 94413acd22d1e..4cd5ecda9169c 100644 --- a/src/Symfony/Component/Validator/ValidationVisitorInterface.php +++ b/src/Symfony/Component/Validator/ValidationVisitorInterface.php @@ -34,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 { @@ -65,7 +65,7 @@ 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. + * @deprecated since version 2.5, to be removed in 3.0. */ public function validate($value, $group, $propertyPath, $traverse = false, $deep = false); @@ -80,7 +80,7 @@ public function validate($value, $group, $propertyPath, $traverse = false, $deep * @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. + * @deprecated since version 2.5, to be removed in 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 ddf2b64e93e14..8243f17acbf6b 100644 --- a/src/Symfony/Component/Validator/Validator.php +++ b/src/Symfony/Component/Validator/Validator.php @@ -23,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/ValidatorBuilder.php b/src/Symfony/Component/Validator/ValidatorBuilder.php index 297c1bd35a54c..f80435a4dacd2 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -303,7 +303,8 @@ 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) { 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..7ef9e59654ecc 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 @@ -105,7 +105,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/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index 0d1a0905e48a2..c9bb7934037aa 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -46,7 +46,9 @@ class Yaml * * @throws ParseException If the YAML is not valid * - * @deprecated The ability to pass file names to the Yaml::parse() method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. + * @deprecated since version 2.2, to be removed in 3.0. + * The ability to pass file names to the parse() method is + * deprecated. Pass the YAML contents of the file instead. * * @api */ @@ -55,7 +57,7 @@ public static function parse($input, $exceptionOnInvalidType = false, $objectSup // if input is a file, process it $file = ''; if (strpos($input, "\n") === false && is_file($input)) { - trigger_error('The ability to pass file names to the Yaml::parse() method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED); + trigger_error('The ability to pass file names to the '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED); if (false === is_readable($input)) { throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input)); From 97efd2cfe5775b50484c95decb49554f1aabc7d0 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 10:01:12 +0100 Subject: [PATCH 06/13] Fixes more deprecation notices. --- .../EventListener/ProfilerListener.php | 2 +- .../EventListener/RouterListener.php | 16 +++++++++++++--- .../Validator/Validator/LegacyValidator.php | 8 ++++---- .../Component/Yaml/Deprecated/Unescaper.php | 19 +++++++++++++++++++ src/Symfony/Component/Yaml/Unescaper.php | 18 ++++++++++++------ 5 files changed, 49 insertions(+), 14 deletions(-) create mode 100644 src/Symfony/Component/Yaml/Deprecated/Unescaper.php diff --git a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php index 5e3961fe0c104..781475a9925d2 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -53,7 +53,7 @@ public function __construct(Profiler $profiler, RequestMatcherInterface $matcher // 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('The '.__CLASS__.'::onKernelRequest method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED); + 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; diff --git a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php index 5af7e7387f0df..10ed27cd7bd6c 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; @@ -88,9 +92,15 @@ 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; } @@ -100,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) @@ -108,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/Validator/Validator/LegacyValidator.php b/src/Symfony/Component/Validator/Validator/LegacyValidator.php index 2e98921df4ae1..cac4fa96a598d 100644 --- a/src/Symfony/Component/Validator/Validator/LegacyValidator.php +++ b/src/Symfony/Component/Validator/Validator/LegacyValidator.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator\Validator; -trigger_error('The '.__NAMESPACE__.'\LegacyValidator class is deprecated since version 2.5 and will be removed in 3.0. Use the Symfony\Component\Validator\RecursiveValidator class instead.', E_USER_DEPRECATED); - use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraints\GroupSequence; use Symfony\Component\Validator\Constraints\Valid; @@ -54,7 +52,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 Symfony\Component\Validator\Validator\ValidatorInterface::validate 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)); @@ -63,13 +61,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 Symfony\Component\Validator\Validator\ValidatorInterface::validateValue 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 Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFactory 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 $this->metadataFactory; } 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 @@ + Date: Tue, 30 Dec 2014 10:11:35 +0100 Subject: [PATCH 07/13] [Form] Adds a way to trigger deprecation notice on demand for VirtualFormAwareIterator class. --- .../Form/Util/InheritDataAwareIterator.php | 6 ++++++ .../Form/Util/VirtualFormAwareIterator.php | 17 +++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php b/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php index ba157b7d182f4..652c00b5a6d99 100644 --- a/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php +++ b/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php @@ -25,4 +25,10 @@ */ class InheritDataAwareIterator extends VirtualFormAwareIterator { + public function __construct(\Traversable $iterator) + { + // Do not trigger deprecation notice in parent construct method + // when using this class instead of the deprecated parent one. + parent::__construct($iterator, false); + } } diff --git a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php index 7f5f8cec0cd97..dd893935bb152 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('The '.__NAMESPACE__.'\VirtualFormAwareIterator 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); - /** * Iterator that traverses an array of forms. * @@ -27,6 +25,21 @@ */ class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator { + public function __construct(\Traversable $iterator, $triggerDeprecationNotice = true) + { + /** + * 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 ($triggerDeprecationNotice) { + 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} */ From cd9617a6a47e3c00005cf9b929602209bc419292 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 12:10:06 +0100 Subject: [PATCH 08/13] [Validator] adds more deprecation notices. --- .../Validator/ConstraintValidator.php | 4 +-- .../Validator/Constraints/GroupSequence.php | 30 +++++++++++-------- .../Validator/Context/ExecutionContext.php | 20 ++++++++++--- .../Context/LegacyExecutionContext.php | 15 +++++++--- .../Context/LegacyExecutionContextFactory.php | 7 +++-- .../Validator/ExecutionContextInterface.php | 6 ++-- .../Mapping/Deprecated/TraversalStrategy.php | 27 +++++++++++++++++ .../Validator/Mapping/GenericMetadata.php | 5 ++-- .../Validator/Mapping/TraversalStrategy.php | 9 ++++-- .../Component/Validator/ValidationVisitor.php | 2 -- .../Validator/ValidationVisitorInterface.php | 4 --- .../Validator/Validator/LegacyValidator.php | 9 +++--- .../Validator/ValidatorInterface.php | 5 ++-- .../LegacyConstraintViolationBuilder.php | 2 +- 14 files changed, 99 insertions(+), 46 deletions(-) create mode 100644 src/Symfony/Component/Validator/Mapping/Deprecated/TraversalStrategy.php diff --git a/src/Symfony/Component/Validator/ConstraintValidator.php b/src/Symfony/Component/Validator/ConstraintValidator.php index acf499c999e75..7a412737bd9a1 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -61,7 +61,7 @@ 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()) { @@ -84,7 +84,7 @@ 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()) { diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index c540c699b25ac..9a3cad2581d2d 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -97,12 +97,13 @@ 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 Symfony 3.0. */ public function getIterator() { @@ -114,12 +115,13 @@ public function getIterator() /** * 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 Symfony 3.0. */ public function offsetExists($offset) { @@ -131,14 +133,15 @@ public function offsetExists($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 Symfony 3.0. */ public function offsetGet($offset) { @@ -157,11 +160,12 @@ 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 Symfony 3.0. */ public function offsetSet($offset, $value) { @@ -179,10 +183,11 @@ 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 Symfony 3.0. */ public function offsetUnset($offset) { @@ -194,10 +199,11 @@ public function offsetUnset($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 Symfony 3.0. */ public function count() { diff --git a/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/Symfony/Component/Validator/Context/ExecutionContext.php index d7f157da1c3fa..9c5e6d639f0f0 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -187,8 +187,10 @@ public function addViolation($message, array $parameters = array(), $invalidValu // API, as they are not present in the new interface anymore. // You should use buildViolation() instead. 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); + 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.' ); @@ -286,7 +288,13 @@ public function getGroup() */ public function getClassName() { - return $this->metadata instanceof ClassBasedInterface ? $this->metadata->getClassName() : null; + if ($this->metadata instanceof ClassBasedInterface) { + trigger_error('The Symfony\Component\Validator\ClassBasedInterface interface is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); + + return $this->metadata->getClassName(); + } + + return null; } /** @@ -310,6 +318,8 @@ public function getPropertyPath($subPath = '') */ public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) { + trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); + throw new BadMethodCallException( 'addViolationAt() is not supported anymore as of Symfony 2.5. '. 'Please use buildViolation() instead or enable the legacy mode.' @@ -321,7 +331,7 @@ 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); + trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator method together with Symfony\Component\Validator\Validator\ValidatorInterface::inContext method instead.', E_USER_DEPRECATED); throw new BadMethodCallException( 'validate() is not supported anymore as of Symfony 2.5. '. @@ -334,7 +344,7 @@ 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); + trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator method together with Symfony\Component\Validator\Validator\ValidatorInterface::inContext method instead.', E_USER_DEPRECATED); throw new BadMethodCallException( 'validateValue() is not supported anymore as of Symfony 2.5. '. @@ -347,6 +357,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 '.__CLASS__.'::getValidator method together with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); + throw new BadMethodCallException( 'getMetadataFactory() is not supported anymore as of Symfony 2.5. '. 'Please use getValidator() in combination with getMetadataFor() '. diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php index e922a5cbc8073..274be01db1534 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator\Context; -trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContext class is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); - use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\Constraints\Valid; use Symfony\Component\Validator\MetadataFactoryInterface; @@ -24,8 +22,7 @@ * @since 2.5 * @author Bernhard Schussek * - * @deprecated Implemented for backward 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 { @@ -44,6 +41,8 @@ class LegacyExecutionContext extends ExecutionContext */ public function __construct(ValidatorInterface $validator, $root, MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null) { + trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); + parent::__construct( $validator, $root, @@ -60,6 +59,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) @@ -79,6 +80,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) @@ -140,6 +143,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) @@ -153,6 +158,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 b0fdbb176cd6d..9b225636e2a09 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php @@ -11,6 +11,8 @@ namespace Symfony\Component\Validator\Context; +trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory is deprecated since version 2.5 and will be removed in 3.0.'); + use Symfony\Component\Translation\TranslatorInterface; use Symfony\Component\Validator\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; @@ -18,11 +20,12 @@ /** * Creates new {@link LegacyExecutionContext} instances. * + * Implemented for backward compatibility with Symfony < 2.5. + * * @since 2.5 * @author Bernhard Schussek * - * @deprecated Implemented for backward 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/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 92d4230b28ce6..1d35580c4df79 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -99,9 +99,9 @@ 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 since version 2.5. + * The parameters $invalidValue, $plural and $code will be removed + * in 3.0. */ public function addViolation($message, array $params = array(), $invalidValue = null, $plural = null, $code = null); 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/GenericMetadata.php b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index 044c884a9a28d..44fed359816b5 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 backward 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/TraversalStrategy.php b/src/Symfony/Component/Validator/Mapping/TraversalStrategy.php index 44b760c1df211..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 backward 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/ValidationVisitor.php b/src/Symfony/Component/Validator/ValidationVisitor.php index 401706cbf2134..c7e06554b8cb5 100644 --- a/src/Symfony/Component/Validator/ValidationVisitor.php +++ b/src/Symfony/Component/Validator/ValidationVisitor.php @@ -81,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 4cd5ecda9169c..0ab7b7366776c 100644 --- a/src/Symfony/Component/Validator/ValidationVisitorInterface.php +++ b/src/Symfony/Component/Validator/ValidationVisitorInterface.php @@ -64,8 +64,6 @@ interface ValidationVisitorInterface * * @throws Exception\NoSuchMetadataException If no metadata can be found for * the given value. - * - * @deprecated since version 2.5, to be removed in 3.0. */ public function validate($value, $group, $propertyPath, $traverse = false, $deep = false); @@ -79,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 since version 2.5, to be removed in 3.0. */ public function visit(MetadataInterface $metadata, $value, $group, $propertyPath); } diff --git a/src/Symfony/Component/Validator/Validator/LegacyValidator.php b/src/Symfony/Component/Validator/Validator/LegacyValidator.php index cac4fa96a598d..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 backward 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('The Symfony\Component\Validator\Validator\ValidatorInterface::validate 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); + 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,14 +60,14 @@ public function validate($value, $groups = null, $traverse = false, $deep = fals public function validateValue($value, $constraints, $groups = null) { - trigger_error('The Symfony\Component\Validator\Validator\ValidatorInterface::validateValue 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); + 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 Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFactory 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); + 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/ValidatorInterface.php b/src/Symfony/Component/Validator/ValidatorInterface.php index 7ef9e59654ecc..d207a9c940e35 100644 --- a/src/Symfony/Component/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/ValidatorInterface.php @@ -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); diff --git a/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php b/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php index a392a97ed258d..01effe46c8db7 100644 --- a/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php +++ b/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php @@ -23,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 { From e608ba6f1a4a461ecbc411b74a28aba527f666b4 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 12:10:19 +0100 Subject: [PATCH 09/13] [Form] adds more deprecation notices. --- .../Validator/Constraints/Deprecated/Form.php | 27 +++++++++++++++++++ .../Extension/Validator/Constraints/Form.php | 7 ++--- 2 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 src/Symfony/Component/Form/Extension/Validator/Constraints/Deprecated/Form.php 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 b47f01d7c6b68..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 since version 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', From 738b9be447f99587a613bc6d766c37640fd4dfee Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 13:01:20 +0100 Subject: [PATCH 10/13] [Validator] fixes UuidValidator deprecated class namespace. --- src/Symfony/Component/Validator/Constraints/UuidValidator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/Validator/Constraints/UuidValidator.php b/src/Symfony/Component/Validator/Constraints/UuidValidator.php index 7c469ff52e040..e026705c04553 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -13,7 +13,7 @@ use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\ConstraintValidator; -use Symfony\Component\Validator\Constraints\UuidValidator as Deprecated; +use Symfony\Component\Validator\Constraints\Deprecated\UuidValidator as Deprecated; use Symfony\Component\Validator\Exception\UnexpectedTypeException; /** From 2a3e7d2cc9ccfe02de6c5b705cb7d015db05c151 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Tue, 30 Dec 2014 13:40:50 +0100 Subject: [PATCH 11/13] Normalizes deprecation notice messages. --- .../Templating/Helper/RequestHelper.php | 2 +- .../Templating/Helper/SessionHelper.php | 2 +- src/Symfony/Bundle/TwigBundle/TwigEngine.php | 7 ++++--- .../ClassLoader/ApcUniversalClassLoader.php | 5 ++++- src/Symfony/Component/ClassLoader/CHANGELOG.md | 5 ----- .../ClassLoader/DebugUniversalClassLoader.php | 5 ++++- .../ClassNotFoundFatalErrorHandler.php | 2 +- .../HttpFoundation/Session/Flash/FlashBag.php | 2 +- .../Storage/Handler/LegacyPdoSessionHandler.php | 4 ++-- .../HttpKernel/EventListener/ExceptionListener.php | 2 +- .../HttpKernel/EventListener/RouterListener.php | 2 +- .../Component/Serializer/Encoder/JsonDecode.php | 3 ++- .../Component/Serializer/Encoder/JsonEncode.php | 3 ++- .../Component/Serializer/Encoder/JsonEncoder.php | 4 ++-- .../Validator/Constraints/GroupSequence.php | 12 ++++++------ .../Context/LegacyExecutionContextFactory.php | 2 +- src/Symfony/Component/Validator/ExecutionContext.php | 2 +- .../Component/Validator/Mapping/ClassMetadata.php | 2 +- 18 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php index 297b2884f6ea1..4aba0c202f45c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/RequestHelper.php @@ -30,7 +30,7 @@ class RequestHelper extends Helper * * @param Request|RequestStack $requestStack A RequestStack instance or a Request instance * - * @deprecated since version 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) { diff --git a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php index b23a26fe223a4..3558b9ce04381 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/SessionHelper.php @@ -30,7 +30,7 @@ class SessionHelper extends Helper * * @param Request|RequestStack $requestStack A RequestStack instance or a Request instance * - * @deprecated since version 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) { diff --git a/src/Symfony/Bundle/TwigBundle/TwigEngine.php b/src/Symfony/Bundle/TwigBundle/TwigEngine.php index 324cd34fc9d12..493d70dae22e8 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigEngine.php +++ b/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -42,8 +42,8 @@ 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.3, to be removed in 3.0. + * Inject the escaping strategy on \Twig_Environment instead. */ public function setDefaultEscapingStrategy($strategy) { @@ -51,7 +51,8 @@ public function setDefaultEscapingStrategy($strategy) } /** - * @deprecated Deprecated since version 2.3, to be removed in 3.0. Use TwigDefaultEscapingStrategy instead. + * @deprecated since version 2.3, to be removed in 3.0. + * Use TwigDefaultEscapingStrategy instead. */ public function guessDefaultEscapingStrategy($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/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/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/HttpFoundation/Session/Flash/FlashBag.php b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php index b8a62bb07fc8f..bbe7561be7c7c 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -169,7 +169,7 @@ 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 */ diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php b/src/Symfony/Component/HttpFoundation/Session/Storage/Handler/LegacyPdoSessionHandler.php index 6f89f38077596..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. * @@ -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/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/RouterListener.php b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php index 10ed27cd7bd6c..a116e55e8894b 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -86,7 +86,7 @@ public function __construct($matcher, RequestContext $context = null, LoggerInte * * @param Request|null $request A Request instance * - * @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) { diff --git a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php index 408ce07e3f9d9..14c1a752c9465 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -55,7 +55,8 @@ public function __construct($associative = false, $depth = 512) * * @return int * - * @deprecated since version 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 */ diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php index f80072956eeed..76345bed694b2 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -33,7 +33,8 @@ public function __construct($bitmask = 0) * * @return int * - * @deprecated since version 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 */ diff --git a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php index 18d27a554b2e0..1f7a1fb0e3301 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -41,7 +41,7 @@ public function __construct(JsonEncode $encodingImpl = null, JsonDecode $decodin * * @return int * - * @deprecated since version 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() { @@ -55,7 +55,7 @@ public function getLastEncodingError() * * @return int * - * @deprecated since version 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() { diff --git a/src/Symfony/Component/Validator/Constraints/GroupSequence.php b/src/Symfony/Component/Validator/Constraints/GroupSequence.php index 9a3cad2581d2d..52d75394313a8 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -103,7 +103,7 @@ public function __construct(array $groups) * * @see \IteratorAggregate::getIterator() * - * @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 getIterator() { @@ -121,7 +121,7 @@ public function getIterator() * * @return bool Whether the offset exists * - * @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 offsetExists($offset) { @@ -141,7 +141,7 @@ public function offsetExists($offset) * * @throws OutOfBoundsException If the object does not exist * - * @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 offsetGet($offset) { @@ -165,7 +165,7 @@ public function offsetGet($offset) * @param int $offset The offset * @param string $value The group name * - * @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 offsetSet($offset, $value) { @@ -187,7 +187,7 @@ public function offsetSet($offset, $value) * * @param int $offset The offset * - * @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 offsetUnset($offset) { @@ -203,7 +203,7 @@ public function offsetUnset($offset) * * @return int The number of groups * - * @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 count() { diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php index 9b225636e2a09..9ca93bc8fdf07 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Validator\Context; -trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory is deprecated since version 2.5 and will be removed in 3.0.'); +trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory 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\MetadataFactoryInterface; diff --git a/src/Symfony/Component/Validator/ExecutionContext.php b/src/Symfony/Component/Validator/ExecutionContext.php index 2469c389eb0e3..d21dd780f1c06 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -23,7 +23,7 @@ * @author Fabien Potencier * @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\ExecutionContext} instead. */ class ExecutionContext implements ExecutionContextInterface diff --git a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php index 72e0cec99cb01..ab945f0c30572 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -373,7 +373,7 @@ public function mergeConstraints(ClassMetadata $source) * * @param MemberMetadata $metadata * - * @deprecated since version 2.6, to be in 3.0. + * @deprecated since version 2.6, to be removed in 3.0. */ protected function addMemberMetadata(MemberMetadata $metadata) { From fd47c07253353a3918c06b5d4d9e10de385f1453 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Sun, 4 Jan 2015 01:21:40 +0100 Subject: [PATCH 12/13] Fixed some deprecations according to @stof feedbacks. --- src/Symfony/Bridge/Monolog/Logger.php | 8 ++++---- .../Command/RouterApacheDumperCommand.php | 4 +++- src/Symfony/Bundle/TwigBundle/TwigEngine.php | 4 ++++ src/Symfony/Component/Debug/DebugClassLoader.php | 2 +- .../Component/Validator/Context/ExecutionContext.php | 10 ---------- .../Validator/Context/LegacyExecutionContext.php | 2 -- .../Context/LegacyExecutionContextFactory.php | 2 -- .../Component/Validator/Mapping/GenericMetadata.php | 2 -- 8 files changed, 12 insertions(+), 22 deletions(-) diff --git a/src/Symfony/Bridge/Monolog/Logger.php b/src/Symfony/Bridge/Monolog/Logger.php index 260b266fe3fdf..264835d88a9d3 100644 --- a/src/Symfony/Bridge/Monolog/Logger.php +++ b/src/Symfony/Bridge/Monolog/Logger.php @@ -27,7 +27,7 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface */ public function emerg($message, array $context = array()) { - trigger_error('The '.__METHOD__.' method of the Monolog Logger was removed. Use the emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); return parent::addRecord(BaseLogger::EMERGENCY, $message, $context); } @@ -37,7 +37,7 @@ public function emerg($message, array $context = array()) */ public function crit($message, array $context = array()) { - trigger_error('The '.__METHOD__.' method of the Monolog Logger was removed. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); return parent::addRecord(BaseLogger::CRITICAL, $message, $context); } @@ -47,7 +47,7 @@ public function crit($message, array $context = array()) */ public function err($message, array $context = array()) { - trigger_error('The '.__METHOD__.' method of the Monolog Logger was removed. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); return parent::addRecord(BaseLogger::ERROR, $message, $context); } @@ -57,7 +57,7 @@ public function err($message, array $context = array()) */ public function warn($message, array $context = array()) { - trigger_error('The '.__METHOD__.' method of the Monolog Logger was removed. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED); return parent::addRecord(BaseLogger::WARNING, $message, $context); } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php index 4e4ccf68c73b1..0b9cc1541fe7c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -74,7 +74,9 @@ protected function configure() */ protected function execute(InputInterface $input, OutputInterface $output) { - trigger_error('The router:dump-apache command is deprecated since version 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/TwigBundle/TwigEngine.php b/src/Symfony/Bundle/TwigBundle/TwigEngine.php index 493d70dae22e8..4d41e388f3e72 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigEngine.php +++ b/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -47,6 +47,8 @@ public function __construct(\Twig_Environment $environment, TemplateNameParserIn */ public function setDefaultEscapingStrategy($strategy) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 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); } @@ -56,6 +58,8 @@ public function setDefaultEscapingStrategy($strategy) */ public function guessDefaultEscapingStrategy($filename) { + trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 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/Debug/DebugClassLoader.php b/src/Symfony/Component/Debug/DebugClassLoader.php index 143fab91ae603..eb751bf9cd02e 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -44,7 +44,7 @@ public function __construct($classLoader) $this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile'); if ($this->wasFinder) { - trigger_error('Since version 2.5, passing an object in the $classLoader argument of the '.__METHOD__.' is deprecated and support for it will be removed in 3.0.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method will no longer support receiving an object into its $classLoader argument in 3.0.', E_USER_DEPRECATED); $this->classLoader = array($classLoader, 'loadClass'); $this->isFinder = true; } else { diff --git a/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/Symfony/Component/Validator/Context/ExecutionContext.php index 9c5e6d639f0f0..47528b0e153df 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -289,8 +289,6 @@ public function getGroup() public function getClassName() { if ($this->metadata instanceof ClassBasedInterface) { - trigger_error('The Symfony\Component\Validator\ClassBasedInterface interface is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - return $this->metadata->getClassName(); } @@ -318,8 +316,6 @@ public function getPropertyPath($subPath = '') */ public function addViolationAt($subPath, $message, array $parameters = array(), $invalidValue = null, $plural = null, $code = null) { - trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::buildViolation method instead.', E_USER_DEPRECATED); - throw new BadMethodCallException( 'addViolationAt() is not supported anymore as of Symfony 2.5. '. 'Please use buildViolation() instead or enable the legacy mode.' @@ -331,8 +327,6 @@ public function addViolationAt($subPath, $message, array $parameters = array(), */ public function validate($value, $subPath = '', $groups = null, $traverse = false, $deep = false) { - trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator method together with Symfony\Component\Validator\Validator\ValidatorInterface::inContext method 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.' @@ -344,8 +338,6 @@ public function validate($value, $subPath = '', $groups = null, $traverse = fals */ public function validateValue($value, $constraints, $subPath = '', $groups = null) { - trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0. Use the '.__CLASS__.'::getValidator method together with Symfony\Component\Validator\Validator\ValidatorInterface::inContext method 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.' @@ -357,8 +349,6 @@ 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 '.__CLASS__.'::getValidator method together with Symfony\Component\Validator\Validator\ValidatorInterface::getMetadataFor or Symfony\Component\Validator\Validator\ValidatorInterface::hasMetadataFor method instead.', E_USER_DEPRECATED); - throw new BadMethodCallException( 'getMetadataFactory() is not supported anymore as of Symfony 2.5. '. 'Please use getValidator() in combination with getMetadataFor() '. diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php index 274be01db1534..8ce6bdb304b4f 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContext.php @@ -41,8 +41,6 @@ class LegacyExecutionContext extends ExecutionContext */ public function __construct(ValidatorInterface $validator, $root, MetadataFactoryInterface $metadataFactory, TranslatorInterface $translator, $translationDomain = null) { - trigger_error('The '.__CLASS__.' class is deprecated since version 2.5 and will be removed in 3.0. Use the new Symfony\Component\Validator\Context\ExecutionContext class instead.', E_USER_DEPRECATED); - parent::__construct( $validator, $root, diff --git a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php index 9ca93bc8fdf07..c24c1fad3d6eb 100644 --- a/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php +++ b/src/Symfony/Component/Validator/Context/LegacyExecutionContextFactory.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Validator\Context; -trigger_error('The '.__NAMESPACE__.'\LegacyExecutionContextFactory 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\MetadataFactoryInterface; use Symfony\Component\Validator\Validator\ValidatorInterface; diff --git a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php index 44fed359816b5..cc0e54d3619e8 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -239,8 +239,6 @@ public function getTraversalStrategy() */ public function accept(ValidationVisitorInterface $visitor, $value, $group, $propertyPath) { - trigger_error('The '.__METHOD__.' is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED); - throw new BadMethodCallException('Not supported.'); } } From f9fbb4f55ea288dff028e5608dee735d0a9cefd6 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Sun, 4 Jan 2015 13:37:24 +0100 Subject: [PATCH 13/13] Fixes more deprecation notices as per @stof review. --- .../Bundle/TwigBundle/Extension/ActionsExtension.php | 6 ++---- src/Symfony/Bundle/TwigBundle/TwigEngine.php | 8 ++++---- .../Component/Form/Util/InheritDataAwareIterator.php | 6 ------ .../Component/Form/Util/VirtualFormAwareIterator.php | 6 +++--- .../Component/Validator/Context/ExecutionContext.php | 8 +------- .../Component/Validator/ExecutionContextInterface.php | 4 +--- src/Symfony/Component/Yaml/Yaml.php | 4 +--- 7 files changed, 12 insertions(+), 30 deletions(-) diff --git a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php index 09a4c93f254b1..9209a60db2d95 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php +++ b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php @@ -11,8 +11,6 @@ namespace Symfony\Bundle\TwigBundle\Extension; -trigger_error('The '.__NAMESPACE__.'\ActionsExtension class is deprecated since version 2.2 and will be removed in Symfony 3.0.', E_USER_DEPRECATED); - use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpKernel\Fragment\FragmentHandler; @@ -31,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/TwigEngine.php b/src/Symfony/Bundle/TwigBundle/TwigEngine.php index 4d41e388f3e72..9aeb630c476ac 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigEngine.php +++ b/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -42,23 +42,23 @@ public function __construct(\Twig_Environment $environment, TemplateNameParserIn } /** - * @deprecated since version 2.3, to be removed in 3.0. + * @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.3 and will be removed in 3.0. Inject the escaping strategy in the Twig_Environment object instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Inject the escaping strategy in the Twig_Environment object instead.', E_USER_DEPRECATED); $this->environment->getExtension('escaper')->setDefaultStrategy($strategy); } /** - * @deprecated since version 2.3, to be removed in 3.0. + * @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.3 and will be removed in 3.0. Use the Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy::guess method instead.', E_USER_DEPRECATED); + trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy::guess method instead.', E_USER_DEPRECATED); return TwigDefaultEscapingStrategy::guess($filename); } diff --git a/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php b/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php index 652c00b5a6d99..ba157b7d182f4 100644 --- a/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php +++ b/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php @@ -25,10 +25,4 @@ */ class InheritDataAwareIterator extends VirtualFormAwareIterator { - public function __construct(\Traversable $iterator) - { - // Do not trigger deprecation notice in parent construct method - // when using this class instead of the deprecated parent one. - parent::__construct($iterator, false); - } } diff --git a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php index dd893935bb152..3e5965e596e44 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -25,15 +25,15 @@ */ class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator { - public function __construct(\Traversable $iterator, $triggerDeprecationNotice = true) + 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 ($triggerDeprecationNotice) { + 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); } diff --git a/src/Symfony/Component/Validator/Context/ExecutionContext.php b/src/Symfony/Component/Validator/Context/ExecutionContext.php index 47528b0e153df..0079d23272bb3 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -187,8 +187,6 @@ public function addViolation($message, array $parameters = array(), $invalidValu // API, as they are not present in the new interface anymore. // You should use buildViolation() instead. 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); - throw new BadMethodCallException( 'The parameters $invalidValue, $plural and $code are '. 'not supported anymore as of Symfony 2.5. Please use '. @@ -288,11 +286,7 @@ public function getGroup() */ public function getClassName() { - if ($this->metadata instanceof ClassBasedInterface) { - return $this->metadata->getClassName(); - } - - return null; + return $this->metadata instanceof ClassBasedInterface ? $this->metadata->getClassName() : null; } /** diff --git a/src/Symfony/Component/Validator/ExecutionContextInterface.php b/src/Symfony/Component/Validator/ExecutionContextInterface.php index 1d35580c4df79..3fedfe15de02f 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -99,9 +99,7 @@ interface ExecutionContextInterface * * @api * - * @deprecated since version 2.5. - * The parameters $invalidValue, $plural and $code will be removed - * in 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); diff --git a/src/Symfony/Component/Yaml/Yaml.php b/src/Symfony/Component/Yaml/Yaml.php index c9bb7934037aa..c9295b094bb0a 100644 --- a/src/Symfony/Component/Yaml/Yaml.php +++ b/src/Symfony/Component/Yaml/Yaml.php @@ -46,9 +46,7 @@ class Yaml * * @throws ParseException If the YAML is not valid * - * @deprecated since version 2.2, to be removed in 3.0. - * The ability to pass file names to the parse() method is - * deprecated. Pass the YAML contents of the file instead. + * @deprecated The ability to pass file names to the Yaml::parse method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. * * @api */