diff --git a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php index 1269812bbf151..57df4195bcec4 100644 --- a/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php +++ b/src/Symfony/Bridge/Doctrine/Tests/Form/Type/EntityTypePerformanceTest.php @@ -90,7 +90,7 @@ public function testCollapsedEntityField() $this->setMaxRunningTime(1); for ($i = 0; $i < 40; ++$i) { - $form = $this->factory->create('entity', null, array( + $form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( 'class' => self::ENTITY_CLASS, )); @@ -108,7 +108,7 @@ public function testCollapsedEntityFieldWithChoices() $this->setMaxRunningTime(1); for ($i = 0; $i < 40; ++$i) { - $form = $this->factory->create('entity', null, array( + $form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( 'class' => self::ENTITY_CLASS, 'choices' => $choices, )); @@ -127,7 +127,7 @@ public function testCollapsedEntityFieldWithPreferredChoices() $this->setMaxRunningTime(1); for ($i = 0; $i < 40; ++$i) { - $form = $this->factory->create('entity', null, array( + $form = $this->factory->create('Symfony\Bridge\Doctrine\Form\Type\EntityType', null, array( 'class' => self::ENTITY_CLASS, 'preferred_choices' => $choices, )); diff --git a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php index 72a41bc122b40..cf2f561503d38 100644 --- a/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php +++ b/src/Symfony/Bundle/SecurityBundle/Tests/DataCollector/SecurityDataCollectorTest.php @@ -40,24 +40,6 @@ public function testCollectWhenAuthenticationTokenIsNull() $this->assertEmpty($collector->getUser()); } - /** - * @group legacy - */ - public function testLegacyCollectWhenAuthenticationTokenIsNull() - { - $tokenStorage = $this->getMock('Symfony\Component\Security\Core\SecurityContextInterface'); - $collector = new SecurityDataCollector($tokenStorage, $this->getRoleHierarchy()); - $collector->collect($this->getRequest(), $this->getResponse()); - - $this->assertTrue($collector->isEnabled()); - $this->assertFalse($collector->isAuthenticated()); - $this->assertNull($collector->getTokenClass()); - $this->assertTrue($collector->supportsRoleHierarchy()); - $this->assertCount(0, $collector->getRoles()); - $this->assertCount(0, $collector->getInheritedRoles()); - $this->assertEmpty($collector->getUser()); - } - /** @dataProvider provideRoles */ public function testCollectAuthenticationTokenAndRoles(array $roles, array $normalizedRoles, array $inheritedRoles) { diff --git a/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php b/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php index db8b29dbeb3ab..6aed6efa394d6 100644 --- a/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php +++ b/src/Symfony/Component/ClassLoader/Tests/ClassMapGeneratorTest.php @@ -110,13 +110,10 @@ public function getTestCreateMapTests() 'Foo\\TFooBar' => __DIR__.'/Fixtures/php5.4/traits.php', 'Foo\\CBar' => __DIR__.'/Fixtures/php5.4/traits.php', )), - ); - - if (PHP_VERSION_ID >= 50500) { - $data[] = array(__DIR__.'/Fixtures/php5.5', array( + array(__DIR__.'/Fixtures/php5.5', array( 'ClassCons\\Foo' => __DIR__.'/Fixtures/php5.5/class_cons.php', - )); - } + )), + ); return $data; } diff --git a/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php index 7f8eb2681d9e9..db7ebc24117a1 100644 --- a/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/BooleanNodeDefinition.php @@ -30,18 +30,6 @@ public function __construct($name, NodeParentInterface $parent = null) $this->nullEquivalent = true; } - /** - * {@inheritdoc} - * - * @deprecated Deprecated since version 2.8, to be removed in 3.0. - */ - public function cannotBeEmpty() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); - - return parent::cannotBeEmpty(); - } - /** * Instantiate a Node. * diff --git a/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php b/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php index a1cd49b73cab4..ddd716d06a7b5 100644 --- a/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php +++ b/src/Symfony/Component/Config/Definition/Builder/NumericNodeDefinition.php @@ -58,16 +58,4 @@ public function min($min) return $this; } - - /** - * {@inheritdoc} - * - * @deprecated Deprecated since version 2.8, to be removed in 3.0. - */ - public function cannotBeEmpty() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); - - return parent::cannotBeEmpty(); - } } diff --git a/src/Symfony/Component/Console/Helper/ProgressBar.php b/src/Symfony/Component/Console/Helper/ProgressBar.php index cbbe0da2ed042..b37c47e4727eb 100644 --- a/src/Symfony/Component/Console/Helper/ProgressBar.php +++ b/src/Symfony/Component/Console/Helper/ProgressBar.php @@ -181,7 +181,7 @@ public function getProgress() /** * Gets the progress bar step width. * - * @return int The progress bar step width + * @return int The progress bar step width */ private function getStepWidth() { diff --git a/src/Symfony/Component/Console/Input/StringInput.php b/src/Symfony/Component/Console/Input/StringInput.php index 3ae9b6ffa99b4..97dcc2801795d 100644 --- a/src/Symfony/Component/Console/Input/StringInput.php +++ b/src/Symfony/Component/Console/Input/StringInput.php @@ -30,7 +30,7 @@ class StringInput extends ArgvInput /** * Constructor. * - * @param string $input An array of parameters from the CLI (in the argv format) + * @param string $input An array of parameters from the CLI (in the argv format) * * @api */ diff --git a/src/Symfony/Component/Console/Output/OutputInterface.php b/src/Symfony/Component/Console/Output/OutputInterface.php index f01f47073bcb2..4b1eb0357ada5 100644 --- a/src/Symfony/Component/Console/Output/OutputInterface.php +++ b/src/Symfony/Component/Console/Output/OutputInterface.php @@ -76,28 +76,28 @@ public function setVerbosity($level); public function getVerbosity(); /** - * Returns whether verbosity is quiet (-q) + * Returns whether verbosity is quiet (-q). * * @return bool true if verbosity is set to VERBOSITY_QUIET, false otherwise */ public function isQuiet(); /** - * Returns whether verbosity is verbose (-v) + * Returns whether verbosity is verbose (-v). * * @return bool true if verbosity is set to VERBOSITY_VERBOSE, false otherwise */ public function isVerbose(); /** - * Returns whether verbosity is very verbose (-vv) + * Returns whether verbosity is very verbose (-vv). * * @return bool true if verbosity is set to VERBOSITY_VERY_VERBOSE, false otherwise */ public function isVeryVerbose(); /** - * Returns whether verbosity is debug (-vvv) + * Returns whether verbosity is debug (-vvv). * * @return bool true if verbosity is set to VERBOSITY_DEBUG, false otherwise */ diff --git a/src/Symfony/Component/Debug/ExceptionHandler.php b/src/Symfony/Component/Debug/ExceptionHandler.php index b168ffe893411..3e7c8cfb4dc38 100644 --- a/src/Symfony/Component/Debug/ExceptionHandler.php +++ b/src/Symfony/Component/Debug/ExceptionHandler.php @@ -122,7 +122,7 @@ public function handle(\Exception $exception) $caughtLength = $this->caughtLength = 0; - ob_start(function($buffer) { + ob_start(function ($buffer) { $this->caughtBuffer = $buffer; return ''; @@ -133,7 +133,7 @@ public function handle(\Exception $exception) // Empty loop, everything is in the condition } if (isset($this->caughtBuffer[0])) { - ob_start(function($buffer) { + ob_start(function ($buffer) { if ($this->caughtLength) { // use substr_replace() instead of substr() for mbstring overloading resistance $cleanBuffer = substr_replace($buffer, '', 0, $this->caughtLength); diff --git a/src/Symfony/Component/EventDispatcher/Tests/EventTest.php b/src/Symfony/Component/EventDispatcher/Tests/EventTest.php index 272ab17e8a091..1a6f4c4ae2317 100644 --- a/src/Symfony/Component/EventDispatcher/Tests/EventTest.php +++ b/src/Symfony/Component/EventDispatcher/Tests/EventTest.php @@ -12,7 +12,6 @@ namespace Symfony\Component\EventDispatcher\Tests; use Symfony\Component\EventDispatcher\Event; -use Symfony\Component\EventDispatcher\EventDispatcher; /** * Test class for Event. diff --git a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php index b6f8d10f3a08f..acda437270094 100644 --- a/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php +++ b/src/Symfony/Component/HttpFoundation/Session/Storage/NativeSessionStorage.php @@ -13,7 +13,6 @@ use Symfony\Component\HttpFoundation\Session\SessionBagInterface; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy; use Symfony\Component\HttpFoundation\Session\Storage\Proxy\AbstractProxy; use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php index e911ca8deeca5..a744e19f40c29 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php @@ -16,7 +16,6 @@ use Symfony\Component\HttpFoundation\Session\Storage\Handler\NativeSessionHandler; use Symfony\Component\HttpFoundation\Session\Storage\Handler\NullSessionHandler; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; -use Symfony\Component\HttpFoundation\Session\Storage\Proxy\NativeProxy; use Symfony\Component\HttpFoundation\Session\Storage\Proxy\SessionHandlerProxy; /** diff --git a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php index 7290e62382f9e..b29c433240039 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/Session/Storage/Proxy/AbstractProxyTest.php @@ -91,7 +91,6 @@ public function testIsWrapper() */ public function testIsActive() { - $this->assertFalse($this->proxy->isActive()); session_start(); $this->assertTrue($this->proxy->isActive()); diff --git a/src/Symfony/Component/Routing/Annotation/Route.php b/src/Symfony/Component/Routing/Annotation/Route.php index 47cd06bfc1c4c..42075bdd4e0c6 100644 --- a/src/Symfony/Component/Routing/Annotation/Route.php +++ b/src/Symfony/Component/Routing/Annotation/Route.php @@ -86,22 +86,6 @@ public function getName() public function setRequirements($requirements) { - if (isset($requirements['_method'])) { - if (0 === count($this->methods)) { - $this->methods = explode('|', $requirements['_method']); - } - - @trigger_error('The "_method" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" option instead.', E_USER_DEPRECATED); - } - - if (isset($requirements['_scheme'])) { - if (0 === count($this->schemes)) { - $this->schemes = explode('|', $requirements['_scheme']); - } - - @trigger_error('The "_scheme" requirement is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" option instead.', E_USER_DEPRECATED); - } - $this->requirements = $requirements; } diff --git a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php index 1e6aad7b97db0..1fb04dd2bc888 100644 --- a/src/Symfony/Component/Routing/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/XmlFileLoader.php @@ -122,24 +122,6 @@ protected function parseRoute(RouteCollection $collection, \DOMElement $node, $p list($defaults, $requirements, $options, $condition) = $this->parseConfigs($node, $path); - if (isset($requirements['_method'])) { - if (0 === count($methods)) { - $methods = explode('|', $requirements['_method']); - } - - unset($requirements['_method']); - @trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" attribute instead.', $id, $path), E_USER_DEPRECATED); - } - - if (isset($requirements['_scheme'])) { - if (0 === count($schemes)) { - $schemes = explode('|', $requirements['_scheme']); - } - - unset($requirements['_scheme']); - @trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" attribute instead.', $id, $path), E_USER_DEPRECATED); - } - $route = new Route($node->getAttribute('path'), $defaults, $requirements, $options, $node->getAttribute('host'), $schemes, $methods, $condition); $collection->add($id, $route); } diff --git a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php index 6fa2e2a6506ee..9bce109c2a442 100644 --- a/src/Symfony/Component/Routing/Loader/YamlFileLoader.php +++ b/src/Symfony/Component/Routing/Loader/YamlFileLoader.php @@ -116,24 +116,6 @@ protected function parseRoute(RouteCollection $collection, $name, array $config, $methods = isset($config['methods']) ? $config['methods'] : array(); $condition = isset($config['condition']) ? $config['condition'] : null; - if (isset($requirements['_method'])) { - if (0 === count($methods)) { - $methods = explode('|', $requirements['_method']); - } - - unset($requirements['_method']); - @trigger_error(sprintf('The "_method" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "methods" option instead.', $name, $path), E_USER_DEPRECATED); - } - - if (isset($requirements['_scheme'])) { - if (0 === count($schemes)) { - $schemes = explode('|', $requirements['_scheme']); - } - - unset($requirements['_scheme']); - @trigger_error(sprintf('The "_scheme" requirement of route "%s" in file "%s" is deprecated since version 2.2 and will be removed in 3.0. Use the "schemes" option instead.', $name, $path), E_USER_DEPRECATED); - } - $route = new Route($config['path'], $defaults, $requirements, $options, $host, $schemes, $methods, $condition); $collection->add($name, $route); diff --git a/src/Symfony/Component/Translation/Tests/TranslatorTest.php b/src/Symfony/Component/Translation/Tests/TranslatorTest.php index e8e967139dac2..780338524f83f 100644 --- a/src/Symfony/Component/Translation/Tests/TranslatorTest.php +++ b/src/Symfony/Component/Translation/Tests/TranslatorTest.php @@ -495,121 +495,6 @@ public function testTransChoiceFallbackWithNoTranslation() // unchanged if it can't be found $this->assertEquals('some_message2', $translator->transChoice('some_message2', 10, array('%count%' => 10))); } - - /** - * @group legacy - * @dataProvider dataProviderGetMessages - */ - public function testLegacyGetMessages($resources, $locale, $expected) - { - $locales = array_keys($resources); - $_locale = null !== $locale ? $locale : reset($locales); - $locales = array_slice($locales, 0, array_search($_locale, $locales)); - - $translator = new Translator($_locale, new MessageSelector()); - $translator->setFallbackLocales(array_reverse($locales)); - $translator->addLoader('array', new ArrayLoader()); - foreach ($resources as $_locale => $domainMessages) { - foreach ($domainMessages as $domain => $messages) { - $translator->addResource('array', $messages, $_locale, $domain); - } - } - $result = $translator->getMessages($locale); - - $this->assertEquals($expected, $result); - } - - public function dataProviderGetMessages() - { - $resources = array( - 'en' => array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (EN)', - ), - 'validators' => array( - 'int' => 'integer (EN)', - ), - ), - 'pt-PT' => array( - 'messages' => array( - 'foo' => 'foo messages (PT)', - ), - 'validators' => array( - 'str' => 'integer (PT)', - ), - ), - 'pt_BR' => array( - 'validators' => array( - 'int' => 'integer (BR)', - ), - ), - ); - - return array( - array($resources, null, - array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (EN)', - ), - 'validators' => array( - 'int' => 'integer (EN)', - ), - ), - ), - array($resources, 'en', - array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (EN)', - ), - 'validators' => array( - 'int' => 'integer (EN)', - ), - ), - ), - array($resources, 'pt-PT', - array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (PT)', - ), - 'validators' => array( - 'int' => 'integer (EN)', - 'str' => 'integer (PT)', - ), - ), - ), - array($resources, 'pt_BR', - array( - 'jsmessages' => array( - 'foo' => 'foo (EN)', - 'bar' => 'bar (EN)', - ), - 'messages' => array( - 'foo' => 'foo messages (PT)', - ), - 'validators' => array( - 'int' => 'integer (BR)', - 'str' => 'integer (PT)', - ), - ), - ), - ); - } } class StringClass diff --git a/src/Symfony/Component/Translation/Translator.php b/src/Symfony/Component/Translation/Translator.php index 8d31fe07fd0ac..92b51810d152f 100644 --- a/src/Symfony/Component/Translation/Translator.php +++ b/src/Symfony/Component/Translation/Translator.php @@ -265,28 +265,6 @@ protected function getLoaders() return $this->loaders; } - /** - * Collects all messages for the given locale. - * - * @param string|null $locale Locale of translations, by default is current locale - * - * @return array[array] indexed by catalog - * - * @deprecated since version 2.8, to be removed in 3.0. Use TranslatorBagInterface::getCatalogue() method instead. - */ - public function getMessages($locale = null) - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0. Use TranslatorBagInterface::getCatalogue() method instead.', E_USER_DEPRECATED); - - $catalogue = $this->getCatalogue($locale); - $messages = $catalogue->all(); - while ($catalogue = $catalogue->getFallbackCatalogue()) { - $messages = array_replace_recursive($catalogue->all(), $messages); - } - - return $messages; - } - /** * @param string $locale */ diff --git a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php index 81073ecc22f11..46573fd863162 100644 --- a/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php +++ b/src/Symfony/Component/VarDumper/Cloner/AbstractCloner.php @@ -178,7 +178,7 @@ public function setMaxString($maxString) */ public function cloneVar($var, $filter = 0) { - $this->prevErrorHandler = set_error_handler(function($type, $msg, $file, $line, $context) { + $this->prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context) { if (E_RECOVERABLE_ERROR === $type || E_USER_ERROR === $type) { // Cloner never dies throw new \ErrorException($msg, 0, $type, $file, $line);