From c5ad74d4ba123f08f3ef4055c7f7482368345dbc Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sat, 13 Dec 2014 10:50:51 +0100 Subject: [PATCH 01/23] use Table instead of the deprecated TableHelper --- UPGRADE-2.5.md | 7 ++++++ .../Console/Descriptor/Descriptor.php | 25 +++++++++++++------ .../Console/Descriptor/TextDescriptor.php | 14 +++++------ .../Bundle/FrameworkBundle/composer.json | 2 +- 4 files changed, 33 insertions(+), 15 deletions(-) diff --git a/UPGRADE-2.5.md b/UPGRADE-2.5.md index 14323cc883..a9431f85fa 100644 --- a/UPGRADE-2.5.md +++ b/UPGRADE-2.5.md @@ -1,6 +1,13 @@ UPGRADE FROM 2.4 to 2.5 ======================= +FrameworkBundle +--------------- + +* The `Symfony\Bundle\FrameworkBundle\Console\Descriptor\Descriptor::renderTable()` + method expects the table to be an instance of `Symfony\Component\Console\Helper\Table` + instead of `Symfony\Component\Console\Helper\TableHelper`. + Routing ------- diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php index 7aaea0b9c3..35087e476d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php @@ -12,7 +12,7 @@ namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; use Symfony\Component\Console\Descriptor\DescriptorInterface; -use Symfony\Component\Console\Helper\TableHelper; +use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; @@ -71,6 +71,16 @@ abstract class Descriptor implements DescriptorInterface } } + /** + * Returns the output. + * + * @return OutputInterface The output + */ + protected function getOutput() + { + return $this->output; + } + /** * Writes content to output. * @@ -85,17 +95,18 @@ abstract class Descriptor implements DescriptorInterface /** * Writes content to output. * - * @param TableHelper $table - * @param bool $decorated + * @param Table $table + * @param bool $decorated */ - protected function renderTable(TableHelper $table, $decorated = false) + protected function renderTable(Table $table, $decorated = false) { if (!$decorated) { - $table->setCellRowFormat('%s'); - $table->setCellHeaderFormat('%s'); + $table->getStyle()->setCellRowFormat('%s'); + $table->getStyle()->setCellRowContentFormat('%s'); + $table->getStyle()->setCellHeaderFormat('%s'); } - $table->render($this->output); + $table->render(); } /** diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 67cb356bc3..3daa77f0ae 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -11,7 +11,7 @@ namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; -use Symfony\Component\Console\Helper\TableHelper; +use Symfony\Component\Console\Helper\Table; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Definition; @@ -31,8 +31,8 @@ class TextDescriptor extends Descriptor { $showControllers = isset($options['show_controllers']) && $options['show_controllers']; $headers = array('Name', 'Method', 'Scheme', 'Host', 'Path'); - $table = new TableHelper(); - $table->setLayout(TableHelper::LAYOUT_COMPACT); + $table = new Table($this->getOutput()); + $table->setStyle('compact'); $table->setHeaders($showControllers ? array_merge($headers, array('Controller')) : $headers); foreach ($routes->all() as $name => $route) { @@ -99,8 +99,8 @@ class TextDescriptor extends Descriptor */ protected function describeContainerParameters(ParameterBag $parameters, array $options = array()) { - $table = new TableHelper(); - $table->setLayout(TableHelper::LAYOUT_COMPACT); + $table = new Table($this->getOutput()); + $table->setStyle('compact'); $table->setHeaders(array('Parameter', 'Value')); foreach ($this->sortParameters($parameters) as $parameter => $value) { @@ -200,8 +200,8 @@ class TextDescriptor extends Descriptor $tagsCount = count($maxTags); $tagsNames = array_keys($maxTags); - $table = new TableHelper(); - $table->setLayout(TableHelper::LAYOUT_COMPACT); + $table = new Table($this->getOutput()); + $table->setStyle('compact'); $table->setHeaders(array_merge(array('Service ID'), $tagsNames, array('Scope', 'Class name'))); foreach ($this->sortServiceIds($serviceIds) as $serviceId) { diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index e6a3b644a8..ce8eccf59e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -33,7 +33,7 @@ }, "require-dev": { "symfony/browser-kit": "~2.4", - "symfony/console": "~2.4,>=2.4.8", + "symfony/console": "~2.5,>=2.5.2", "symfony/css-selector": "~2.0,>=2.0.5", "symfony/dom-crawler": "~2.0,>=2.0.5", "symfony/finder": "~2.0,>=2.0.5", From 01f7a3a9fc2728bb32b741f309f3098f43e60705 Mon Sep 17 00:00:00 2001 From: Christophe Coevoet Date: Sat, 3 Jan 2015 12:15:23 +0100 Subject: [PATCH 02/23] Improve the composer root version setting on Travis The previous implementation was setting dev-master in all branches. This was working fine only because the dev-master branch alias was never updated in maintenance branches, and so dev-master was aliased as 2.3.x-dev in the 2.3 branch. --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index fb1f213fa6..f7ed380669 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,13 +32,14 @@ before_install: - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi; - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php -i; fi; - sudo locale-gen fr_FR.UTF-8 && sudo update-locale -# - if [ "$TRAVIS_PHP_VERSION" != "5.3.3" ]; then phpunit --self-update; fi; + # Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built + - if [ "$TRAVIS_BRANCH" = "master ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi; install: - - if [ "$components" = "no" ]; then COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev install; fi; + - if [ "$components" = "no" ]; then composer --prefer-source --dev install; fi; script: - if [ "$components" = "no" ]; then ls -d src/Symfony/*/* | parallel --gnu --keep-order 'echo -e "\\nRunning {} tests"; phpunit --exclude-group tty,benchmark,intl-data {} || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; - if [ "$components" = "no" ]; then echo -e "\\nRunning tests requiring tty"; phpunit --group tty || (echo -e "\\e[41mKO\\e[0m tty group" && $(exit 1)); fi; - - if [ "$components" = "high" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; - - if [ "$components" = "low" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; COMPOSER_ROOT_VERSION=dev-master composer --prefer-source --dev --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; + - if [ "$components" = "high" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --dev update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; + - if [ "$components" = "low" ]; then find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist | sed 's#\(.*\)/.*#\1#' | parallel --gnu --keep-order -j25% 'echo -e "\\nRunning {} tests"; cd {}; composer --prefer-source --dev --prefer-lowest --prefer-stable update; phpunit --exclude-group tty,benchmark,intl-data || (echo -e "\\e[41mKO\\e[0m {}" && $(exit 1));'; fi; From 665825b038eb257dbedce74c1ef1040c2fa4fada Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Sun, 4 Jan 2015 15:17:53 +0100 Subject: [PATCH 03/23] add missing param names to @param annotation --- src/Symfony/Component/Process/ProcessBuilder.php | 2 +- src/Symfony/Component/Security/Core/Util/ClassUtils.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Process/ProcessBuilder.php b/src/Symfony/Component/Process/ProcessBuilder.php index 6f3ed8a931..402e17eb83 100644 --- a/src/Symfony/Component/Process/ProcessBuilder.php +++ b/src/Symfony/Component/Process/ProcessBuilder.php @@ -166,7 +166,7 @@ class ProcessBuilder * * To disable the timeout, set this value to null. * - * @param float|null + * @param float|null $timeout * * @return ProcessBuilder * diff --git a/src/Symfony/Component/Security/Core/Util/ClassUtils.php b/src/Symfony/Component/Security/Core/Util/ClassUtils.php index 6107c40fa6..6c8709668f 100644 --- a/src/Symfony/Component/Security/Core/Util/ClassUtils.php +++ b/src/Symfony/Component/Security/Core/Util/ClassUtils.php @@ -48,7 +48,7 @@ class ClassUtils /** * Gets the real class name of a class name that could be a proxy. * - * @param string|object + * @param string|object $object * * @return string */ From 7e929ab16238d7d0e52cfb6467bc5357fda8bce5 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 4 Jan 2015 16:10:38 +0100 Subject: [PATCH 04/23] [2.3] missing cleanup for legacy test --- ...TokenParserTest.php => LegacyRenderTokenParserTest.php} | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) rename src/Symfony/Bundle/TwigBundle/Tests/TokenParser/{RenderTokenParserTest.php => LegacyRenderTokenParserTest.php} (91%) diff --git a/src/Symfony/Bundle/TwigBundle/Tests/TokenParser/RenderTokenParserTest.php b/src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php similarity index 91% rename from src/Symfony/Bundle/TwigBundle/Tests/TokenParser/RenderTokenParserTest.php rename to src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php index 55ebcd2566..3e415abf3e 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/TokenParser/RenderTokenParserTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/TokenParser/LegacyRenderTokenParserTest.php @@ -15,8 +15,13 @@ use Symfony\Bundle\TwigBundle\Tests\TestCase; use Symfony\Bundle\TwigBundle\TokenParser\RenderTokenParser; use Symfony\Bundle\TwigBundle\Node\RenderNode; -class RenderTokenParserTest extends TestCase +class LegacyRenderTokenParserTest extends TestCase { + public function setUp() + { + $this->iniSet('error_reporting', -1 & ~E_USER_DEPRECATED); + } + /** * @dataProvider getTestsForRender */ From 0cb17f3dd2b5e1a8e372621312214bf4f162cff6 Mon Sep 17 00:00:00 2001 From: cmfcmf Date: Sun, 4 Jan 2015 19:14:50 +0100 Subject: [PATCH 05/23] Escape annotations in comments, refs #13089. --- src/Symfony/Component/HttpKernel/Kernel.php | 30 ++----------------- .../Component/HttpKernel/KernelInterface.php | 8 +++-- 2 files changed, 7 insertions(+), 31 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/Kernel.php b/src/Symfony/Component/HttpKernel/Kernel.php index 04ea9ab56b..b7a8292644 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -242,35 +242,9 @@ abstract class Kernel implements KernelInterface, TerminableInterface } /** - * Returns the file path for a given resource. + * {@inheritDoc} * - * A Resource can be a file or a directory. - * - * The resource name must follow the following pattern: - * - * @/path/to/a/file.something - * - * where BundleName is the name of the bundle - * and the remaining part is the relative path in the bundle. - * - * If $dir is passed, and the first segment of the path is "Resources", - * this method will look for a file named: - * - * $dir//path/without/Resources - * - * before looking in the bundle resource folder. - * - * @param string $name A resource name to locate - * @param string $dir A directory where to look for the resource first - * @param bool $first Whether to return the first path or paths for all matching bundles - * - * @return string|array The absolute path of the resource or an array if $first is false - * - * @throws \InvalidArgumentException if the file cannot be found or the name is not valid - * @throws \RuntimeException if the name contains invalid/unsafe - * @throws \RuntimeException if a custom resource is hidden by a resource in a derived bundle - * - * @api + * @throws \RuntimeException if a custom resource is hidden by a resource in a derived bundle */ public function locateResource($name, $dir = null, $first = true) { diff --git a/src/Symfony/Component/HttpKernel/KernelInterface.php b/src/Symfony/Component/HttpKernel/KernelInterface.php index 006a0fe31a..44c6f5be47 100644 --- a/src/Symfony/Component/HttpKernel/KernelInterface.php +++ b/src/Symfony/Component/HttpKernel/KernelInterface.php @@ -101,15 +101,17 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * The resource name must follow the following pattern: * - * @BundleName/path/to/a/file.something + * "@BundleName/path/to/a/file.something" * * where BundleName is the name of the bundle * and the remaining part is the relative path in the bundle. * - * If $dir is passed, and the first segment of the path is Resources, + * If $dir is passed, and the first segment of the path is "Resources", * this method will look for a file named: * - * $dir/BundleName/path/without/Resources + * $dir//path/without/Resources + * + * before looking in the bundle resource folder. * * @param string $name A resource name to locate * @param string $dir A directory where to look for the resource first From f7d489ef61bfadbb242601e3469be5142f60d70c Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 5 Jan 2015 15:38:29 +0100 Subject: [PATCH 06/23] fixed typo --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index f7ed380669..ec9bf6da4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,15 +2,15 @@ language: php matrix: include: - - php: 5.3.3 - env: components=low - - php: 5.6 - env: components=high - php: 5.3.3 - php: 5.3 - php: 5.4 - php: 5.5 - php: 5.6 + - php: 5.3.3 + env: components=low + - php: 5.6 + env: components=high - php: hhvm-nightly allow_failures: - php: hhvm-nightly @@ -33,7 +33,7 @@ before_install: - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php -i; fi; - sudo locale-gen fr_FR.UTF-8 && sudo update-locale # Set the COMPOSER_ROOT_VERSION to the right version according to the branch being built - - if [ "$TRAVIS_BRANCH" = "master ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi; + - if [ "$TRAVIS_BRANCH" = "master" ]; then export COMPOSER_ROOT_VERSION=dev-master; else export COMPOSER_ROOT_VERSION="$TRAVIS_BRANCH".x-dev; fi; install: - if [ "$components" = "no" ]; then composer --prefer-source --dev install; fi; From 86b9f6b0c6a94a0b9a9233a58c909f1f09cae142 Mon Sep 17 00:00:00 2001 From: Hugo Hamon Date: Sun, 21 Dec 2014 12:39:54 +0100 Subject: [PATCH 07/23] 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 1b1731554e..3ea0bac65a 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -300,6 +300,8 @@ class EntityChoiceList extends ObjectChoiceList */ 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 @@ class EntityChoiceList extends ObjectChoiceList */ 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 e506352d16..ce084faa6e 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 23af86453f..260b266fe3 100644 --- a/src/Symfony/Bridge/Monolog/Logger.php +++ b/src/Symfony/Bridge/Monolog/Logger.php @@ -23,41 +23,41 @@ use Symfony\Component\HttpKernel\Log\DebugLoggerInterface; 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 e0eff7c4ea..0d4cf87539 100644 --- a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php +++ b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php @@ -304,6 +304,8 @@ class ModelChoiceList extends ObjectChoiceList */ 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 @@ class ModelChoiceList extends ObjectChoiceList */ 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 0114b354d8..ee76d86723 100644 --- a/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php +++ b/src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php @@ -14,8 +14,7 @@ namespace Symfony\Bridge\Twig\Node; /** * @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 79cd7870f0..69cb9df9ec 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -74,7 +74,7 @@ EOF */ 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 538e908901..89cf9cbf2f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -273,7 +273,7 @@ class Controller extends ContainerAware */ 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 9354a54980..506e3d0823 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php @@ -116,7 +116,7 @@ class Configuration implements ConfigurationInterface ->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 ff2d5edc4b..0015b1d35f 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 3d2ae2be91..c31d2baef0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -42,6 +42,8 @@ class GlobalVariables */ 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 0d7fec1dd1..297b2884f6 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 46bbf9d321..b23a26fe22 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 bda4ddf3a3..e49fd8654b 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Configuration.php @@ -61,7 +61,7 @@ class Configuration implements ConfigurationInterface ->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 845012c876..c801fe251e 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 4a3bba7392..474b6c9721 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 05d8dd20d4..3e382fe0c8 100644 --- a/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php +++ b/src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/TwigExtensionTest.php @@ -57,7 +57,7 @@ class TwigExtensionTest extends TestCase $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 897919b20a..1f974daa57 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 63cc58af73..31f6c4c588 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 7fe336d8fb..089aecc6ed 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 833eb6d543..fe27de5ae4 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -628,6 +628,8 @@ class Application */ 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 @@ class Application */ 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 0302cb1753..5ab3c7e1e5 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -609,6 +609,8 @@ class Command */ 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 @@ class Command */ 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 893664e412..ae1fdae882 100644 --- a/src/Symfony/Component/Console/Helper/ProgressBar.php +++ b/src/Symfony/Component/Console/Helper/ProgressBar.php @@ -171,12 +171,14 @@ class ProgressBar /** * 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 @@ class ProgressBar /** * 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 @@ class ProgressBar */ 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 d1ab241ac0..98b9f80910 100644 --- a/src/Symfony/Component/Console/Helper/ProgressHelper.php +++ b/src/Symfony/Component/Console/Helper/ProgressHelper.php @@ -20,7 +20,7 @@ use Symfony\Component\Console\Output\OutputInterface; * @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 eec3f362a3..f8dca28ab6 100644 --- a/src/Symfony/Component/Console/Helper/TableHelper.php +++ b/src/Symfony/Component/Console/Helper/TableHelper.php @@ -20,7 +20,7 @@ use Symfony\Component\Console\Output\NullOutput; * @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 48edb166c3..608b42072b 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -421,6 +421,8 @@ class InputDefinition */ 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 @@ class InputDefinition */ 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 6537e27a6b..40656b3c14 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 83affb14ba..8fd4d84b51 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 @@ class DebugClassLoader /** * 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 @@ class DebugClassLoader * * @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 48e4a2d69e..1e0574bb11 100644 --- a/src/Symfony/Component/Debug/ErrorHandler.php +++ b/src/Symfony/Component/Debug/ErrorHandler.php @@ -46,7 +46,7 @@ use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface; 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 @@ class ErrorHandler } $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 @@ class ErrorHandler * * @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 @@ class ErrorHandler * * @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 @@ class ErrorHandler * @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 @@ class ErrorHandler } /** - * @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 967e033777..378cbcc10f 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 663d6cad9e..4d764574a5 100644 --- a/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php +++ b/src/Symfony/Component/Debug/Tests/ErrorHandlerTest.php @@ -386,7 +386,7 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase ; $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 2273ee56d8..a8ad027924 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -98,7 +98,7 @@ class Definition */ 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 @@ class Definition */ 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 @@ class Definition */ 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 @@ class Definition */ 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 @@ class Definition */ 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 @@ class Definition */ 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 35d64ec0d1..f23ff69f90 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1402,12 +1402,14 @@ EOF; } /** - * @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 2e20b6cf31..9a1c845be0 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 dc39b05d52..0d26ec551d 100644 --- a/src/Symfony/Component/EventDispatcher/Event.php +++ b/src/Symfony/Component/EventDispatcher/Event.php @@ -83,6 +83,8 @@ class Event */ 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 @@ class Event */ 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 @@ class Event */ 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 @@ class Event */ 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 8cb8088f4a..1d5e789518 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -597,7 +597,7 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface */ 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 862879e75a..54175af657 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 @@ class ChoiceList implements ChoiceListInterface */ 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 cc364d998c..ab8b40f7a6 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 @@ abstract class LazyChoiceList implements ChoiceListInterface */ 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 @@ abstract class LazyChoiceList implements ChoiceListInterface */ 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 398ae3ddd1..80ae464526 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 @@ class ObjectChoiceList extends ChoiceList */ 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 8e72b04137..e69f5af53a 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 @@ class FixCheckboxInputListener implements EventSubscriberInterface */ 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 a3e27d57e3..af6eacae54 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 @@ class FixRadioInputListener implements EventSubscriberInterface */ 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 4a5a1df6af..9f946085a5 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 @@ class FixUrlProtocolListener implements EventSubscriberInterface */ 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 a14f99a985..d99b3b7002 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 @@ class MergeCollectionListener implements EventSubscriberInterface */ 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 043cc27597..849b7c9694 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 @@ class ResizeFormListener implements EventSubscriberInterface */ 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 @@ class ResizeFormListener implements EventSubscriberInterface */ 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 eaec5c163b..c866cde85f 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 @@ class TrimListener implements EventSubscriberInterface */ 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 642d60af44..bdadb5e73b 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 260134d5c0..c6d4a51ef6 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 b7db6fa4f6..cf811a0d26 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 fd9110d3b1..3083266d09 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 91e4897b5a..531a253e7b 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 c6a467eb05..ac88d65909 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 @@ class CsrfValidationListener implements EventSubscriberInterface */ 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 bb144ed65a..899552de38 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 da1a92b5e4..b47f01d7c6 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 8e05f1a9f8..beaffb8cb0 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -507,7 +507,7 @@ class Form implements \IteratorAggregate, FormInterface 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 @@ class Form implements \IteratorAggregate, FormInterface // 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 @@ class Form implements \IteratorAggregate, FormInterface */ 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 @@ class Form implements \IteratorAggregate, FormInterface */ 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 8ebfd543b9..01c4067499 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -356,7 +356,7 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ 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 @@ class FormConfigBuilder implements FormConfigBuilderInterface */ 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 35f615415e..e3f0f2dcfb 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 e9e16640d8..7c3c242c26 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 72054b9a27..f11d698286 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 d49ba78fc0..2453c810b8 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 ac412d7dc8..b8a62bb07f 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -175,6 +175,8 @@ class FlashBag implements FlashBagInterface, \IteratorAggregate */ 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 38203d4adf..d6c3a283ac 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 7e31b090c2..68b9d51981 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 02df5242bf..7c679c94e7 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 15dffb035d..386476b3c9 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 d5400b7d6e..230a949436 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 @@ use Symfony\Component\HttpKernel\KernelEvents; * @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 6380169017..64cf48ba23 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 d0a2298d1f..3309c2bef9 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/FragmentListener.php @@ -88,12 +88,14 @@ class FragmentListener implements EventSubscriberInterface } /** - * @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 bdcf4c7644..ef50e6e8fc 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -58,6 +58,8 @@ class LocaleListener implements EventSubscriberInterface */ 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 43d8d03a7f..60d15f4e54 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -77,6 +77,8 @@ class ProfilerListener implements EventSubscriberInterface */ 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 e82cde3c02..95bfc5e7f6 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -86,6 +86,8 @@ class RouterListener implements EventSubscriberInterface */ 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 332916518f..f5736ef690 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 0089012b96..912b20e93e 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 27fa7eabec..a28b292f07 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -80,6 +80,8 @@ class FragmentHandler */ 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 ad8382e552..359e4a7b91 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -79,6 +79,8 @@ class Esi implements SurrogateInterface */ 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 @@ class Esi implements SurrogateInterface */ 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 @@ class Esi implements SurrogateInterface */ 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 1bef147595..39a10a2e81 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 5388e99c9a..325f5b0937 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 83a7e4e3e9..47dbe1b87f 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -174,6 +174,8 @@ class HttpCache implements HttpKernelInterface, TerminableInterface */ 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 5f533f9587..8dd287873a 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -89,7 +89,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface $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 @@ abstract class Kernel implements KernelInterface, TerminableInterface */ 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 @@ abstract class Kernel implements KernelInterface, TerminableInterface */ 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 4681dabb1f..d6e22c7ffb 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 ec253e0213..16a7807643 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 e818c9845f..4176d2bb8e 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 2b3e0a8c25..ab2e1c0d55 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 205c4517f0..39d0608328 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 555f991b24..8b122d70ab 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 bd82cf83e6..82360172cf 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 8bc8e087ea..6f5b09e548 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 e730881c56..3ffa3672e0 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 157c51d38b..625f38240c 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 ba5fc75145..5e60ed7f4f 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 4e487d661b..d8f23dd703 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 7a43e9e92a..c4fd9af5c7 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 8bde89d28f..89bfd8f824 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 b8081e3b32..4736a2b95b 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 20dd4aece5..574f338eda 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 a3e0c0f644..cd28c7f05d 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 9b4b943fe6..278d399977 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 7247d747b0..375819bb0c 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 56fb4d14ae..e9e45642da 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 160ac2a282..d5add3bceb 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 b28f024a71..7a1f50d68b 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 447f8714d3..3b71cffe95 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 a9adae5131..3cfd594f39 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 078078ce90..8b36a64c7e 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 b7fd087c1b..aeea2a9b2b 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 ccb94d211a..df70d7b352 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 3ef259c06b..7ecae64b7e 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 @@ use Symfony\Component\Intl\Locale\Locale; * * @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 d1900692e6..bcd2f06501 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 42c3d249da..a7575f1b89 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -1015,6 +1015,8 @@ class OptionsResolver implements Options, OptionsResolverInterface */ 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 @@ class OptionsResolver implements Options, OptionsResolverInterface */ 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 @@ class OptionsResolver implements Options, OptionsResolverInterface */ 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 @@ class OptionsResolver implements Options, OptionsResolverInterface */ 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 @@ class OptionsResolver implements Options, OptionsResolverInterface */ 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 @@ class OptionsResolver implements Options, OptionsResolverInterface */ 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 @@ class OptionsResolver implements Options, OptionsResolverInterface */ 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 @@ class OptionsResolver implements Options, OptionsResolverInterface */ 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 cc177487d0..2571b35a30 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 @@ use Symfony\Component\OptionsResolver\Exception\OptionDefinitionException; * * @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 8b12cb8708..9d5f8c6abe 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1067,7 +1067,7 @@ class Process */ 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 @@ class Process */ 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 b0effd1298..705b35cd4a 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -48,7 +48,7 @@ final class PropertyAccess */ 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 90521c0be8..275531cff0 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -59,6 +59,8 @@ class Route */ 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 @@ class Route */ 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 adc435c5cd..3147843ba2 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 b03d596bbd..c09cdc1426 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 d2ddbd3932..4fbac27610 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -151,6 +151,8 @@ class Route implements \Serializable */ 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 @@ class Route implements \Serializable */ 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 165c22ada6..7edea64bed 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 @@ class SecurityContext implements SecurityContextInterface */ 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 @@ class SecurityContext implements SecurityContextInterface */ 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 @@ class SecurityContext implements SecurityContextInterface */ 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 0ad7bd3a89..0a77f00671 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 764a43d37a..3ff91d5630 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 4bb5b43dd0..408ce07e3f 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -55,12 +55,14 @@ class JsonDecode implements DecoderInterface * * @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 ff377db993..f80072956e 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -33,12 +33,14 @@ class JsonEncode implements EncoderInterface * * @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 2231dd624a..18d27a554b 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -41,10 +41,12 @@ class JsonEncoder implements EncoderInterface, DecoderInterface * * @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 @@ class JsonEncoder implements EncoderInterface, DecoderInterface * * @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 57e250532d..9b856ccbcb 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 7239ac73d2..9b492a6c65 100644 --- a/src/Symfony/Component/Templating/Loader/Loader.php +++ b/src/Symfony/Component/Templating/Loader/Loader.php @@ -50,6 +50,8 @@ abstract class Loader implements LoaderInterface */ 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 7ad2043f97..79754ef518 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -160,7 +160,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface */ 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 cc8679e099..60b631f161 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 61c994a629..acf499c999 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -65,6 +65,8 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface */ 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 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface */ 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 9ed829a76b..b509362729 100644 --- a/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/Symfony/Component/Validator/ConstraintViolation.php @@ -147,7 +147,7 @@ class ConstraintViolation implements ConstraintViolationInterface */ 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 @@ class ConstraintViolation implements ConstraintViolationInterface */ 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 312952a7fa..14d3354482 100644 --- a/src/Symfony/Component/Validator/Constraints/Callback.php +++ b/src/Symfony/Component/Validator/Constraints/Callback.php @@ -52,6 +52,7 @@ class Callback extends Constraint $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 66463e55e4..044ff17226 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 3a2e96d82a..0750f78b6e 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 72bfb16d2c..c540c699b2 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -106,6 +106,8 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable */ 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable */ 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable */ 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable */ 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable */ 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable */ 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 8a53fe7941..403ee93b3f 100644 --- a/src/Symfony/Component/Validator/Constraints/IsbnValidator.php +++ b/src/Symfony/Component/Validator/Constraints/IsbnValidator.php @@ -48,8 +48,10 @@ class IsbnValidator extends ConstraintValidator 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 0ae04e2694..b0cab848bf 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 1cff5e27da..cb520c93d4 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 @@ class Valid extends Constraint } 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 de34b1fc2c..e922a5cbc8 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 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * @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 cf5cd07e9e..e7ab3cdb3c 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 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * @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 31911b8d71..2469c389eb 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 @@ use Symfony\Component\Translation\TranslatorInterface; * @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 2da670f00f..3d789a090c 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 f07afc8345..aa783bc5b6 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 7913e15625..c49f43dc08 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 @@ namespace Symfony\Component\Validator\Mapping; * @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 893bd67a36..0e94891ed4 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 a75cfbc867..29fbedfbdd 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -133,7 +133,7 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface */ 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 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface */ 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 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface */ 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 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface */ 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 9b05edde8f..52842432c5 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 5e4566646d..9b37a4185f 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 904dcd7688..044c884a9a 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -233,11 +233,13 @@ class GenericMetadata implements MetadataInterface * * @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 a0bbe0dbf0..279372fd1a 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -82,6 +82,8 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat */ 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 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat */ 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 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat */ 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 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat */ 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 d44733b61c..44b760c1df 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 a1c8893328..c7ee454f05 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 b5c7acf806..28c47271d6 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 cc2ab4c296..4a8ffe3d1a 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 12ddd89039..b12aa1c65c 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 f2a92b0e9a..ab323a656a 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 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa */ 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 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa */ 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 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa */ 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 6ae3663f04..c5b7c5d87a 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 @@ use Symfony\Component\Validator\ValidationVisitorInterface; * * @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 2edf1386b7..0348745d75 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 a1227e9c55..79450ce496 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 6edbb7ac56..ddf2b64e93 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 63a1ddc6cd..2e98921df4 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 @@ use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; * @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 232af7dcc3..297c1bd35a 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -307,7 +307,7 @@ class ValidatorBuilder implements ValidatorBuilderInterface */ 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 a9c0a0d8fb..912da7c5cf 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 0607552cfc..a392a97ed2 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 ffddd95c7b..ad1ade4255 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 0c3ada7356..0d1a0905e4 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 @@ class Yaml // 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 08/23] 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 c6d4a51ef6..be2aca581c 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 325f5b0937..5388e99c9a 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 d6e22c7ffb..737ba4e0f6 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 2571b35a30..7e983f22f9 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 0a77f00671..0ad7bd3a89 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 9b856ccbcb..57e250532d 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 60b631f161..e63b8626d2 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 3d789a090c..706e9f16a0 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 aa783bc5b6..251e5c3402 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 c7ee454f05..b25b10d2e6 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 28c47271d6..5970b7d524 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 4a8ffe3d1a..a7cd36a12b 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 b12aa1c65c..26c05e915a 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 79450ce496..94413acd22 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 912da7c5cf..a9c0a0d8fb 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 09/23] 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 0d26ec551d..e873b24702 100644 --- a/src/Symfony/Component/EventDispatcher/Event.php +++ b/src/Symfony/Component/EventDispatcher/Event.php @@ -77,14 +77,12 @@ class Event * * @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 @@ class Event * * @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 @@ class Event * * @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 @@ class Event * * @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 60d15f4e54..c5a024d147 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -22,7 +22,7 @@ use Symfony\Component\HttpFoundation\RequestStack; 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 @@ class ProfilerListener implements EventSubscriberInterface */ 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 16a7807643..0b2bb4253c 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 @@ class NullLogger extends PsrNullLogger implements LoggerInterface /** * @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 @@ class NullLogger extends PsrNullLogger implements LoggerInterface /** * @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 @@ class NullLogger extends PsrNullLogger implements LoggerInterface /** * @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 10/23] 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 4353c0f49f..6f98ecc359 100644 --- a/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php +++ b/src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php @@ -33,7 +33,7 @@ class LegacyOptionsTest extends \PHPUnit_Framework_TestCase $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 3ff91d5630..764a43d37a 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 ab323a656a..1998c919e7 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\Tests\Fixtures\StubGlobalExecutionContext; use Symfony\Component\Validator\Validation; /** - * @since 2.5.3 + * @since 2.5.3 * * @author Bernhard Schussek */ @@ -167,13 +167,10 @@ abstract class AbstractConstraintValidatorTest extends \PHPUnit_Framework_TestCa * * @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 c5b7c5d87a..84c5a80bf2 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 11/23] 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 9c747b8abc..c00ac113d7 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 3ea0bac65a..57e57e6e25 100644 --- a/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php +++ b/src/Symfony/Bridge/Doctrine/Form/ChoiceList/EntityChoiceList.php @@ -296,7 +296,7 @@ class EntityChoiceList extends ObjectChoiceList * * @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 @@ class EntityChoiceList extends ObjectChoiceList * * @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 ce084faa6e..dae25951e4 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php +++ b/src/Symfony/Bridge/Doctrine/Tests/DoctrineOrmTestCase.php @@ -13,18 +13,19 @@ namespace Symfony\Bridge\Doctrine\Tests; trigger_error('The '.__NAMESPACE__.'\DoctrineOrmTestCase class is deprecated since version 2.4 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper class instead.', E_USER_DEPRECATED); +use Doctrine\ORM\EntityManager; use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; /** * Class DoctrineOrmTestCase. * - * @deprecated Deprecated as of Symfony 2.3, to be removed in Symfony 3.0. + * @deprecated since version 2.4, to be removed in 3.0. * Use {@link DoctrineTestHelper} instead. */ abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase { /** - * @return \Doctrine\ORM\EntityManager + * @return EntityManager */ public static function createTestEntityManager() { diff --git a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php index 0d4cf87539..b52826d9d6 100644 --- a/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php +++ b/src/Symfony/Bridge/Propel1/Form/ChoiceList/ModelChoiceList.php @@ -300,7 +300,7 @@ class ModelChoiceList extends ObjectChoiceList /** * {@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 @@ class ModelChoiceList extends ObjectChoiceList * 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 @@ class ModelChoiceList extends ObjectChoiceList /** * {@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 b638cd0ff1..e729cf8d05 100644 --- a/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php +++ b/src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php @@ -24,8 +24,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; * @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 69cb9df9ec..4e4ccf68c7 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -21,7 +21,7 @@ use Symfony\Component\Routing\RouterInterface; /** * 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 89cf9cbf2f..06e6e90756 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php +++ b/src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php @@ -267,8 +267,8 @@ class Controller extends ContainerAware * * @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 bc5a0cc82f..2c61453872 100644 --- a/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php +++ b/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php @@ -80,7 +80,7 @@ abstract class HttpCache extends BaseHttpCache * * @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 0015b1d35f..39c44e085f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Debugger.php @@ -21,7 +21,8 @@ use Psr\Log\LoggerInterface; * * @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 c31d2baef0..51fe53f2e0 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/GlobalVariables.php @@ -37,7 +37,8 @@ class GlobalVariables /** * 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 0915a068b6..7049c5d4e2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php +++ b/src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php @@ -131,8 +131,8 @@ class FormHelper extends Helper * * @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 c801fe251e..09a4c93f25 100644 --- a/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php +++ b/src/Symfony/Bundle/TwigBundle/Extension/ActionsExtension.php @@ -22,7 +22,7 @@ use Symfony\Component\HttpKernel\Fragment\FragmentHandler; * * @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 1f974daa57..351869928c 100644 --- a/src/Symfony/Component/ClassLoader/DebugClassLoader.php +++ b/src/Symfony/Component/ClassLoader/DebugClassLoader.php @@ -25,7 +25,8 @@ trigger_error('The '.__NAMESPACE__.'\DebugClassLoader class is deprecated since * * @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 31f6c4c588..781d3a29a9 100644 --- a/src/Symfony/Component/ClassLoader/UniversalClassLoader.php +++ b/src/Symfony/Component/ClassLoader/UniversalClassLoader.php @@ -60,7 +60,8 @@ trigger_error('The '.__NAMESPACE__.'\UniversalClassLoader class is deprecated si * * @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 089aecc6ed..1fd632accd 100644 --- a/src/Symfony/Component/Config/Definition/ReferenceDumper.php +++ b/src/Symfony/Component/Config/Definition/ReferenceDumper.php @@ -16,7 +16,8 @@ trigger_error('The '.__NAMESPACE__.'\ReferenceDumper class is deprecated since v 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 fe27de5ae4..0b96743f7e 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -624,7 +624,7 @@ class Application * * @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 @@ class Application * * @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 5ab3c7e1e5..b70692fc6a 100644 --- a/src/Symfony/Component/Console/Command/Command.php +++ b/src/Symfony/Component/Console/Command/Command.php @@ -605,7 +605,7 @@ class Command * * @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 @@ class Command * * @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 37d3b4df5e..e99a35ac3d 100644 --- a/src/Symfony/Component/Console/Helper/DialogHelper.php +++ b/src/Symfony/Component/Console/Helper/DialogHelper.php @@ -19,7 +19,7 @@ use Symfony\Component\Console\Formatter\OutputFormatterStyle; * * @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 98b9f80910..1f8e2bae8f 100644 --- a/src/Symfony/Component/Console/Helper/ProgressHelper.php +++ b/src/Symfony/Component/Console/Helper/ProgressHelper.php @@ -20,7 +20,8 @@ use Symfony\Component\Console\Output\OutputInterface; * @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 f8dca28ab6..06af5fad9b 100644 --- a/src/Symfony/Component/Console/Helper/TableHelper.php +++ b/src/Symfony/Component/Console/Helper/TableHelper.php @@ -20,7 +20,8 @@ use Symfony\Component\Console\Output\NullOutput; * @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 608b42072b..51d1bdd8aa 100644 --- a/src/Symfony/Component/Console/Input/InputDefinition.php +++ b/src/Symfony/Component/Console/Input/InputDefinition.php @@ -417,7 +417,7 @@ class InputDefinition * * @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 @@ class InputDefinition * * @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 8fd4d84b51..143fab91ae 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -122,7 +122,7 @@ class DebugClassLoader * * @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 a8ad027924..97cd849dda 100644 --- a/src/Symfony/Component/DependencyInjection/Definition.php +++ b/src/Symfony/Component/DependencyInjection/Definition.php @@ -94,7 +94,7 @@ class Definition * @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 @@ class Definition * @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 @@ class Definition * @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 @@ class Definition * @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 @@ class Definition * @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 @@ class Definition * @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 f23ff69f90..6e2369144e 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -1402,7 +1402,8 @@ EOF; } /** - * @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 9a1c845be0..1b318fd9e4 100644 --- a/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php +++ b/src/Symfony/Component/DependencyInjection/SimpleXMLElement.php @@ -21,7 +21,7 @@ use Symfony\Component\ExpressionLanguage\Expression; * * @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 e873b24702..e411ca8136 100644 --- a/src/Symfony/Component/EventDispatcher/Event.php +++ b/src/Symfony/Component/EventDispatcher/Event.php @@ -97,7 +97,7 @@ class Event */ 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 @@ class Event */ 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 1d5e789518..d51945a2b8 100644 --- a/src/Symfony/Component/Form/ButtonBuilder.php +++ b/src/Symfony/Component/Form/ButtonBuilder.php @@ -592,12 +592,12 @@ class ButtonBuilder implements \IteratorAggregate, FormBuilderInterface * * @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 7df837de8b..03e258ff07 100644 --- a/src/Symfony/Component/Form/Exception/AlreadyBoundException.php +++ b/src/Symfony/Component/Form/Exception/AlreadyBoundException.php @@ -16,8 +16,8 @@ trigger_error('The '.__NAMESPACE__.'\AlreadyBoundException class is deprecated s /** * 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 05929557d2..99daf7095e 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 @@ class ChoiceList implements ChoiceListInterface /** * {@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 @@ class ChoiceList implements ChoiceListInterface /** * {@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 f0d8ec44d4..8f09179a2a 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 @@ interface ChoiceListInterface * * @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 @@ interface ChoiceListInterface * * @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 ab8b40f7a6..ee136f7978 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 @@ abstract class LazyChoiceList implements ChoiceListInterface /** * {@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 @@ abstract class LazyChoiceList implements ChoiceListInterface /** * {@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 80ae464526..c7fb9ad1a8 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 @@ class ObjectChoiceList extends ChoiceList /** * {@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 7587086ea1..45159b9313 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 e69f5af53a..b201802fbc 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 @@ class FixCheckboxInputListener implements EventSubscriberInterface /** * 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 af6eacae54..c5f871756b 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 @@ class FixRadioInputListener implements EventSubscriberInterface /** * 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 9f946085a5..50e60d8287 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 @@ class FixUrlProtocolListener implements EventSubscriberInterface /** * 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 d99b3b7002..ef8dffed7b 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 @@ class MergeCollectionListener implements EventSubscriberInterface /** * 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 849b7c9694..97aba300b9 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 @@ class ResizeFormListener implements EventSubscriberInterface /** * 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 @@ class ResizeFormListener implements EventSubscriberInterface /** * 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 c866cde85f..dd64a53ece 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 @@ class TrimListener implements EventSubscriberInterface /** * 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 bdadb5e73b..b70a8e823d 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 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; * @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 be2aca581c..dd5b1fce1f 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 @@ namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; * * @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 cf811a0d26..c16cc29152 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 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; * @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 3083266d09..7747f9e1dd 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 @@ trigger_error('The '.__NAMESPACE__.'\DefaultCsrfProvider is deprecated since ver * * @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 531a253e7b..6159071352 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 @@ use Symfony\Component\HttpFoundation\Session\Session; * * @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 ac88d65909..bdc02b5ad2 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 @@ class CsrfValidationListener implements EventSubscriberInterface /** * 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 899552de38..499a4d78aa 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 @@ use Symfony\Component\HttpFoundation\Request; /** * @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 beaffb8cb0..99d25c2ef0 100644 --- a/src/Symfony/Component/Form/Form.php +++ b/src/Symfony/Component/Form/Form.php @@ -676,8 +676,8 @@ class Form implements \IteratorAggregate, FormInterface /** * 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 @@ class Form implements \IteratorAggregate, FormInterface /** * 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 @@ class Form implements \IteratorAggregate, FormInterface * * @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 01c4067499..381a9acabf 100644 --- a/src/Symfony/Component/Form/FormConfigBuilder.php +++ b/src/Symfony/Component/Form/FormConfigBuilder.php @@ -351,8 +351,8 @@ class FormConfigBuilder implements FormConfigBuilderInterface * * @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 @@ class FormConfigBuilder implements FormConfigBuilderInterface * * @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 317472c8a0..79c3baafeb 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 e3f0f2dcfb..23f873466f 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 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type; 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 7c3c242c26..0ebb90ea0c 100644 --- a/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php +++ b/src/Symfony/Component/Form/Tests/FormIntegrationTestCase.php @@ -14,7 +14,8 @@ namespace Symfony\Component\Form\Tests; 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 f11d698286..15ba930371 100644 --- a/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php +++ b/src/Symfony/Component/Form/Tests/FormPerformanceTestCase.php @@ -14,7 +14,8 @@ namespace Symfony\Component\Form\Tests; 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 2453c810b8..7f5f8cec0c 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -22,8 +22,8 @@ trigger_error('The '.__NAMESPACE__.'\VirtualFormAwareIterator class is deprecate * * @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 df31832701..6f89f38077 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 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; * @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 d6c3a283ac..577265bfa0 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php @@ -20,7 +20,7 @@ use Symfony\Component\Debug\ErrorHandler as DebugErrorHandler; * * @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 68b9d51981..6ffba89f89 100644 --- a/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php @@ -20,7 +20,7 @@ use Symfony\Component\Debug\ExceptionHandler as DebugExceptionHandler; * * @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 7c679c94e7..0a82d76525 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 64cf48ba23..9bede00564 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/EsiListener.php @@ -18,7 +18,7 @@ trigger_error('The '.__NAMESPACE__.'\EsiListener class is deprecated since versi * * @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 ef50e6e8fc..ef3911694a 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/LocaleListener.php @@ -54,7 +54,7 @@ class LocaleListener implements EventSubscriberInterface * * @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 c5a024d147..5e3961fe0c 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -80,7 +80,7 @@ class ProfilerListener implements EventSubscriberInterface } /** - * @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 95bfc5e7f6..5af7e7387f 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -82,7 +82,7 @@ class RouterListener implements EventSubscriberInterface * * @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 f5736ef690..04f927313b 100644 --- a/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php +++ b/src/Symfony/Component/HttpKernel/Exception/FatalErrorException.php @@ -18,6 +18,6 @@ trigger_error('The '.__NAMESPACE__.'\FatalErrorException class is deprecated sin * * @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 912b20e93e..70be1ec8a1 100644 --- a/src/Symfony/Component/HttpKernel/Exception/FlattenException.php +++ b/src/Symfony/Component/HttpKernel/Exception/FlattenException.php @@ -20,6 +20,6 @@ trigger_error('The '.__NAMESPACE__.'\FlattenException class is deprecated since * * @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 a28b292f07..eae715e8ac 100644 --- a/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php +++ b/src/Symfony/Component/HttpKernel/Fragment/FragmentHandler.php @@ -76,7 +76,7 @@ class FragmentHandler * * @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 359e4a7b91..952021dcf5 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/Esi.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/Esi.php @@ -75,7 +75,7 @@ class Esi implements SurrogateInterface * * @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 @@ class Esi implements SurrogateInterface * * @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 @@ class Esi implements SurrogateInterface * * @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 39a10a2e81..0d855464a3 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/EsiResponseCacheStrategy.php @@ -26,7 +26,7 @@ trigger_error('The '.__NAMESPACE__.'\EsiResponseCacheStrategy class is deprecate * * @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 47dbe1b87f..b6ccafc188 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -170,7 +170,7 @@ class HttpCache implements HttpKernelInterface, TerminableInterface * * @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 8dd287873a..480a9898fa 100644 --- a/src/Symfony/Component/HttpKernel/Kernel.php +++ b/src/Symfony/Component/HttpKernel/Kernel.php @@ -95,7 +95,7 @@ abstract class Kernel implements KernelInterface, TerminableInterface } /** - * @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 @@ abstract class Kernel implements KernelInterface, TerminableInterface * * @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 04e5bd640a..0f6b1db554 100644 --- a/src/Symfony/Component/HttpKernel/KernelInterface.php +++ b/src/Symfony/Component/HttpKernel/KernelInterface.php @@ -78,7 +78,7 @@ interface KernelInterface extends HttpKernelInterface, \Serializable * * @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 4176d2bb8e..d94d61c4e6 100644 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodArgumentNotImplementedException.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException as Ba * * @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 ab2e1c0d55..171487a10a 100644 --- a/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodArgumentValueNotImplementedException.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException * * @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 39d0608328..1ebcc4809d 100644 --- a/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/MethodNotImplementedException.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\Exception\MethodNotImplementedException as BaseMethod * * @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 8b122d70ab..885c9e56f1 100644 --- a/src/Symfony/Component/Locale/Exception/NotImplementedException.php +++ b/src/Symfony/Component/Locale/Exception/NotImplementedException.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\Exception\NotImplementedException as BaseNotImplement * * @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 82360172cf..c0c8543564 100644 --- a/src/Symfony/Component/Locale/Locale.php +++ b/src/Symfony/Component/Locale/Locale.php @@ -20,7 +20,7 @@ use Symfony\Component\Intl\Intl; * * @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 6f5b09e548..7c3b9fdc08 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/AmPmTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer as BaseAmPmT * * @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 3ffa3672e0..5368c66098 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfWeekTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer as Base * * @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 625f38240c..442085287b 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayOfYearTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer as Base * * @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 5e60ed7f4f..a85ea820ba 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/DayTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer as BaseDayTra * * @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 d8f23dd703..2c2c0d2266 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/FullTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer as BaseFullT * * @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 c4fd9af5c7..253f7274b1 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1200Transformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer as BaseH * * @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 89bfd8f824..f689c45a6e 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour1201Transformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer as BaseH * * @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 4736a2b95b..2e34f168ad 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2400Transformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2400Transformer as BaseH * * @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 574f338eda..f9cb610df6 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Hour2401Transformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\Hour2401Transformer as BaseH * * @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 cd28c7f05d..7e5df5a729 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/HourTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\HourTransformer as BaseHourT * * @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 278d399977..6768404fd9 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MinuteTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\MinuteTransformer as BaseMin * * @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 375819bb0c..351ff0e6f6 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/MonthTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\MonthTransformer as BaseMont * * @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 e9e45642da..ef09fa4bce 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/QuarterTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\QuarterTransformer as BaseQu * * @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 d5add3bceb..6afc55004d 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/SecondTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\SecondTransformer as BaseSec * * @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 7a1f50d68b..7af84f2971 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/TimeZoneTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\TimeZoneTransformer as BaseT * * @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 3b71cffe95..7b9cf155c8 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/Transformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\Transformer as BaseTransform * * @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 3cfd594f39..f733c8abf9 100644 --- a/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php +++ b/src/Symfony/Component/Locale/Stub/DateFormat/YearTransformer.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\YearTransformer as BaseYearT * * @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 8b36a64c7e..eeffde1ec2 100644 --- a/src/Symfony/Component/Locale/Stub/StubCollator.php +++ b/src/Symfony/Component/Locale/Stub/StubCollator.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\Collator\Collator; * * @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 aeea2a9b2b..4562791291 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntl.php +++ b/src/Symfony/Component/Locale/Stub/StubIntl.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\Globals\IntlGlobals; * * @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 df70d7b352..4826f27ade 100644 --- a/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubIntlDateFormatter.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; * * @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 7ecae64b7e..001bf53c00 100644 --- a/src/Symfony/Component/Locale/Stub/StubLocale.php +++ b/src/Symfony/Component/Locale/Stub/StubLocale.php @@ -21,7 +21,7 @@ use Symfony\Component\Intl\Locale\Locale; * * @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 bcd2f06501..aa4aae014d 100644 --- a/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php +++ b/src/Symfony/Component/Locale/Stub/StubNumberFormatter.php @@ -20,8 +20,8 @@ use Symfony\Component\Intl\NumberFormatter\NumberFormatter; * * @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 a7575f1b89..96f28cc348 100644 --- a/src/Symfony/Component/OptionsResolver/OptionsResolver.php +++ b/src/Symfony/Component/OptionsResolver/OptionsResolver.php @@ -1011,7 +1011,7 @@ class OptionsResolver implements Options, OptionsResolverInterface /** * 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 @@ class OptionsResolver implements Options, OptionsResolverInterface /** * 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 @@ class OptionsResolver implements Options, OptionsResolverInterface /** * 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 @@ class OptionsResolver implements Options, OptionsResolverInterface /** * 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 @@ class OptionsResolver implements Options, OptionsResolverInterface /** * 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 @@ class OptionsResolver implements Options, OptionsResolverInterface /** * 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 @@ class OptionsResolver implements Options, OptionsResolverInterface /** * 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 @@ class OptionsResolver implements Options, OptionsResolverInterface /** * 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 9d5f8c6abe..9242eb3f72 100644 --- a/src/Symfony/Component/Process/Process.php +++ b/src/Symfony/Component/Process/Process.php @@ -1062,7 +1062,8 @@ class Process * * @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 @@ class Process * * @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 705b35cd4a..91f2ec371e 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccess.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccess.php @@ -43,8 +43,8 @@ final class PropertyAccess * * @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 275531cff0..af2158250c 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -55,7 +55,7 @@ class Route } /** - * @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 @@ class Route } /** - * @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 3147843ba2..57ad67ab56 100644 --- a/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php +++ b/src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php @@ -18,7 +18,7 @@ use Symfony\Component\Routing\Exception\MethodNotAllowedException; /** * ApacheUrlMatcher matches URL based on Apache mod_rewrite matching (see ApacheMatcherDumper). * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * The performance gains are minimal and it's very hard to replicate * the behavior of PHP implementation. * diff --git a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php index c09cdc1426..a7cc485b92 100644 --- a/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php +++ b/src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php @@ -18,7 +18,7 @@ use Symfony\Component\Routing\Route; /** * Dumps a set of Apache mod_rewrite rules. * - * @deprecated Deprecated since version 2.5, to be removed in 3.0. + * @deprecated since version 2.5, to be removed in 3.0. * The performance gains are minimal and it's very hard to replicate * the behavior of PHP implementation. * diff --git a/src/Symfony/Component/Routing/Route.php b/src/Symfony/Component/Routing/Route.php index 4fbac27610..02b81b3483 100644 --- a/src/Symfony/Component/Routing/Route.php +++ b/src/Symfony/Component/Routing/Route.php @@ -147,7 +147,7 @@ class Route implements \Serializable * * @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 @@ class Route implements \Serializable * * @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 7edea64bed..7695959037 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 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; * * @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 @@ class SecurityContext implements SecurityContextInterface } /** + * @deprecated since version 2.6, to be removed in 3.0. Use TokenStorageInterface::getToken() instead. + * * {@inheritdoc} */ public function getToken() @@ -82,6 +82,8 @@ class SecurityContext implements SecurityContextInterface } /** + * @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 @@ class SecurityContext implements SecurityContextInterface } /** + * @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 9b492a6c65..2572892f28 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 @@ abstract class Loader implements LoaderInterface * * @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 79754ef518..69d765b78e 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -154,7 +154,7 @@ class Translator implements TranslatorInterface, TranslatorBagInterface * * @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 e63b8626d2..7c2eb8f0f7 100644 --- a/src/Symfony/Component/Validator/ClassBasedInterface.php +++ b/src/Symfony/Component/Validator/ClassBasedInterface.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Validator; * * @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 b509362729..7df3f3fade 100644 --- a/src/Symfony/Component/Validator/ConstraintViolation.php +++ b/src/Symfony/Component/Validator/ConstraintViolation.php @@ -142,7 +142,7 @@ class ConstraintViolation implements ConstraintViolationInterface /** * {@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 @@ class ConstraintViolation implements ConstraintViolationInterface /** * {@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 14d3354482..95dc45979a 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 044ff17226..cd9af50b9a 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection/Optional.php +++ b/src/Symfony/Component/Validator/Constraints/Collection/Optional.php @@ -21,8 +21,8 @@ use Symfony\Component\Validator\Constraints\Optional as BaseOptional; * * @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 0750f78b6e..55041020b7 100644 --- a/src/Symfony/Component/Validator/Constraints/Collection/Required.php +++ b/src/Symfony/Component/Validator/Constraints/Collection/Required.php @@ -21,8 +21,8 @@ use Symfony\Component\Validator\Constraints\Required as BaseRequired; * * @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 0000000000..46ca7ba67c --- /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 67d177f4e0..35cb82204e 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 b0cab848bf..7c469ff52e 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Validator\Constraints; 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 e7ab3cdb3c..b0fdbb176c 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 706e9f16a0..92d4230b28 100644 --- a/src/Symfony/Component/Validator/ExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/ExecutionContextInterface.php @@ -83,7 +83,7 @@ namespace Symfony\Component\Validator; * * @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 @@ interface ExecutionContextInterface * * @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 @@ interface ExecutionContextInterface * @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 @@ interface ExecutionContextInterface * 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 @@ interface ExecutionContextInterface * * @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 251e5c3402..5c646f294b 100644 --- a/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php +++ b/src/Symfony/Component/Validator/GlobalExecutionContextInterface.php @@ -27,7 +27,7 @@ namespace Symfony\Component\Validator; * * @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 c49f43dc08..ad5a980e4c 100644 --- a/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/BlackholeMetadataFactory.php @@ -20,7 +20,7 @@ use Symfony\Component\Validator\Mapping\Factory\BlackHoleMetadataFactory as Mapp * * @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 0e94891ed4..5dbe9f406a 100644 --- a/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php +++ b/src/Symfony/Component/Validator/Mapping/Cache/ApcCache.php @@ -16,8 +16,8 @@ trigger_error('The '.__NAMESPACE__.'\ApcCache class is deprecated since version 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 29fbedfbdd..72e0cec99c 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -129,7 +129,7 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface /** * {@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 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface * * @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 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface * * @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 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface * * @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 52842432c5..92cc85b2ef 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadataFactory.php @@ -20,7 +20,7 @@ use Symfony\Component\Validator\Mapping\Factory\LazyLoadingMetadataFactory; * * @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 9b37a4185f..d036dcf2f1 100644 --- a/src/Symfony/Component/Validator/Mapping/ElementMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ElementMetadata.php @@ -18,7 +18,7 @@ trigger_error('The '.__NAMESPACE__.'\ElementMetadata class is deprecated since v * * @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 279372fd1a..394fa2059f 100644 --- a/src/Symfony/Component/Validator/Mapping/MemberMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/MemberMetadata.php @@ -78,7 +78,7 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat /** * {@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 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat * * @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 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat * * @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 @@ abstract class MemberMetadata extends ElementMetadata implements PropertyMetadat * * @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 b25b10d2e6..555bea9aa2 100644 --- a/src/Symfony/Component/Validator/MetadataFactoryInterface.php +++ b/src/Symfony/Component/Validator/MetadataFactoryInterface.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Validator; * * @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 5970b7d524..2c8944903c 100644 --- a/src/Symfony/Component/Validator/MetadataInterface.php +++ b/src/Symfony/Component/Validator/MetadataInterface.php @@ -42,7 +42,7 @@ namespace Symfony\Component\Validator; * * @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 a7cd36a12b..5441be1c3d 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataContainerInterface.php @@ -16,7 +16,7 @@ namespace Symfony\Component\Validator; * * @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 26c05e915a..20af8a993b 100644 --- a/src/Symfony/Component/Validator/PropertyMetadataInterface.php +++ b/src/Symfony/Component/Validator/PropertyMetadataInterface.php @@ -24,7 +24,7 @@ namespace Symfony\Component\Validator; * * @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 0348745d75..401706cbf2 100644 --- a/src/Symfony/Component/Validator/ValidationVisitor.php +++ b/src/Symfony/Component/Validator/ValidationVisitor.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException; * * @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 94413acd22..4cd5ecda91 100644 --- a/src/Symfony/Component/Validator/ValidationVisitorInterface.php +++ b/src/Symfony/Component/Validator/ValidationVisitorInterface.php @@ -34,7 +34,7 @@ namespace Symfony\Component\Validator; * * @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 @@ interface ValidationVisitorInterface * @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 ddf2b64e93..8243f17acb 100644 --- a/src/Symfony/Component/Validator/Validator.php +++ b/src/Symfony/Component/Validator/Validator.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Exception\ValidatorException; * @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 297c1bd35a..f80435a4da 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilder.php +++ b/src/Symfony/Component/Validator/ValidatorBuilder.php @@ -303,7 +303,8 @@ class ValidatorBuilder implements ValidatorBuilderInterface /** * {@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 2fd0f9c58b..dc4f4277b4 100644 --- a/src/Symfony/Component/Validator/ValidatorBuilderInterface.php +++ b/src/Symfony/Component/Validator/ValidatorBuilderInterface.php @@ -167,7 +167,7 @@ interface ValidatorBuilderInterface * * @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 a9c0a0d8fb..7ef9e59654 100644 --- a/src/Symfony/Component/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/ValidatorInterface.php @@ -18,7 +18,7 @@ namespace Symfony\Component\Validator; * * @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 @@ interface ValidatorInterface * * @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 0d1a0905e4..c9bb793403 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 @@ class Yaml // 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 12/23] 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 5e3961fe0c..781475a992 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ProfilerListener.php @@ -53,7 +53,7 @@ class ProfilerListener implements EventSubscriberInterface // 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 5af7e7387f..10ed27cd7b 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -67,6 +67,10 @@ class RouterListener implements EventSubscriberInterface 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 @@ class RouterListener implements EventSubscriberInterface { 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 @@ class RouterListener implements EventSubscriberInterface 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 @@ class RouterListener implements EventSubscriberInterface $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 2e98921df4..cac4fa96a5 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 @@ class LegacyValidator extends RecursiveValidator implements LegacyValidatorInter 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 @@ class LegacyValidator extends RecursiveValidator implements LegacyValidatorInter 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 0000000000..3885dee7ce --- /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 13/23] [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 ba157b7d18..652c00b5a6 100644 --- a/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php +++ b/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php @@ -25,4 +25,10 @@ namespace Symfony\Component\Form\Util; */ 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 7f5f8cec0c..dd893935bb 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 @@ trigger_error('The '.__NAMESPACE__.'\VirtualFormAwareIterator class is deprecate */ 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 14/23] [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 acf499c999..7a412737bd 100644 --- a/src/Symfony/Component/Validator/ConstraintValidator.php +++ b/src/Symfony/Component/Validator/ConstraintValidator.php @@ -61,7 +61,7 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface * * @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 @@ abstract class ConstraintValidator implements ConstraintValidatorInterface * * @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 c540c699b2..9a3cad2581 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -97,12 +97,13 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable /** * 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable /** * 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable /** * 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable /** * 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable /** * 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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable /** * 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 d7f157da1c..9c5e6d639f 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -187,8 +187,10 @@ class ExecutionContext implements ExecutionContextInterface // 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 e922a5cbc8..274be01db1 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 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; * @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 @@ class LegacyExecutionContext extends ExecutionContext 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 @@ class LegacyExecutionContext extends ExecutionContext */ 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 @@ class LegacyExecutionContext extends ExecutionContext */ 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 @@ class LegacyExecutionContext extends ExecutionContext */ 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 b0fdbb176c..9b225636e2 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 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; /** * 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 92d4230b28..1d35580c4d 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 0000000000..28921e0b0b --- /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 044c884a9a..44fed35981 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -231,10 +231,11 @@ class GenericMetadata implements MetadataInterface * * 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 44b760c1df..2c26614f2a 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 401706cbf2..c7e06554b8 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 4cd5ecda91..0ab7b73667 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 @@ interface ValidationVisitorInterface * @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 cac4fa96a5..1d4153733d 100644 --- a/src/Symfony/Component/Validator/Validator/LegacyValidator.php +++ b/src/Symfony/Component/Validator/Validator/LegacyValidator.php @@ -34,8 +34,7 @@ use Symfony\Component\Validator\ValidatorInterface as LegacyValidatorInterface; * @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 @@ class LegacyValidator extends RecursiveValidator implements LegacyValidatorInter 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 @@ class LegacyValidator extends RecursiveValidator implements LegacyValidatorInter 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 7ef9e59654..d207a9c940 100644 --- a/src/Symfony/Component/Validator/ValidatorInterface.php +++ b/src/Symfony/Component/Validator/ValidatorInterface.php @@ -93,8 +93,9 @@ interface ValidatorInterface * * @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 a392a97ed2..01effe46c8 100644 --- a/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php +++ b/src/Symfony/Component/Validator/Violation/LegacyConstraintViolationBuilder.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\ExecutionContextInterface; * @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 15/23] [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 0000000000..d513269ef3 --- /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 b47f01d7c6..1f48d702e0 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 16/23] [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 7c469ff52e..e026705c04 100644 --- a/src/Symfony/Component/Validator/Constraints/UuidValidator.php +++ b/src/Symfony/Component/Validator/Constraints/UuidValidator.php @@ -13,7 +13,7 @@ namespace Symfony\Component\Validator\Constraints; 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 17/23] 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 297b2884f6..4aba0c202f 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 b23a26fe22..3558b9ce04 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 324cd34fc9..493d70dae2 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigEngine.php +++ b/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -42,8 +42,8 @@ class TwigEngine extends BaseEngine implements EngineInterface } /** - * @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 @@ class TwigEngine extends BaseEngine implements EngineInterface } /** - * @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 65b7b10b23..dd95413caf 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 @@ namespace Symfony\Component\ClassLoader; * * @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 211af2eff4..64660a8768 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 40d847c178..2a102dbbf4 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 c75f17edff..2af0859792 100644 --- a/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php +++ b/src/Symfony/Component/Debug/FatalErrorHandler/ClassNotFoundFatalErrorHandler.php @@ -101,7 +101,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface 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 b8a62bb07f..bbe7561be7 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php +++ b/src/Symfony/Component/HttpFoundation/Session/Flash/FlashBag.php @@ -169,7 +169,7 @@ class FlashBag implements FlashBagInterface, \IteratorAggregate /** * 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 6f89f38077..fd0c58275d 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 @@ class LegacyPdoSessionHandler implements \SessionHandlerInterface 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 5b0ec0ec50..46c298e1b8 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php @@ -116,7 +116,7 @@ class ExceptionListener implements EventSubscriberInterface '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 10ed27cd7b..a116e55e88 100644 --- a/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php +++ b/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php @@ -86,7 +86,7 @@ class RouterListener implements EventSubscriberInterface * * @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 408ce07e3f..14c1a752c9 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonDecode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonDecode.php @@ -55,7 +55,8 @@ class JsonDecode implements DecoderInterface * * @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 f80072956e..76345bed69 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncode.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncode.php @@ -33,7 +33,8 @@ class JsonEncode implements EncoderInterface * * @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 18d27a554b..1f7a1fb0e3 100644 --- a/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php +++ b/src/Symfony/Component/Serializer/Encoder/JsonEncoder.php @@ -41,7 +41,7 @@ class JsonEncoder implements EncoderInterface, DecoderInterface * * @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 @@ class JsonEncoder implements EncoderInterface, DecoderInterface * * @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 9a3cad2581..52d7539431 100644 --- a/src/Symfony/Component/Validator/Constraints/GroupSequence.php +++ b/src/Symfony/Component/Validator/Constraints/GroupSequence.php @@ -103,7 +103,7 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable * * @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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable * * @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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable * * @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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable * @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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable * * @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 @@ class GroupSequence implements \ArrayAccess, \IteratorAggregate, \Countable * * @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 9b225636e2..9ca93bc8fd 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 2469c389eb..d21dd780f1 100644 --- a/src/Symfony/Component/Validator/ExecutionContext.php +++ b/src/Symfony/Component/Validator/ExecutionContext.php @@ -23,7 +23,7 @@ use Symfony\Component\Translation\TranslatorInterface; * @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 72e0cec99c..ab945f0c30 100644 --- a/src/Symfony/Component/Validator/Mapping/ClassMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/ClassMetadata.php @@ -373,7 +373,7 @@ class ClassMetadata extends ElementMetadata implements ClassMetadataInterface * * @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 18/23] 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 260b266fe3..264835d88a 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 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface */ 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 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface */ 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 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface */ 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 4e4ccf68c7..0b9cc1541f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -74,7 +74,9 @@ EOF */ 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 493d70dae2..4d41e388f3 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigEngine.php +++ b/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -47,6 +47,8 @@ class TwigEngine extends BaseEngine implements EngineInterface */ 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 @@ class TwigEngine extends BaseEngine implements EngineInterface */ 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 143fab91ae..eb751bf9cd 100644 --- a/src/Symfony/Component/Debug/DebugClassLoader.php +++ b/src/Symfony/Component/Debug/DebugClassLoader.php @@ -44,7 +44,7 @@ class DebugClassLoader $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 9c5e6d639f..47528b0e15 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -289,8 +289,6 @@ class ExecutionContext implements ExecutionContextInterface 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 274be01db1..8ce6bdb304 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 9ca93bc8fd..c24c1fad3d 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 44fed35981..cc0e54d361 100644 --- a/src/Symfony/Component/Validator/Mapping/GenericMetadata.php +++ b/src/Symfony/Component/Validator/Mapping/GenericMetadata.php @@ -239,8 +239,6 @@ class GenericMetadata implements MetadataInterface */ 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 19/23] 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 09a4c93f25..9209a60db2 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 4d41e388f3..9aeb630c47 100644 --- a/src/Symfony/Bundle/TwigBundle/TwigEngine.php +++ b/src/Symfony/Bundle/TwigBundle/TwigEngine.php @@ -42,23 +42,23 @@ class TwigEngine extends BaseEngine implements EngineInterface } /** - * @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 652c00b5a6..ba157b7d18 100644 --- a/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php +++ b/src/Symfony/Component/Form/Util/InheritDataAwareIterator.php @@ -25,10 +25,4 @@ namespace Symfony\Component\Form\Util; */ 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 dd893935bb..3e5965e596 100644 --- a/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php +++ b/src/Symfony/Component/Form/Util/VirtualFormAwareIterator.php @@ -25,15 +25,15 @@ namespace Symfony\Component\Form\Util; */ 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 47528b0e15..0079d23272 100644 --- a/src/Symfony/Component/Validator/Context/ExecutionContext.php +++ b/src/Symfony/Component/Validator/Context/ExecutionContext.php @@ -187,8 +187,6 @@ class ExecutionContext implements ExecutionContextInterface // 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 @@ class ExecutionContext implements ExecutionContextInterface */ 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 1d35580c4d..3fedfe15de 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 c9bb793403..c9295b094b 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 */ From 064799a146f1a31676b654bf7a43c6c998dc74cb Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Mon, 5 Jan 2015 20:37:56 +0100 Subject: [PATCH 20/23] [2.3] fix failing test --- .../ChoiceList/UnloadedEntityChoiceListSingleIntIdTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleIntIdTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleIntIdTest.php index a876878415..3fdb978666 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleIntIdTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/ChoiceList/UnloadedEntityChoiceListSingleIntIdTest.php @@ -20,4 +20,9 @@ class UnloadedEntityChoiceListSingleIntIdTest extends AbstractEntityChoiceListSi { $this->markTestSkipped('Non-existing values are not detected for unloaded choice lists.'); } + + public function testLegacyGetIndicesForValuesIgnoresNonExistingValues() + { + $this->markTestSkipped('Non-existing values are not detected for unloaded choice lists.'); + } } From 0bcb59414e80bf911ad962c49aca6114b7a54370 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 5 Jan 2015 21:07:55 +0100 Subject: [PATCH 21/23] use Table instead of the deprecated TableHelper --- .../Console/Descriptor/TextDescriptor.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index 4a391b4333..f01cb5aec5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -304,27 +304,29 @@ class TextDescriptor extends Descriptor $registeredListeners = $eventDispatcher->getListeners($event); if (null !== $event) { $this->writeText("\n"); - $table = new TableHelper(); + $table = new Table($this->getOutput()); + $table->getStyle()->setCellHeaderFormat('%s'); $table->setHeaders(array('Order', 'Callable')); foreach ($registeredListeners as $order => $listener) { $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener))); } - $this->renderTable($table); + $this->renderTable($table, true); } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { $this->writeText(sprintf("\n[Event] %s\n", $eventListened), $options); - $table = new TableHelper(); + $table = new Table($this->getOutput()); + $table->getStyle()->setCellHeaderFormat('%s'); $table->setHeaders(array('Order', 'Callable')); foreach ($eventListeners as $order => $eventListener) { $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener))); } - $this->renderTable($table); + $this->renderTable($table, true); } } } From c81be5b6891c424d8a9ca132ca11ffc3cfee0452 Mon Sep 17 00:00:00 2001 From: Javier Spagnoletti Date: Mon, 5 Jan 2015 22:14:08 -0300 Subject: [PATCH 22/23] Spanish translation for the ```checkDNS``` option introduced in #12956. | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Doc PR | none --- .../Validator/Resources/translations/validators.es.xlf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf index 7193e5357b..f0824bb2ec 100644 --- a/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf +++ b/src/Symfony/Component/Validator/Resources/translations/validators.es.xlf @@ -302,6 +302,10 @@ An empty file is not allowed. No está permitido un archivo vacío. + + The host could not be resolved. + No se puede resolver el host. + From 08a5b5ac5afe6317c8142400e378d5c7dc190771 Mon Sep 17 00:00:00 2001 From: Saro0h Date: Fri, 2 Jan 2015 00:49:09 +0100 Subject: [PATCH 23/23] [FrameworkBundle] Removed the use of TableHelper --- .../Console/Descriptor/TextDescriptor.php | 11 ++++++----- .../Tests/Fixtures/Descriptor/alias_1.md | 2 +- .../Tests/Fixtures/Descriptor/alias_2.md | 2 +- .../Tests/Fixtures/Descriptor/builder_1_public.md | 2 +- .../Tests/Fixtures/Descriptor/builder_1_public.txt | 2 +- .../Tests/Fixtures/Descriptor/builder_1_services.md | 2 +- .../Tests/Fixtures/Descriptor/builder_1_services.txt | 3 +-- .../Tests/Fixtures/Descriptor/builder_1_tag1.txt | 2 +- .../Tests/Fixtures/Descriptor/callable_1.md | 1 + .../Tests/Fixtures/Descriptor/callable_1.txt | 2 +- .../Tests/Fixtures/Descriptor/callable_2.md | 1 + .../Tests/Fixtures/Descriptor/callable_2.txt | 2 +- .../Tests/Fixtures/Descriptor/callable_3.md | 1 + .../Tests/Fixtures/Descriptor/callable_3.txt | 2 +- .../Tests/Fixtures/Descriptor/callable_4.md | 1 + .../Tests/Fixtures/Descriptor/callable_4.txt | 2 +- .../Tests/Fixtures/Descriptor/callable_5.md | 1 + .../Tests/Fixtures/Descriptor/callable_5.txt | 2 +- .../Tests/Fixtures/Descriptor/callable_6.md | 1 + .../Tests/Fixtures/Descriptor/callable_6.txt | 2 +- .../Tests/Fixtures/Descriptor/callable_7.md | 2 +- .../Tests/Fixtures/Descriptor/callable_7.txt | 2 +- .../Tests/Fixtures/Descriptor/definition_1.md | 2 +- .../Tests/Fixtures/Descriptor/definition_2.md | 2 +- .../Tests/Fixtures/Descriptor/parameter.md | 2 +- .../Tests/Fixtures/Descriptor/parameter.txt | 2 +- .../Tests/Fixtures/Descriptor/parameters_1.md | 2 +- .../Tests/Fixtures/Descriptor/parameters_1.txt | 3 +-- .../Tests/Fixtures/Descriptor/route_1.md | 2 +- .../Tests/Fixtures/Descriptor/route_1.txt | 2 +- .../Tests/Fixtures/Descriptor/route_2.md | 2 +- .../Tests/Fixtures/Descriptor/route_2.txt | 2 +- .../Tests/Fixtures/Descriptor/route_collection_1.md | 1 + .../Tests/Fixtures/Descriptor/route_collection_1.txt | 3 +-- src/Symfony/Bundle/FrameworkBundle/composer.json | 2 +- 35 files changed, 40 insertions(+), 35 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php index abc0913b39..f0c18db66a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php +++ b/src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php @@ -59,7 +59,7 @@ class TextDescriptor extends Descriptor } $this->writeText($this->formatSection('router', 'Current routes')."\n", $options); - $this->renderTable($table, !(isset($options['raw_output']) && $options['raw_output'])); + $table->render(); } /** @@ -109,7 +109,7 @@ class TextDescriptor extends Descriptor } $this->writeText($this->formatSection('container', 'List of parameters')."\n", $options); - $this->renderTable($table, !(isset($options['raw_output']) && $options['raw_output'])); + $table->render(); } /** @@ -232,7 +232,7 @@ class TextDescriptor extends Descriptor } } - $this->renderTable($table); + $table->render(); } /** @@ -302,6 +302,7 @@ class TextDescriptor extends Descriptor $this->writeText($this->formatSection('event_dispatcher', $label)."\n", $options); $registeredListeners = $eventDispatcher->getListeners($event); + if (null !== $event) { $this->writeText("\n"); $table = new Table($this->getOutput()); @@ -312,7 +313,7 @@ class TextDescriptor extends Descriptor $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($listener))); } - $this->renderTable($table, true); + $table->render(); } else { ksort($registeredListeners); foreach ($registeredListeners as $eventListened => $eventListeners) { @@ -326,7 +327,7 @@ class TextDescriptor extends Descriptor $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener))); } - $this->renderTable($table, true); + $table->render(); } } } diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.md index ec63107b93..3220d5f139 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_1.md @@ -1,2 +1,2 @@ - Service: `service_1` -- Public: yes +- Public: yes \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.md index f2a46087c1..73a4101d8b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/alias_2.md @@ -1,2 +1,2 @@ - Service: `service_2` -- Public: no +- Public: no \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md index 196757b13b..044eade656 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.md @@ -32,4 +32,4 @@ alias_2 Services -------- -- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder` +- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder` \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt index b6debca225..5fdbdfd439 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt @@ -1,5 +1,5 @@ [container] Public services - Service ID Class name + Service ID  Class name  alias_1 alias for "service_1" alias_2 alias for "service_2" definition_1 Full\Qualified\Class1 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md index 33cb0a93a7..b4d2025acd 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.md @@ -47,4 +47,4 @@ alias_2 Services -------- -- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder` +- `service_container`: `Symfony\Component\DependencyInjection\ContainerBuilder` \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt index e203d5a90f..662664fc97 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt @@ -1,8 +1,7 @@ [container] Public and private services - Service ID Class name + Service ID  Class name  alias_1 alias for "service_1" alias_2 alias for "service_2" definition_1 Full\Qualified\Class1 definition_2 Full\Qualified\Class2 service_container Symfony\Component\DependencyInjection\ContainerBuilder - diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt index da12899f94..b506c5c922 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt @@ -1,4 +1,4 @@ [container] Public and private services with tag tag1 - Service ID attr1 attr2 attr3 Class name + Service ID  attr1 attr2 attr3 Class name  definition_2 val1 val2 Full\Qualified\Class2 " val3 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.md index 0c3e1dd6f2..9cf31352e3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.md @@ -1,2 +1,3 @@ + - Type: `function` - Name: `array_key_exists` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.txt index 92ac06e2f6..09901c3c40 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_1.txt @@ -1 +1 @@ -array_key_exists() +array_key_exists() \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md index cef6d81ed1..c041ee8ea6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.md @@ -1,3 +1,4 @@ + - Type: `function` - Name: `staticMethod` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.txt index e58a2ba59a..5e3101e1bc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_2.txt @@ -1 +1 @@ -Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod() +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod() \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.md index 8b260e7074..3b61c0da2e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.md @@ -1,3 +1,4 @@ + - Type: `function` - Name: `method` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.txt index e2f79511ee..dde0dbba2e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_3.txt @@ -1 +1 @@ -Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::method() +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::method() \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.md index cef6d81ed1..c041ee8ea6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.md @@ -1,3 +1,4 @@ + - Type: `function` - Name: `staticMethod` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.txt index e58a2ba59a..5e3101e1bc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_4.txt @@ -1 +1 @@ -Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod() +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::staticMethod() \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md index 9fd61c39ac..fc69e9bafc 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.md @@ -1,3 +1,4 @@ + - Type: `function` - Name: `staticMethod` - Class: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.txt index 1c48ebc471..1c06a7e9a5 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_5.txt @@ -1 +1 @@ -Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass::parent::staticMethod() +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\ExtendedCallableClass::parent::staticMethod() \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.md index 0fb5bdb107..474a9ddc24 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.md @@ -1 +1,2 @@ + - Type: `closure` diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.txt index 56996feb78..9b030ab791 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_6.txt @@ -1 +1 @@ -\Closure() +\Closure() \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.md index b6a236ce7b..c9ad7af95d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.md @@ -1,3 +1,3 @@ + - Type: `object` - Name: `Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass` - diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.txt index 66274dc2cd..78ef6a6527 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/callable_7.txt @@ -1 +1 @@ -Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() +Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor\CallableClass::__invoke() \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md index 49005b12a4..3f85a7c305 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_1.md @@ -1,4 +1,4 @@ - Class: `Full\Qualified\Class1` - Scope: `container` - Public: yes -- Synthetic: no +- Synthetic: no \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md index 521b496e07..dad1c7f470 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/definition_2.md @@ -8,4 +8,4 @@ - Attr2: val2 - Tag: `tag1` - Attr3: val3 -- Tag: `tag2` +- Tag: `tag2` \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.md index 4c67978f68..239e98d6aa 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.md @@ -1,4 +1,4 @@ database_name ============= -symfony +symfony \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt index a143508391..6bc5995f62 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameter.txt @@ -1 +1 @@ -symfony +symfony \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.md index 2dfe5d640b..c1eb4dc90f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.md @@ -4,4 +4,4 @@ Container parameters - `array`: `[12,"Hello world!",true]` - `boolean`: `true` - `integer`: `12` -- `string`: `Hello world!` +- `string`: `Hello world!` \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt index 1c9a2739ca..8a1b02c178 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt @@ -1,7 +1,6 @@ [container] List of parameters - Parameter Value + Parameter Value  array [12,"Hello world!",true] boolean true integer 12 string Hello world! - \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.md index 4ac00a8929..269bd11a66 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.md @@ -6,4 +6,4 @@ - Defaults: - `name`: Joseph - Requirements: - - `name`: [a-z]+ \ No newline at end of file + - `name`: [a-z]+ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt index 2552c1ed88..54bf11b4eb 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_1.txt @@ -9,4 +9,4 @@ opt1: val1 opt2: val2 Path-Regex #^/hello(?:/(?P[a-z]+))?$#s -Host-Regex #^localhost$#s \ No newline at end of file +Host-Regex #^localhost$#s diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.md index c19d75f4f3..494f3223a2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.md @@ -4,4 +4,4 @@ - Method: PUT|POST - Class: Symfony\Component\Routing\Route - Defaults: NONE -- Requirements: NONE \ No newline at end of file +- Requirements: NONE diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt index 99119b6cc4..70eca6c7e4 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_2.txt @@ -9,4 +9,4 @@ opt1: val1 opt2: val2 Path-Regex #^/name/add$#s -Host-Regex #^localhost$#s \ No newline at end of file +Host-Regex #^localhost$#s diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md index a148c23210..981adc208c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.md @@ -22,3 +22,4 @@ route_2 - Class: Symfony\Component\Routing\Route - Defaults: NONE - Requirements: NONE + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt index e0ade43e2a..31c796685b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt @@ -1,5 +1,4 @@ [router] Current routes - Name Method Scheme Host Path + Name  Method  Scheme  Host  Path  route_1 GET|HEAD http|https localhost /hello/{name} route_2 PUT|POST http|https localhost /name/add - \ No newline at end of file diff --git a/src/Symfony/Bundle/FrameworkBundle/composer.json b/src/Symfony/Bundle/FrameworkBundle/composer.json index 005d2909da..0845fda2a3 100644 --- a/src/Symfony/Bundle/FrameworkBundle/composer.json +++ b/src/Symfony/Bundle/FrameworkBundle/composer.json @@ -33,7 +33,7 @@ }, "require-dev": { "symfony/browser-kit": "~2.4|~3.0.0", - "symfony/console": "~2.5|~3.0.0", + "symfony/console": "~2.6|~3.0.0", "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", "symfony/finder": "~2.0,>=2.0.5|~3.0.0",