Merge branch '2.7'

* 2.7: (23 commits)
  [FrameworkBundle] Removed the use of TableHelper
  Spanish translation for the ```checkDNS``` option introduced in #12956.
  use Table instead of the deprecated TableHelper
  [2.3] fix failing test
  Fixes more deprecation notices as per @stof review.
  Fixed some deprecations according to @stof feedbacks.
  Normalizes deprecation notice messages.
  [Validator] fixes UuidValidator deprecated class namespace.
  [Form] adds more deprecation notices.
  [Validator] adds more deprecation notices.
  [Form] Adds a way to trigger deprecation notice on demand for VirtualFormAwareIterator class.
  Fixes more deprecation notices.
  Normalized @deprecated annotations.
  Removed deprecation notices from test files.
  Fixes deprecation notices.
  Reverted trigger_error() function calls on deprecated interfaces to prevent breaking third party projects implementing them.
  Adds deprecation notices for structures to be removed in 3.0.
  fixed typo
  Escape annotations in comments, refs #13089.
  [2.3] missing cleanup for legacy test
  ...

Conflicts:
	.travis.yml
	src/Symfony/Bridge/Monolog/Logger.php
	src/Symfony/Bridge/Swiftmailer/DataCollector/MessageDataCollector.php
	src/Symfony/Bridge/Twig/Node/FormEnctypeNode.php
	src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php
	src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/Descriptor.php
	src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
	src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
	src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php
	src/Symfony/Bundle/FrameworkBundle/Templating/Helper/FormHelper.php
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_public.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_services.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/builder_1_tag1.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/parameters_1.txt
	src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Descriptor/route_collection_1.txt
	src/Symfony/Bundle/FrameworkBundle/composer.json
	src/Symfony/Component/Config/Definition/ReferenceDumper.php
	src/Symfony/Component/Console/Helper/DialogHelper.php
	src/Symfony/Component/Console/Helper/ProgressHelper.php
	src/Symfony/Component/Console/Helper/TableHelper.php
	src/Symfony/Component/Form/Deprecated/FormEvents.php
	src/Symfony/Component/Form/Extension/HttpFoundation/EventListener/BindRequestListener.php
	src/Symfony/Component/Form/FormEvents.php
	src/Symfony/Component/HttpKernel/Debug/ErrorHandler.php
	src/Symfony/Component/HttpKernel/Debug/ExceptionHandler.php
	src/Symfony/Component/HttpKernel/Kernel.php
	src/Symfony/Component/HttpKernel/KernelInterface.php
	src/Symfony/Component/OptionsResolver/Tests/LegacyOptionsTest.php
	src/Symfony/Component/Process/Process.php
	src/Symfony/Component/Routing/Matcher/ApacheUrlMatcher.php
	src/Symfony/Component/Routing/Matcher/Dumper/ApacheMatcherDumper.php
	src/Symfony/Component/Yaml/Yaml.php
This commit is contained in:
Fabien Potencier 2015-01-06 11:39:25 +01:00
commit 481a0149cb
172 changed files with 874 additions and 474 deletions

View File

@ -3,11 +3,11 @@ language: php
matrix: matrix:
include: include:
- php: 5.5.9 - php: 5.5.9
- php: 5.5
- php: 5.6
env: components=low env: components=low
- php: 5.6 - php: 5.6
env: components=high env: components=high
- php: 5.5
- php: 5.6
- php: hhvm-nightly - php: hhvm-nightly
allow_failures: allow_failures:
- php: hhvm-nightly - php: hhvm-nightly
@ -29,13 +29,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 echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;
- if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php -i; fi; - if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then php -i; fi;
- sudo locale-gen fr_FR.UTF-8 && sudo update-locale - 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: 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: 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 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" = "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" = "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_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" = "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;

View File

@ -1,6 +1,13 @@
UPGRADE FROM 2.4 to 2.5 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 Routing
------- -------

View File

@ -1,6 +1,11 @@
CHANGELOG CHANGELOG
========= =========
2.4.0
-----
* deprecated DoctrineOrmTestCase class
2.2.0 2.2.0
----- -----

View File

@ -296,10 +296,12 @@ class EntityChoiceList extends ObjectChoiceList
* *
* @see ChoiceListInterface * @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) 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 // Performance optimization
if (empty($entities)) { if (empty($entities)) {
return array(); return array();
@ -338,10 +340,12 @@ class EntityChoiceList extends ObjectChoiceList
* *
* @see ChoiceListInterface * @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) 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 // Performance optimization
if (empty($values)) { if (empty($values)) {
return array(); return array();

View File

@ -11,18 +11,21 @@
namespace Symfony\Bridge\Doctrine\Tests; namespace Symfony\Bridge\Doctrine\Tests;
trigger_error('The '.__NAMESPACE__.'\DoctrineOrmTestCase class is deprecated since version 2.4 and will be removed in 3.0. Use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper class instead.', E_USER_DEPRECATED);
use Doctrine\ORM\EntityManager;
use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper; use Symfony\Bridge\Doctrine\Test\DoctrineTestHelper;
/** /**
* Class DoctrineOrmTestCase. * 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. * Use {@link DoctrineTestHelper} instead.
*/ */
abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase abstract class DoctrineOrmTestCase extends \PHPUnit_Framework_TestCase
{ {
/** /**
* @return \Doctrine\ORM\EntityManager * @return EntityManager
*/ */
public static function createTestEntityManager() public static function createTestEntityManager()
{ {

View File

@ -24,41 +24,41 @@ class Logger extends BaseLogger implements LoggerInterface, DebugLoggerInterface
{ {
/** /**
* @see Symfony\Component\HttpKernel\Log\DebugLoggerInterface * @see Symfony\Component\HttpKernel\Log\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()) public function emerg($message, array $context = array())
{ {
trigger_error('The emerg() method of the Monolog Logger was removed. You should use the new method emergency() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the emergency() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
return parent::addRecord(BaseLogger::EMERGENCY, $message, $context); 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()) public function crit($message, array $context = array())
{ {
trigger_error('The crit() method of the Monolog Logger was removed. You should use the new method critical() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the method critical() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
return parent::addRecord(BaseLogger::CRITICAL, $message, $context); 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()) public function err($message, array $context = array())
{ {
trigger_error('The err() method of the Monolog Logger was removed. You should use the new method error() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the error() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
return parent::addRecord(BaseLogger::ERROR, $message, $context); 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()) public function warn($message, array $context = array())
{ {
trigger_error('The warn() method of the Monolog Logger was removed. You should use the new method warning() instead, which is PSR-3 compatible.', E_USER_DEPRECATED); trigger_error('The '.__METHOD__.' method inherited from the Symfony\Component\HttpKernel\Log\LoggerInterface interface is deprecated since version 2.2 and will be removed in 3.0. Use the warning() method instead, which is PSR-3 compatible.', E_USER_DEPRECATED);
return parent::addRecord(BaseLogger::WARNING, $message, $context); return parent::addRecord(BaseLogger::WARNING, $message, $context);
} }

View File

@ -300,10 +300,12 @@ class ModelChoiceList extends ObjectChoiceList
/** /**
* {@inheritdoc} * {@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) 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)) { if (empty($models)) {
return array(); return array();
} }
@ -319,7 +321,7 @@ class ModelChoiceList extends ObjectChoiceList
* but if they originated from different queries, there are not the same object within the code. * 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. * 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); $choices = $this->fixChoices($models);
foreach ($choices as $i => $givenChoice) { foreach ($choices as $i => $givenChoice) {
@ -346,10 +348,12 @@ class ModelChoiceList extends ObjectChoiceList
/** /**
* {@inheritdoc} * {@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) 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)) { if (empty($values)) {
return array(); return array();
} }

View File

@ -12,6 +12,7 @@
namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor; namespace Symfony\Bundle\FrameworkBundle\Console\Descriptor;
use Symfony\Component\Console\Descriptor\DescriptorInterface; use Symfony\Component\Console\Descriptor\DescriptorInterface;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\Alias;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\ContainerBuilder;
@ -77,6 +78,16 @@ abstract class Descriptor implements DescriptorInterface
} }
} }
/**
* Returns the output.
*
* @return OutputInterface The output
*/
protected function getOutput()
{
return $this->output;
}
/** /**
* Writes content to output. * Writes content to output.
* *

View File

@ -30,10 +30,10 @@ class TextDescriptor extends Descriptor
*/ */
protected function describeRouteCollection(RouteCollection $routes, array $options = array()) protected function describeRouteCollection(RouteCollection $routes, array $options = array())
{ {
$table = new Table($this->output);
$showControllers = isset($options['show_controllers']) && $options['show_controllers']; $showControllers = isset($options['show_controllers']) && $options['show_controllers'];
$headers = array('Name', 'Method', 'Scheme', 'Host', 'Path'); $headers = array('Name', 'Method', 'Scheme', 'Host', 'Path');
$table = new Table($this->output);
$table->setHeaders($showControllers ? array_merge($headers, array('Controller')) : $headers); $table->setHeaders($showControllers ? array_merge($headers, array('Controller')) : $headers);
foreach ($routes->all() as $name => $route) { foreach ($routes->all() as $name => $route) {
@ -322,6 +322,7 @@ class TextDescriptor extends Descriptor
foreach ($eventListeners as $order => $eventListener) { foreach ($eventListeners as $order => $eventListener) {
$table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener))); $table->addRow(array(sprintf('#%d', $order + 1), $this->formatCallable($eventListener)));
} }
$table->render(); $table->render();
} }
} }

View File

@ -116,7 +116,7 @@ class Configuration implements ConfigurationInterface
->children() ->children()
->scalarNode('field_name') ->scalarNode('field_name')
->defaultValue('_token') ->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() ->end()
->end() ->end()

View File

@ -11,6 +11,8 @@
namespace Symfony\Bundle\FrameworkBundle\Templating; namespace Symfony\Bundle\FrameworkBundle\Templating;
trigger_error('The '.__NAMESPACE__.'\Debugger class is deprecated since version 2.4 and will be removed in 3.0. Use the Psr\Log\LoggerInterface interface instead.', E_USER_DEPRECATED);
use Symfony\Component\Templating\DebuggerInterface; use Symfony\Component\Templating\DebuggerInterface;
use Psr\Log\LoggerInterface; use Psr\Log\LoggerInterface;
@ -19,7 +21,8 @@ use Psr\Log\LoggerInterface;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* *
* @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 class Debugger implements DebuggerInterface
{ {

View File

@ -37,11 +37,14 @@ class GlobalVariables
/** /**
* Returns the security context service. * 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 * @return SecurityContext|null The security context
*/ */
public function getSecurity() public function getSecurity()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0.', E_USER_DEPRECATED);
if ($this->container->has('security.context')) { if ($this->container->has('security.context')) {
return $this->container->get('security.context'); return $this->container->get('security.context');
} }

View File

@ -30,11 +30,12 @@ class RequestHelper extends Helper
* *
* @param Request|RequestStack $requestStack A RequestStack instance or a Request instance * @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) public function __construct($requestStack)
{ {
if ($requestStack instanceof Request) { if ($requestStack instanceof Request) {
trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED);
$this->request = $requestStack; $this->request = $requestStack;
} elseif ($requestStack instanceof RequestStack) { } elseif ($requestStack instanceof RequestStack) {
$this->requestStack = $requestStack; $this->requestStack = $requestStack;

View File

@ -30,11 +30,12 @@ class SessionHelper extends Helper
* *
* @param Request|RequestStack $requestStack A RequestStack instance or a Request instance * @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) public function __construct($requestStack)
{ {
if ($requestStack instanceof Request) { if ($requestStack instanceof Request) {
trigger_error('Since version 2.5, passing a Request instance into the '.__METHOD__.' is deprecated and support for it will be removed in 3.0. Inject a Symfony\Component\HttpFoundation\RequestStack instance instead.', E_USER_DEPRECATED);
$this->session = $requestStack->getSession(); $this->session = $requestStack->getSession();
} elseif ($requestStack instanceof RequestStack) { } elseif ($requestStack instanceof RequestStack) {
$this->requestStack = $requestStack; $this->requestStack = $requestStack;

View File

@ -32,19 +32,19 @@
"doctrine/annotations": "~1.0" "doctrine/annotations": "~1.0"
}, },
"require-dev": { "require-dev": {
"symfony/browser-kit": "~2.7|~3.0", "symfony/browser-kit": "~2.4|~3.0.0",
"symfony/console": "~2.7|~3.0", "symfony/console": "~2.6|~3.0.0",
"symfony/css-selector": "~2.7|~3.0", "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0",
"symfony/dom-crawler": "~2.7|~3.0", "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0",
"symfony/finder": "~2.7|~3.0", "symfony/finder": "~2.0,>=2.0.5|~3.0.0",
"symfony/intl": "~2.7|~3.0", "symfony/intl": "~2.3|~3.0.0",
"symfony/security": "~2.7|~3.0", "symfony/security": "~2.6|~3.0.0",
"symfony/form": "~2.7|~3.0", "symfony/form": "~2.6|~3.0.0",
"symfony/class-loader": "~2.7|~3.0", "symfony/class-loader": "~2.1|~3.0.0",
"symfony/expression-language": "~2.7|~3.0", "symfony/expression-language": "~2.6|~3.0.0",
"symfony/process": "~2.7|~3.0", "symfony/process": "~2.0,>=2.0.5|~3.0.0",
"symfony/validator": "~2.7|~3.0", "symfony/validator": "~2.5|~3.0.0",
"symfony/yaml": "~2.7|~3.0" "symfony/yaml": "~2.0,>=2.0.5|~3.0.0"
}, },
"suggest": { "suggest": {
"symfony/console": "For using the console commands", "symfony/console": "For using the console commands",

View File

@ -61,7 +61,7 @@ class Configuration implements ConfigurationInterface
->end() ->end()
->children() ->children()
->arrayNode('form') ->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() ->addDefaultsIfNotSet()
->fixXmlConfig('resource') ->fixXmlConfig('resource')
->children() ->children()

View File

@ -20,7 +20,7 @@ use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* *
* @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 class ActionsExtension extends \Twig_Extension
{ {
@ -29,14 +29,14 @@ class ActionsExtension extends \Twig_Extension
/** /**
* @param FragmentHandler|ContainerInterface $handler * @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) public function __construct($handler)
{ {
if ($handler instanceof FragmentHandler) { if ($handler instanceof FragmentHandler) {
$this->handler = $handler; $this->handler = $handler;
} elseif ($handler instanceof ContainerInterface) { } 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'); $this->handler = $handler->get('fragment.handler');
} else { } else {

View File

@ -9,7 +9,7 @@
<xsd:complexType name="config"> <xsd:complexType name="config">
<xsd:sequence> <xsd:sequence>
<!-- @deprecated since 2.6, to be removed in 3.0 --> <!-- @deprecated since version 2.6, to be removed in 3.0 -->
<xsd:element name="form" type="form" minOccurs="0" maxOccurs="1" /> <xsd:element name="form" type="form" minOccurs="0" maxOccurs="1" />
<xsd:element name="form-theme" type="xsd:string" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="form-theme" type="xsd:string" minOccurs="0" maxOccurs="unbounded" />
<xsd:element name="global" type="global" minOccurs="0" maxOccurs="unbounded" /> <xsd:element name="global" type="global" minOccurs="0" maxOccurs="unbounded" />

View File

@ -57,7 +57,7 @@ class TwigExtensionTest extends TestCase
$resources = $container->getParameter('twig.form.resources'); $resources = $container->getParameter('twig.form.resources');
$this->assertContains('form_div_layout.html.twig', $resources, '->load() includes default template for 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'); $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'); $this->assertContains('MyBundle::formDeprecated.html.twig', $resources, '->load() merges new templates into form resources');
// Globals // Globals

View File

@ -42,19 +42,24 @@ class TwigEngine extends BaseEngine implements EngineInterface
} }
/** /**
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Inject the escaping * @deprecated since version 2.7, to be removed in 3.0.
* strategy on Twig_Environment instead * Inject the escaping strategy on \Twig_Environment instead.
*/ */
public function setDefaultEscapingStrategy($strategy) public function setDefaultEscapingStrategy($strategy)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Inject the escaping strategy in the Twig_Environment object instead.', E_USER_DEPRECATED);
$this->environment->getExtension('escaper')->setDefaultStrategy($strategy); $this->environment->getExtension('escaper')->setDefaultStrategy($strategy);
} }
/** /**
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use TwigDefaultEscapingStrategy instead. * @deprecated since version 2.7, to be removed in 3.0.
* Use TwigDefaultEscapingStrategy instead.
*/ */
public function guessDefaultEscapingStrategy($filename) public function guessDefaultEscapingStrategy($filename)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Bundle\TwigBundle\TwigDefaultEscapingStrategy::guess method instead.', E_USER_DEPRECATED);
return TwigDefaultEscapingStrategy::guess($filename); return TwigDefaultEscapingStrategy::guess($filename);
} }

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\ClassLoader; namespace Symfony\Component\ClassLoader;
trigger_error('The '.__NAMESPACE__.'\ApcUniversalClassLoader class is deprecated since version 2.7 and will be removed in 3.0. Use the Symfony\Component\ClassLoader\ApcClassLoader class instead.', E_USER_DEPRECATED);
/** /**
* ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3. * ApcUniversalClassLoader implements a "universal" autoloader cached in APC for PHP 5.3.
* *
@ -60,7 +62,8 @@ namespace Symfony\Component\ClassLoader;
* *
* @api * @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 class ApcUniversalClassLoader extends UniversalClassLoader
{ {

View File

@ -1,11 +1,6 @@
CHANGELOG CHANGELOG
========= =========
2.7.0
-----
* The UniversalClassLoader class has been deprecated in favor of ClassLoader class
2.4.0 2.4.0
----- -----

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\ClassLoader; namespace Symfony\Component\ClassLoader;
trigger_error('The '.__NAMESPACE__.'\DebugClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED);
/** /**
* Autoloader checking if the class is really defined in the file found. * Autoloader checking if the class is really defined in the file found.
* *
@ -23,7 +25,8 @@ namespace Symfony\Component\ClassLoader;
* *
* @api * @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 class DebugClassLoader
{ {

View File

@ -11,12 +11,15 @@
namespace Symfony\Component\ClassLoader; namespace Symfony\Component\ClassLoader;
trigger_error('The '.__NAMESPACE__.'\DebugUniversalClassLoader class is deprecated since version 2.4 and will be removed in 3.0. Use the Symfony\Component\Debug\DebugClassLoader class instead.', E_USER_DEPRECATED);
/** /**
* Checks that the class is actually declared in the included file. * Checks that the class is actually declared in the included file.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* *
* @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 class DebugUniversalClassLoader extends UniversalClassLoader
{ {

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\ClassLoader; 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. * UniversalClassLoader implements a "universal" autoloader for PHP 5.3.
@ -60,7 +60,8 @@ trigger_error('The "Symfony\Component\ClassLoader\UniversalClassLoader" class wa
* *
* @api * @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 class UniversalClassLoader
{ {

View File

@ -621,10 +621,12 @@ class Application
* *
* @return string A string representing the 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) 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(); $descriptor = new TextDescriptor();
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, !$raw); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, !$raw);
$descriptor->describe($output, $this, array('namespace' => $namespace, 'raw_output' => true)); $descriptor->describe($output, $this, array('namespace' => $namespace, 'raw_output' => true));
@ -640,10 +642,12 @@ class Application
* *
* @return string|\DOMDocument An XML string representing the 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) 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(); $descriptor = new XmlDescriptor();
if ($asDom) { if ($asDom) {

View File

@ -605,10 +605,12 @@ class Command
* *
* @return string A string representing the 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() 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(); $descriptor = new TextDescriptor();
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
$descriptor->describe($output, $this, array('raw_output' => true)); $descriptor->describe($output, $this, array('raw_output' => true));
@ -623,10 +625,12 @@ class Command
* *
* @return string|\DOMDocument An XML string representing the 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) 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(); $descriptor = new XmlDescriptor();
if ($asDom) { if ($asDom) {

View File

@ -171,12 +171,14 @@ class ProgressBar
/** /**
* Gets the progress bar step. * 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 * @return int The progress bar step
*/ */
public function getStep() public function getStep()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the getProgress() method instead.', E_USER_DEPRECATED);
return $this->getProgress(); return $this->getProgress();
} }
@ -356,7 +358,7 @@ class ProgressBar
/** /**
* Sets the current progress. * 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 * @param int $step The current progress
* *
@ -364,6 +366,8 @@ class ProgressBar
*/ */
public function setCurrent($step) public function setCurrent($step)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6 and will be removed in 3.0. Use the setProgress() method instead.', E_USER_DEPRECATED);
$this->setProgress($step); $this->setProgress($step);
} }

View File

@ -417,10 +417,12 @@ class InputDefinition
* *
* @return string A string representing the 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() 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(); $descriptor = new TextDescriptor();
$output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true); $output = new BufferedOutput(BufferedOutput::VERBOSITY_NORMAL, true);
$descriptor->describe($output, $this, array('raw_output' => true)); $descriptor->describe($output, $this, array('raw_output' => true));
@ -435,10 +437,12 @@ class InputDefinition
* *
* @return string|\DOMDocument An XML string representing the 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) 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(); $descriptor = new XmlDescriptor();
if ($asDom) { if ($asDom) {

View File

@ -39,6 +39,10 @@ class StringInput extends ArgvInput
*/ */
public function __construct($input, InputDefinition $definition = null) 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); parent::__construct(array(), null);
$this->setTokens($this->tokenize($input)); $this->setTokens($this->tokenize($input));

View File

@ -35,16 +35,16 @@ class DebugClassLoader
/** /**
* Constructor. * 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 * @api
* @deprecated since 2.5, passing an object is deprecated and support for it will be removed in 3.0
*/ */
public function __construct($classLoader) public function __construct($classLoader)
{ {
$this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile'); $this->wasFinder = is_object($classLoader) && method_exists($classLoader, 'findFile');
if ($this->wasFinder) { if ($this->wasFinder) {
trigger_error('The '.__METHOD__.' method will no longer support receiving an object into its $classLoader argument in 3.0.', E_USER_DEPRECATED);
$this->classLoader = array($classLoader, 'loadClass'); $this->classLoader = array($classLoader, 'loadClass');
$this->isFinder = true; $this->isFinder = true;
} else { } else {
@ -60,9 +60,7 @@ class DebugClassLoader
/** /**
* Gets the wrapped class loader. * Gets the wrapped class loader.
* *
* @return callable|object a class loader * @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
*
* @deprecated since 2.5, returning an object is deprecated and support for it will be removed in 3.0
*/ */
public function getClassLoader() public function getClassLoader()
{ {
@ -124,10 +122,12 @@ class DebugClassLoader
* *
* @return string|null * @return string|null
* *
* @deprecated Deprecated since 2.5, to be removed in 3.0. * @deprecated since version 2.5, to be removed in 3.0.
*/ */
public function findFile($class) 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) { if ($this->wasFinder) {
return $this->classLoader[0]->findFile($class); return $this->classLoader[0]->findFile($class);
} }

View File

@ -46,7 +46,7 @@ use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface;
class ErrorHandler 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; const TYPE_DEPRECATION = -100;
@ -103,14 +103,14 @@ class ErrorHandler
/** /**
* Same init value as thrownErrors * 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; private $displayErrors = 0x1FFF;
/** /**
* Registers the error handler. * 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 * @param bool $replace Whether to replace or not any existing handler
* *
* @return self The registered error handler * @return self The registered error handler
@ -256,7 +256,7 @@ class ErrorHandler
} }
$this->reRegister($prev | $this->loggedErrors); $this->reRegister($prev | $this->loggedErrors);
// $this->displayErrors is @deprecated since 2.6 // $this->displayErrors is @deprecated since version 2.6
$this->displayErrors = $this->thrownErrors; $this->displayErrors = $this->thrownErrors;
return $prev; return $prev;
@ -572,10 +572,12 @@ class ErrorHandler
* *
* @param int|null $level The level (null to use the error_reporting() value and 0 to disable) * @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) 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; $level = null === $level ? error_reporting() : $level;
$this->throwAt($level, true); $this->throwAt($level, true);
} }
@ -585,10 +587,12 @@ class ErrorHandler
* *
* @param int $displayErrors The display_errors flag value * @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) 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) { if ($displayErrors) {
$this->throwAt($this->displayErrors, true); $this->throwAt($this->displayErrors, true);
} else { } else {
@ -604,10 +608,12 @@ class ErrorHandler
* @param LoggerInterface $logger A logger interface * @param LoggerInterface $logger A logger interface
* @param string $channel The channel associated with the logger (deprecation, emergency or scream) * @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') 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 = set_error_handler('var_dump', 0);
$handler = is_array($handler) ? $handler[0] : null; $handler = is_array($handler) ? $handler[0] : null;
restore_error_handler(); restore_error_handler();
@ -627,20 +633,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()) 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); return $this->handleError($level, $message, $file, $line, (array) $context);
} }
/** /**
* Handles PHP fatal errors. * 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() 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(); static::handleFatalError();
} }
} }

View File

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

View File

@ -101,7 +101,7 @@ class ClassNotFoundFatalErrorHandler implements FatalErrorHandlerInterface
if ($function[0] instanceof DebugClassLoader) { if ($function[0] instanceof DebugClassLoader) {
$function = $function[0]->getClassLoader(); $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)) { if (is_object($function)) {
$function = array($function); $function = array($function);
} }

View File

@ -380,7 +380,7 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase
; ;
$handler = ErrorHandler::register(E_NOTICE); $handler = ErrorHandler::register(E_NOTICE);
$handler->setLogger($logger, 'scream'); @$handler->setLogger($logger, 'scream');
unset($undefVar); unset($undefVar);
@$undefVar++; @$undefVar++;

View File

@ -94,11 +94,11 @@ class Definition
* @return Definition The current instance * @return Definition The current instance
* *
* @api * @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) 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; $this->factoryClass = $factoryClass;
@ -111,10 +111,12 @@ class Definition
* @return string|null The factory class name * @return string|null The factory class name
* *
* @api * @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() 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; return $this->factoryClass;
} }
@ -126,11 +128,11 @@ class Definition
* @return Definition The current instance * @return Definition The current instance
* *
* @api * @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) 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; $this->factoryMethod = $factoryMethod;
@ -178,10 +180,12 @@ class Definition
* @return string|null The factory method name * @return string|null The factory method name
* *
* @api * @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() 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; return $this->factoryMethod;
} }
@ -193,11 +197,11 @@ class Definition
* @return Definition The current instance * @return Definition The current instance
* *
* @api * @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) 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; $this->factoryService = $factoryService;
@ -210,10 +214,12 @@ class Definition
* @return string|null The factory service id * @return string|null The factory service id
* *
* @api * @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() 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; return $this->factoryService;
} }

View File

@ -1401,12 +1401,15 @@ EOF;
} }
/** /**
* @deprecated Deprecated since 2.6.2, to be removed in 3.0. Use Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider instead. * @deprecated since version 2.6.2, to be removed in 3.0.
* Use \Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider instead.
* *
* @param ExpressionFunctionProviderInterface $provider * @param ExpressionFunctionProviderInterface $provider
*/ */
public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider) public function addExpressionLanguageProvider(ExpressionFunctionProviderInterface $provider)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.6.2 and will be removed in 3.0. Use the Symfony\Component\DependencyInjection\ContainerBuilder::addExpressionLanguageProvider method instead.', E_USER_DEPRECATED);
$this->expressionLanguageProviders[] = $provider; $this->expressionLanguageProviders[] = $provider;
} }

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\DependencyInjection; namespace Symfony\Component\DependencyInjection;
trigger_error('The '.__NAMESPACE__.'\SimpleXMLElement method is deprecated since version 2.5 and will be removed in 3.0.', E_USER_DEPRECATED);
use Symfony\Component\Config\Util\XmlUtils; use Symfony\Component\Config\Util\XmlUtils;
use Symfony\Component\ExpressionLanguage\Expression; use Symfony\Component\ExpressionLanguage\Expression;
@ -19,7 +21,7 @@ use Symfony\Component\ExpressionLanguage\Expression;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* *
* @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 class SimpleXMLElement extends \SimpleXMLElement
{ {

View File

@ -77,7 +77,7 @@ class Event
* *
* @param EventDispatcherInterface $dispatcher * @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 * @api
*/ */
@ -91,12 +91,14 @@ class Event
* *
* @return EventDispatcherInterface * @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 * @api
*/ */
public function getDispatcher() public function getDispatcher()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event dispatcher instance can be received in the listener call instead.', E_USER_DEPRECATED);
return $this->dispatcher; return $this->dispatcher;
} }
@ -105,12 +107,14 @@ class Event
* *
* @return string * @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 * @api
*/ */
public function getName() public function getName()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0. The event name can be received in the listener call instead.', E_USER_DEPRECATED);
return $this->name; return $this->name;
} }
@ -119,7 +123,7 @@ class Event
* *
* @param string $name The event name. * @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 * @api
*/ */

View File

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

View File

@ -11,10 +11,10 @@
namespace Symfony\Component\Form\Deprecated; namespace Symfony\Component\Form\Deprecated;
trigger_error('Constants ROUND_HALFEVEN, ROUND_HALFUP and ROUND_HALFDOWN on class NumberToLocalizedStringTransformer were deprecated in Symfony 2.4 and will be removed in 3.0. Use ROUND_HALF_EVEN, ROUND_HALF_UP and ROUND_HALF_DOWN instead.', E_USER_DEPRECATED); trigger_error('Constants ROUND_HALFEVEN, ROUND_HALFUP and ROUND_HALFDOWN in class NumberToLocalizedStringTransformer are deprecated since version 2.4 and will be removed in 3.0. Use ROUND_HALF_EVEN, ROUND_HALF_UP and ROUND_HALF_DOWN instead.', E_USER_DEPRECATED);
/** /**
* @deprecated since 2.7, to be removed in 3.0. * @deprecated since version 2.7, to be removed in 3.0.
* @internal * @internal
*/ */
final class NumberToLocalizedStringTransformer final class NumberToLocalizedStringTransformer

View File

@ -11,11 +11,13 @@
namespace Symfony\Component\Form\Exception; namespace Symfony\Component\Form\Exception;
trigger_error('The '.__NAMESPACE__.'\AlreadyBoundException class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Exception\AlreadySubmittedException class instead.', E_USER_DEPRECATED);
/** /**
* Alias of {@link AlreadySubmittedException}. * Alias of {@link AlreadySubmittedException}.
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link AlreadySubmittedException} instead. * Use {@link AlreadySubmittedException} instead.
*/ */
class AlreadyBoundException extends LogicException class AlreadyBoundException extends LogicException
{ {

View File

@ -199,10 +199,12 @@ class ChoiceList implements ChoiceListInterface
/** /**
* {@inheritdoc} * {@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) 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);
$choices = $this->fixChoices($choices); $choices = $this->fixChoices($choices);
$indices = array(); $indices = array();
@ -225,10 +227,12 @@ class ChoiceList implements ChoiceListInterface
/** /**
* {@inheritdoc} * {@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) 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); $values = $this->fixValues($values);
$indices = array(); $indices = array();

View File

@ -139,7 +139,7 @@ interface ChoiceListInterface
* *
* @return array An array of indices with ascending, 0-based numeric keys * @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); public function getIndicesForChoices(array $choices);
@ -159,7 +159,7 @@ interface ChoiceListInterface
* *
* @return array An array of indices with ascending, 0-based numeric keys * @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); public function getIndicesForValues(array $values);
} }

View File

@ -106,10 +106,12 @@ abstract class LazyChoiceList implements ChoiceListInterface
/** /**
* {@inheritdoc} * {@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) 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) { if (!$this->choiceList) {
$this->load(); $this->load();
} }
@ -120,10 +122,12 @@ abstract class LazyChoiceList implements ChoiceListInterface
/** /**
* {@inheritdoc} * {@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) 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) { if (!$this->choiceList) {
$this->load(); $this->load();
} }

View File

@ -187,10 +187,12 @@ class ObjectChoiceList extends ChoiceList
/** /**
* {@inheritdoc} * {@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) 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) { if (!$this->valuePath) {
return parent::getIndicesForChoices($choices); return parent::getIndicesForChoices($choices);
} }

View File

@ -76,21 +76,21 @@ class NumberToLocalizedStringTransformer implements DataTransformerInterface
/** /**
* Alias for {@link self::ROUND_HALF_EVEN}. * 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; const ROUND_HALFEVEN = Deprecated::ROUND_HALFEVEN;
/** /**
* Alias for {@link self::ROUND_HALF_UP}. * 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; const ROUND_HALFUP = Deprecated::ROUND_HALFUP;
/** /**
* Alias for {@link self::ROUND_HALF_DOWN}. * 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; const ROUND_HALFDOWN = Deprecated::ROUND_HALFDOWN;

View File

@ -81,11 +81,13 @@ class FixCheckboxInputListener implements EventSubscriberInterface
/** /**
* Alias of {@link preSubmit()}. * Alias of {@link preSubmit()}.
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link preSubmit()} instead. * Use {@link preSubmit()} instead.
*/ */
public function preBind(FormEvent $event) public function preBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
$this->preSubmit($event); $this->preSubmit($event);
} }

View File

@ -63,11 +63,13 @@ class FixRadioInputListener implements EventSubscriberInterface
/** /**
* Alias of {@link preSubmit()}. * Alias of {@link preSubmit()}.
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link preSubmit()} instead. * Use {@link preSubmit()} instead.
*/ */
public function preBind(FormEvent $event) public function preBind(FormEvent $event)
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the preSubmit() method instead.', E_USER_DEPRECATED);
$this->preSubmit($event); $this->preSubmit($event);
} }

View File

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

View File

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

View File

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

View File

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

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; 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\Form\Exception\BadMethodCallException;
use Symfony\Component\Security\Csrf\CsrfToken; use Symfony\Component\Security\Csrf\CsrfToken;
@ -24,7 +24,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
* @since 2.4 * @since 2.4
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @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 class CsrfProviderAdapter implements CsrfTokenManagerInterface
{ {

View File

@ -11,8 +11,6 @@
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider;
trigger_error('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderInterface was deprecated in version 2.4 and will be removed in version 3.0. Please use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface instead.', E_USER_DEPRECATED);
/** /**
* Marks classes able to provide CSRF protection. * Marks classes able to provide CSRF protection.
* *
@ -29,9 +27,8 @@ trigger_error('Symfony\Component\Form\Extension\Csrf\CsrfProvider\CsrfProviderIn
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated since version 2.4, to be removed in Symfony 3.0. Use * @deprecated since version 2.4, to be removed in 3.0.
* {@link \Symfony\Component\Security\Csrf\CsrfTokenManagerInterface} * Use {@link \Symfony\Component\Security\Csrf\CsrfTokenManagerInterface} instead.
* instead.
*/ */
interface CsrfProviderInterface interface CsrfProviderInterface
{ {

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; 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\CsrfToken;
use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
@ -22,7 +22,7 @@ use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface;
* @since 2.4 * @since 2.4
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @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 class CsrfTokenManagerAdapter implements CsrfProviderInterface
{ {

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; 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. * Default implementation of CsrfProviderInterface.
@ -21,8 +21,8 @@ trigger_error('Symfony\Component\Security\Csrf\CsrfTokenManager was deprecated i
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.4, to be removed in Symfony 3.0. Use * @deprecated since version 2.4, to be removed in 3.0.
* {@link \Symfony\Component\Security\Csrf\CsrfTokenManager} in * Use {@link \Symfony\Component\Security\Csrf\CsrfTokenManager} in
* combination with {@link \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage} * combination with {@link \Symfony\Component\Security\Csrf\TokenStorage\NativeSessionTokenStorage}
* instead. * instead.
*/ */

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Form\Extension\Csrf\CsrfProvider; 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; use Symfony\Component\HttpFoundation\Session\Session;
@ -23,8 +23,8 @@ use Symfony\Component\HttpFoundation\Session\Session;
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.4, to be removed in Symfony 3.0. Use * @deprecated since version 2.4, to be removed in 3.0.
* {@link \Symfony\Component\Security\Csrf\CsrfTokenManager} in * Use {@link \Symfony\Component\Security\Csrf\CsrfTokenManager} in
* combination with {@link \Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage} * combination with {@link \Symfony\Component\Security\Csrf\TokenStorage\SessionTokenStorage}
* instead. * instead.
*/ */

View File

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

View File

@ -0,0 +1,27 @@
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* 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()
{
}
}

View File

@ -11,6 +11,7 @@
namespace Symfony\Component\Form\Extension\Validator\Constraints; namespace Symfony\Component\Form\Extension\Validator\Constraints;
use Symfony\Component\Form\Extension\Validator\Constraints\Deprecated\Form as Deprecated;
use Symfony\Component\Validator\Constraint; use Symfony\Component\Validator\Constraint;
/** /**
@ -22,10 +23,10 @@ class Form extends Constraint
const NO_SUCH_FIELD_ERROR = 2; 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.
* {@self NOT_SYNCHRONIZED_ERROR} instead. * Use {@self NOT_SYNCHRONIZED_ERROR} instead.
*/ */
const ERR_INVALID = 1; const ERR_INVALID = Deprecated::ERR_INVALID;
protected static $errorNames = array( protected static $errorNames = array(
self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR', self::NOT_SYNCHRONIZED_ERROR => 'NOT_SYNCHRONIZED_ERROR',

View File

@ -507,7 +507,7 @@ class Form implements \IteratorAggregate, FormInterface
public function submit($submittedData, $clearMissing = true) public function submit($submittedData, $clearMissing = true)
{ {
if ($submittedData instanceof Request) { if ($submittedData instanceof Request) {
trigger_error('Passing a Symfony\Component\HttpFoundation\Request object to '.__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) { if ($this->submitted) {
@ -676,15 +676,15 @@ class Form implements \IteratorAggregate, FormInterface
/** /**
* Alias of {@link submit()}. * Alias of {@link submit()}.
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link submit()} instead. * Use {@link submit()} instead.
*/ */
public function bind($submittedData) public function bind($submittedData)
{ {
// This method is deprecated for Request too, but the error is // This method is deprecated for Request too, but the error is
// triggered in Form::submit() method. // triggered in Form::submit() method.
if (!$submittedData instanceof Request) { if (!$submittedData instanceof Request) {
trigger_error(__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); return $this->submit($submittedData);
@ -719,12 +719,12 @@ class Form implements \IteratorAggregate, FormInterface
/** /**
* Alias of {@link isSubmitted()}. * Alias of {@link isSubmitted()}.
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link isSubmitted()} instead. * Use {@link isSubmitted()} instead.
*/ */
public function isBound() 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; return $this->submitted;
} }
@ -843,12 +843,12 @@ class Form implements \IteratorAggregate, FormInterface
* *
* @return string A string representation of all errors * @return string A string representation of all errors
* *
* @deprecated Deprecated since version 2.5, to be removed in 3.0. Use * @deprecated since version 2.5, to be removed in 3.0.
* {@link getErrors()} instead and cast the result to a string. * Use {@link getErrors()} instead and cast the result to a string.
*/ */
public function getErrorsAsString($level = 0) 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); return self::indent((string) $this->getErrors(true, false), $level);
} }

View File

@ -351,12 +351,12 @@ class FormConfigBuilder implements FormConfigBuilderInterface
* *
* @return FormConfigBuilder The configuration object. * @return FormConfigBuilder The configuration object.
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link getInheritData()} instead. * Use {@link getInheritData()} instead.
*/ */
public function getVirtual() 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(); return $this->getInheritData();
} }
@ -717,12 +717,12 @@ class FormConfigBuilder implements FormConfigBuilderInterface
* *
* @return FormConfigBuilder The configuration object. * @return FormConfigBuilder The configuration object.
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link setInheritData()} instead. * Use {@link setInheritData()} instead.
*/ */
public function setVirtual($inheritData) public function setVirtual($inheritData)
{ {
trigger_error('FormConfigBuilder::setVirtual() is deprecated since version 2.3 and will be removed in 3.0. Use FormConfigBuilder::setInheritData() instead.', E_USER_DEPRECATED); trigger_error('The '.__METHOD__.' method is deprecated since version 2.3 and will be removed in 3.0. Use the FormConfigBuilder::setInheritData() method instead.', E_USER_DEPRECATED);
$this->setInheritData($inheritData); $this->setInheritData($inheritData);
} }

View File

@ -14,13 +14,14 @@ namespace Symfony\Component\Form\Tests\Extension\Core\Type;
use Symfony\Component\Form\Test\TypeTestCase as BaseTypeTestCase; 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 abstract class TypeTestCase extends BaseTypeTestCase
{ {
protected function setUp() 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(); parent::setUp();
} }
} }

View File

@ -14,7 +14,8 @@ namespace Symfony\Component\Form\Tests;
use Symfony\Component\Form\Test\FormIntegrationTestCase as BaseFormIntegrationTestCase; 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 abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase
{ {
@ -23,7 +24,7 @@ abstract class FormIntegrationTestCase extends BaseFormIntegrationTestCase
*/ */
protected function setUp() 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(); parent::setUp();
} }
} }

View File

@ -14,7 +14,8 @@ namespace Symfony\Component\Form\Tests;
use Symfony\Component\Form\Test\FormPerformanceTestCase as BaseFormPerformanceTestCase; 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 abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase
{ {
@ -23,7 +24,7 @@ abstract class FormPerformanceTestCase extends BaseFormPerformanceTestCase
*/ */
protected function setUp() 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(); parent::setUp();
} }
} }

View File

@ -11,8 +11,6 @@
namespace Symfony\Component\Form\Util; namespace Symfony\Component\Form\Util;
trigger_error('Symfony\Component\Form\Util\VirtualFormAwareIterator is deprecated since Symfony 2.3 and will be removed in 3.0. Use Symfony\Component\Form\Util\InheritDataAwareIterator instead.', E_USER_DEPRECATED);
/** /**
* Iterator that traverses an array of forms. * Iterator that traverses an array of forms.
* *
@ -22,11 +20,26 @@ trigger_error('Symfony\Component\Form\Util\VirtualFormAwareIterator is deprecate
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link InheritDataAwareIterator} instead. * Use {@link InheritDataAwareIterator} instead.
*/ */
class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator class VirtualFormAwareIterator extends \IteratorIterator implements \RecursiveIterator
{ {
public function __construct(\Traversable $iterator)
{
/*
* Prevent to trigger deprecation notice when already using the
* InheritDataAwareIterator class that extends this deprecated one.
* The {@link Symfony\Component\Form\Util\InheritDataAwareIterator::__construct} method
* forces this argument to false.
*/
if (__CLASS__ === get_class($this)) {
trigger_error('The '.__CLASS__.' class is deprecated since version 2.3 and will be removed in 3.0. Use the Symfony\Component\Form\Util\InheritDataAwareIterator class instead.', E_USER_DEPRECATED);
}
parent::__construct($iterator);
}
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */

View File

@ -169,12 +169,14 @@ class FlashBag implements FlashBagInterface, \IteratorAggregate
/** /**
* Returns an iterator for flashes. * 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 * @return \ArrayIterator An \ArrayIterator instance
*/ */
public function getIterator() public function getIterator()
{ {
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be removed in 3.0.', E_USER_DEPRECATED);
return new \ArrayIterator($this->all()); return new \ArrayIterator($this->all());
} }
} }

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\HttpFoundation\Session\Storage\Handler; namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
trigger_error('The '.__NAMESPACE__.'\LegacyPdoSessionHandler class is deprecated since version 2.6 and will be removed in 3.0. Use the Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler class instead.', E_USER_DEPRECATED);
/** /**
* Session handler using a PDO connection to read and write data. * Session handler using a PDO connection to read and write data.
* *
@ -24,7 +26,7 @@ namespace Symfony\Component\HttpFoundation\Session\Storage\Handler;
* @author Michael Williams <michael.williams@funsational.com> * @author Michael Williams <michael.williams@funsational.com>
* @author Tobias Schultze <http://tobion.de> * @author Tobias Schultze <http://tobion.de>
* *
* @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. * {@link PdoSessionHandler} instead.
*/ */
class LegacyPdoSessionHandler implements \SessionHandlerInterface class LegacyPdoSessionHandler implements \SessionHandlerInterface
@ -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__)); 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; $this->pdo = $pdo;
$dbOptions = array_merge(array( $dbOptions = array_merge(array(
'db_id_col' => 'sess_id', 'db_id_col' => 'sess_id',

View File

@ -34,10 +34,11 @@ class TraceableEventDispatcher extends BaseTraceableEventDispatcher
* *
* @param Profiler|null $profiler A Profiler instance * @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) 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);
} }
/** /**

View File

@ -11,14 +11,14 @@
namespace Symfony\Component\HttpKernel\DependencyInjection; 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; use Symfony\Component\EventDispatcher\DependencyInjection\RegisterListenersPass as BaseRegisterListenersPass;
/** /**
* Compiler pass to register tagged services for an event dispatcher. * 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 class RegisterListenersPass extends BaseRegisterListenersPass
{ {

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\HttpKernel\EventListener; 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 Psr\Log\LoggerInterface;
use Symfony\Component\Debug\ErrorHandler; use Symfony\Component\Debug\ErrorHandler;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@ -22,12 +24,11 @@ use Symfony\Component\HttpKernel\KernelEvents;
* @author Colin Frei <colin@colinfrei.com> * @author Colin Frei <colin@colinfrei.com>
* @author Konstantin Myakshin <koc-dp@yandex.ru> * @author Konstantin Myakshin <koc-dp@yandex.ru>
* *
* @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 class ErrorsLoggerListener implements EventSubscriberInterface
{ {
private $channel; private $channel;
private $logger; private $logger;
public function __construct($channel, LoggerInterface $logger = null) public function __construct($channel, LoggerInterface $logger = null)

View File

@ -11,12 +11,14 @@
namespace Symfony\Component\HttpKernel\EventListener; 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. * EsiListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for ESI.
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* *
* @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 class EsiListener extends SurrogateListener
{ {

View File

@ -116,7 +116,7 @@ class ExceptionListener implements EventSubscriberInterface
'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null, 'logger' => $this->logger instanceof DebugLoggerInterface ? $this->logger : null,
// keep for BC -- as $format can be an argument of the controller callable // keep for BC -- as $format can be an argument of the controller callable
// see src/Symfony/Bundle/TwigBundle/Controller/ExceptionController.php // 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(), 'format' => $request->getRequestFormat(),
); );
$request = $request->duplicate(null, null, $attributes); $request = $request->duplicate(null, null, $attributes);

View File

@ -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[] * @return string[]
*/ */
protected function getLocalIpAddresses() 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'); return array('127.0.0.1', 'fe80::1', '::1');
} }

View File

@ -54,10 +54,12 @@ class LocaleListener implements EventSubscriberInterface
* *
* @param Request|null $request A Request instance * @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) 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) { if (null === $request) {
return; return;
} }

View File

@ -22,7 +22,7 @@ use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\EventDispatcher\EventSubscriberInterface; 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 <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
*/ */
@ -49,6 +49,13 @@ class ProfilerListener implements EventSubscriberInterface
*/ */
public function __construct(Profiler $profiler, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false, RequestStack $requestStack = null) public function __construct(Profiler $profiler, RequestMatcherInterface $matcher = null, $onlyException = false, $onlyMasterRequests = false, RequestStack $requestStack = null)
{ {
if (null === $requestStack) {
// Prevent the deprecation notice to be triggered all the time.
// The onKernelRequest() method fires some logic only when the
// RequestStack instance is not provided as a dependency.
trigger_error('Since version 2.4, the '.__METHOD__.' method must accept a RequestStack instance to get the request instead of using the '.__CLASS__.'::onKernelRequest method that will be removed in 3.0.', E_USER_DEPRECATED);
}
$this->profiler = $profiler; $this->profiler = $profiler;
$this->matcher = $matcher; $this->matcher = $matcher;
$this->onlyException = (bool) $onlyException; $this->onlyException = (bool) $onlyException;
@ -73,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) public function onKernelRequest(GetResponseEvent $event)
{ {

View File

@ -67,6 +67,10 @@ class RouterListener implements EventSubscriberInterface
throw new \InvalidArgumentException('You must either pass a RequestContext or the matcher must implement RequestContextAwareInterface.'); 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->matcher = $matcher;
$this->context = $context ?: $matcher->getContext(); $this->context = $context ?: $matcher->getContext();
$this->requestStack = $requestStack; $this->requestStack = $requestStack;
@ -82,13 +86,21 @@ class RouterListener implements EventSubscriberInterface
* *
* @param Request|null $request A Request instance * @param Request|null $request A Request instance
* *
* @deprecated Deprecated since version 2.4, to be moved to a private function in 3.0. * @deprecated since version 2.4, to be removed in 3.0.
*/ */
public function setRequest(Request $request = null) public function setRequest(Request $request = null)
{
trigger_error('The '.__METHOD__.' method is deprecated since version 2.4 and will be made private in 3.0.', E_USER_DEPRECATED);
$this->setCurrentRequest($request);
}
private function setCurrentRequest(Request $request = null)
{ {
if (null !== $request && $this->request !== $request) { if (null !== $request && $this->request !== $request) {
$this->context->fromRequest($request); $this->context->fromRequest($request);
} }
$this->request = $request; $this->request = $request;
} }
@ -98,7 +110,7 @@ class RouterListener implements EventSubscriberInterface
return; // removed when requestStack is required return; // removed when requestStack is required
} }
$this->setRequest($this->requestStack->getParentRequest()); $this->setCurrentRequest($this->requestStack->getParentRequest());
} }
public function onKernelRequest(GetResponseEvent $event) public function onKernelRequest(GetResponseEvent $event)
@ -106,11 +118,11 @@ class RouterListener implements EventSubscriberInterface
$request = $event->getRequest(); $request = $event->getRequest();
// initialize the context that is also used by the generator (assuming matcher and generator share the same context instance) // 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 // with frameworks which do not use the Symfony service container
// when we have a RequestStack, no need to do it // when we have a RequestStack, no need to do it
if (null !== $this->requestStack) { if (null !== $this->requestStack) {
$this->setRequest($request); $this->setCurrentRequest($request);
} }
if ($request->attributes->has('_controller')) { if ($request->attributes->has('_controller')) {

View File

@ -11,13 +11,13 @@
namespace Symfony\Component\HttpKernel\Exception; 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. * Fatal Error Exception.
* *
* @author Konstanton Myakshin <koc-dp@yandex.ru> * @author Konstanton Myakshin <koc-dp@yandex.ru>
* *
* @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'); class_exists('Symfony\Component\Debug\Exception\FatalErrorException');

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\HttpKernel\Exception; 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. * FlattenException wraps a PHP Exception to be able to serialize it.
@ -20,6 +20,6 @@ trigger_error('Symfony\Component\HttpKernel\Exception\FlattenException is deprec
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* *
* @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'); class_exists('Symfony\Component\Debug\Exception\FlattenException');

View File

@ -76,10 +76,12 @@ class FragmentHandler
* *
* @param Request|null $request A Request instance * @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) 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; $this->request = $request;
} }

View File

@ -75,10 +75,12 @@ class Esi implements SurrogateInterface
* *
* @return bool true if one surrogate has ESI/1.0 capability, false otherwise * @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) 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')) { if (null === $value = $request->headers->get('Surrogate-Capability')) {
return false; return false;
} }
@ -101,10 +103,12 @@ class Esi implements SurrogateInterface
* *
* @param Request $request A Request instance * @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) 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'); $current = $request->headers->get('Surrogate-Capability');
$new = 'symfony2="ESI/1.0"'; $new = 'symfony2="ESI/1.0"';
@ -144,10 +148,12 @@ class Esi implements SurrogateInterface
* *
* @return bool true if the Response needs to be parsed, false otherwise * @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) 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')) { if (!$control = $response->headers->get('Surrogate-Control')) {
return false; return false;
} }

View File

@ -15,6 +15,8 @@
namespace Symfony\Component\HttpKernel\HttpCache; 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 * EsiResponseCacheStrategy knows how to compute the Response cache HTTP header
* based on the different ESI response cache headers. * based on the different ESI response cache headers.
@ -24,7 +26,7 @@ namespace Symfony\Component\HttpKernel\HttpCache;
* *
* @author Fabien Potencier <fabien@symfony.com> * @author Fabien Potencier <fabien@symfony.com>
* *
* @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 class EsiResponseCacheStrategy extends ResponseCacheStrategy implements EsiResponseCacheStrategyInterface
{ {

View File

@ -170,10 +170,12 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
* *
* @return Esi An Esi instance * @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() 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) { 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'); throw new \LogicException('This instance of HttpCache was not set up to use ESI as surrogate handler. You must overwrite and use createSurrogate');
} }

View File

@ -215,35 +215,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. * @throws \RuntimeException if a custom resource is hidden by a resource in a derived bundle
*
* The resource name must follow the following pattern:
*
* @<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",
* this method will look for a file named:
*
* $dir/<BundleName>/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
*/ */
public function locateResource($name, $dir = null, $first = true) public function locateResource($name, $dir = null, $first = true)
{ {

View File

@ -90,15 +90,17 @@ interface KernelInterface extends HttpKernelInterface, \Serializable
* *
* The resource name must follow the following pattern: * 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 * where BundleName is the name of the bundle
* and the remaining part is the relative path in 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: * this method will look for a file named:
* *
* $dir/BundleName/path/without/Resources * $dir/<BundleName>/path/without/Resources
*
* before looking in the bundle resource folder.
* *
* @param string $name A resource name to locate * @param string $name A resource name to locate
* @param string $dir A directory where to look for the resource first * @param string $dir A directory where to look for the resource first

View File

@ -27,28 +27,28 @@ interface LoggerInterface extends PsrLogger
/** /**
* @api * @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()); public function emerg($message, array $context = array());
/** /**
* @api * @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()); public function crit($message, array $context = array());
/** /**
* @api * @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()); public function err($message, array $context = array());
/** /**
* @api * @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()); public function warn($message, array $context = array());
} }

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\HttpKernel\Log; 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; use Psr\Log\NullLogger as PsrNullLogger;
/** /**
@ -24,41 +26,33 @@ class NullLogger extends PsrNullLogger implements LoggerInterface
{ {
/** /**
* @api * @api
*
* @deprecated since 2.2, to be removed in 3.0. Use emergency() which is PSR-3 compatible.
*/ */
public function emerg($message, array $context = array()) 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 * @api
*
* @deprecated since 2.2, to be removed in 3.0. Use critical() which is PSR-3 compatible.
*/ */
public function crit($message, array $context = array()) 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 * @api
*
* @deprecated since 2.2, to be removed in 3.0. Use error() which is PSR-3 compatible.
*/ */
public function err($message, array $context = array()) 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 * @api
*
* @deprecated since 2.2, to be removed in 3.0. Use warning() which is PSR-3 compatible.
*/ */
public function warn($message, array $context = array()) 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);
} }
} }

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Exception; 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; use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException as BaseMethodArgumentNotImplementedException;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException as Ba
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException} * Use {@link \Symfony\Component\Intl\Exception\MethodArgumentNotImplementedException}
* instead. * instead.
*/ */
class MethodArgumentNotImplementedException extends BaseMethodArgumentNotImplementedException class MethodArgumentNotImplementedException extends BaseMethodArgumentNotImplementedException

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Exception; 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; use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException as BaseMethodArgumentValueNotImplementedException;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException} * Use {@link \Symfony\Component\Intl\Exception\MethodArgumentValueNotImplementedException}
* instead. * instead.
*/ */
class MethodArgumentValueNotImplementedException extends BaseMethodArgumentValueNotImplementedException class MethodArgumentValueNotImplementedException extends BaseMethodArgumentValueNotImplementedException

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Exception; 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; use Symfony\Component\Intl\Exception\MethodNotImplementedException as BaseMethodNotImplementedException;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\Exception\MethodNotImplementedException as BaseMethod
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\Exception\MethodNotImplementedException} * Use {@link \Symfony\Component\Intl\Exception\MethodNotImplementedException}
* instead. * instead.
*/ */
class MethodNotImplementedException extends BaseMethodNotImplementedException class MethodNotImplementedException extends BaseMethodNotImplementedException

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Exception; 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; use Symfony\Component\Intl\Exception\NotImplementedException as BaseNotImplementedException;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\Exception\NotImplementedException as BaseNotImplement
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\Exception\NotImplementedException} * Use {@link \Symfony\Component\Intl\Exception\NotImplementedException}
* instead. * instead.
*/ */
class NotImplementedException extends BaseNotImplementedException class NotImplementedException extends BaseNotImplementedException

View File

@ -11,7 +11,7 @@
namespace Symfony\Component\Locale; 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; use Symfony\Component\Intl\Intl;
@ -20,7 +20,7 @@ use Symfony\Component\Intl\Intl;
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @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. * Use {@link \Locale} and {@link \Symfony\Component\Intl\Intl} instead.
*/ */
class Locale extends \Locale class Locale extends \Locale

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Stub\DateFormat; 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; use Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer as BaseAmPmTransformer;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer as BaseAmPmT
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer} * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\AmPmTransformer}
* instead. * instead.
*/ */
class AmPmTransformer extends BaseAmPmTransformer class AmPmTransformer extends BaseAmPmTransformer

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Stub\DateFormat; 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; use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer as BaseDayOfWeekTransformer;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer as Base
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer} * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfWeekTransformer}
* instead. * instead.
*/ */
class DayOfWeekTransformer extends BaseDayOfWeekTransformer class DayOfWeekTransformer extends BaseDayOfWeekTransformer

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Stub\DateFormat; 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; use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer as BaseDayOfYearTransformer;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer as Base
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer} * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayOfYearTransformer}
* instead. * instead.
*/ */
class DayOfYearTransformer extends BaseDayOfYearTransformer class DayOfYearTransformer extends BaseDayOfYearTransformer

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Stub\DateFormat; 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; use Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer as BaseDayTransformer;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer as BaseDayTra
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer} * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\DayTransformer}
* instead. * instead.
*/ */
class DayTransformer extends BaseDayTransformer class DayTransformer extends BaseDayTransformer

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Stub\DateFormat; 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; use Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer as BaseFullTransformer;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer as BaseFullT
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer} * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\FullTransformer}
* instead. * instead.
*/ */
class FullTransformer extends BaseFullTransformer class FullTransformer extends BaseFullTransformer

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Stub\DateFormat; 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; use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer as BaseHour1200Transformer;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer as BaseH
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer} * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1200Transformer}
* instead. * instead.
*/ */
class Hour1200Transformer extends BaseHour1200Transformer class Hour1200Transformer extends BaseHour1200Transformer

View File

@ -11,6 +11,8 @@
namespace Symfony\Component\Locale\Stub\DateFormat; 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; use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer as BaseHour1201Transformer;
/** /**
@ -18,8 +20,8 @@ use Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer as BaseH
* *
* @author Bernhard Schussek <bschussek@gmail.com> * @author Bernhard Schussek <bschussek@gmail.com>
* *
* @deprecated Deprecated since version 2.3, to be removed in 3.0. Use * @deprecated since version 2.3, to be removed in 3.0.
* {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer} * Use {@link \Symfony\Component\Intl\DateFormatter\DateFormat\Hour1201Transformer}
* instead. * instead.
*/ */
class Hour1201Transformer extends BaseHour1201Transformer class Hour1201Transformer extends BaseHour1201Transformer

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