diff --git a/src/Symfony/Bundle/FrameworkBundle/DataCollector/AjaxDataCollector.php b/src/Symfony/Bundle/FrameworkBundle/DataCollector/AjaxDataCollector.php deleted file mode 100644 index f44c8f5aaf80e..0000000000000 --- a/src/Symfony/Bundle/FrameworkBundle/DataCollector/AjaxDataCollector.php +++ /dev/null @@ -1,27 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\FrameworkBundle\DataCollector; - -use Symfony\Component\HttpKernel\DataCollector\AjaxDataCollector as BaseAjaxDataCollector; - -@trigger_error('The '.__NAMESPACE__.'\AjaxDataCollector class is deprecated since version 2.8 and will be removed in 3.0. Use Symfony\Component\HttpKernel\DataCollector\AjaxDataCollector instead.', E_USER_DEPRECATED); - -/** - * AjaxDataCollector. - * - * @author Bart van den Burg - * - * @deprecated since version 2.8, to be removed in 3.0. - */ -class AjaxDataCollector extends BaseAjaxDataCollector -{ -} diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml b/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml index b3b80e1a4efe0..ffc94fc588bb2 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/collectors.xml @@ -15,10 +15,6 @@ - - - - diff --git a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php index ef93a257cc8fc..f98b493e3270b 100644 --- a/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php +++ b/src/Symfony/Bundle/TwigBundle/DependencyInjection/Compiler/ExtensionPass.php @@ -77,10 +77,5 @@ public function process(ContainerBuilder $container) if ($container->has('assets.packages')) { $container->getDefinition('twig.extension.assets')->addTag('twig.extension'); } - - if (method_exists('Symfony\Bridge\Twig\AppVariable', 'setContainer')) { - // we are on Symfony <3.0, where the setContainer method exists - $container->getDefinition('twig.app_variable')->addMethodCall('setContainer', array(new Reference('service_container'))); - } } } diff --git a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php index 0adda7848c927..744883f547408 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php +++ b/src/Symfony/Bundle/WebProfilerBundle/Controller/ProfilerController.php @@ -116,27 +116,6 @@ public function panelAction(Request $request, $token) )), 200, array('Content-Type' => 'text/html')); } - /** - * Purges all tokens. - * - * @return Response A Response instance - * - * @throws NotFoundHttpException - */ - public function purgeAction() - { - @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); - - if (null === $this->profiler) { - throw new NotFoundHttpException('The profiler must be enabled.'); - } - - $this->profiler->disable(); - $this->profiler->purge(); - - return new RedirectResponse($this->generator->generate('_profiler_info', array('about' => 'purge')), 302, array('Content-Type' => 'text/html')); - } - /** * Displays information page. * diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml b/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml index d9708f9c50743..001418c95cd94 100644 --- a/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml +++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/config/routing/profiler.xml @@ -16,10 +16,6 @@ web_profiler.controller.profiler:searchBarAction - - web_profiler.controller.profiler:purgeAction - - web_profiler.controller.profiler:infoAction diff --git a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php index a112f77ef339f..dad46786d91f1 100644 --- a/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php +++ b/src/Symfony/Component/DependencyInjection/Loader/XmlFileLoader.php @@ -221,7 +221,7 @@ private function parseDefinition(\DOMElement $service, $file) if (false !== strpos($name, '-') && false === strpos($name, '_') && !array_key_exists($normalizedName = str_replace('-', '_', $name), $parameters)) { $parameters[$normalizedName] = XmlUtils::phpize($node->nodeValue); } - // keep not normalized key for BC too + // keep not normalized key $parameters[$name] = XmlUtils::phpize($node->nodeValue); } diff --git a/src/Symfony/Component/DomCrawler/Crawler.php b/src/Symfony/Component/DomCrawler/Crawler.php index 960e70167451d..30d9f50381612 100644 --- a/src/Symfony/Component/DomCrawler/Crawler.php +++ b/src/Symfony/Component/DomCrawler/Crawler.php @@ -901,12 +901,7 @@ private function relativize($xpath) $expression = substr($expression, strlen($parenthesis)); } - // BC for Symfony 2.4 and lower were elements were adding in a fake _root parent - if (0 === strpos($expression, '/_root/')) { - @trigger_error('XPath expressions referencing the fake root node are deprecated since version 2.8 and will be unsupported in 3.0. Please use "./" instead of "/_root/".', E_USER_DEPRECATED); - - $expression = './'.substr($expression, 7); - } elseif (0 === strpos($expression, 'self::*/')) { + if (0 === strpos($expression, 'self::*/')) { $expression = './'.substr($expression, 8); } @@ -921,12 +916,7 @@ private function relativize($xpath) $expression = 'self::'.substr($expression, 2); } elseif (0 === strpos($expression, 'child::')) { $expression = 'self::'.substr($expression, 7); - } elseif ('/' === $expression[0] || 0 === strpos($expression, 'self::')) { - // the only direct child in Symfony 2.4 and lower is _root, which is already handled previously - // so let's drop the expression entirely - $expression = $nonMatchingExpression; - } elseif ('.' === $expression[0]) { - // '.' is the fake root element in Symfony 2.4 and lower, which is excluded from results + } elseif ('/' === $expression[0] || '.' === $expression[0] || 0 === strpos($expression, 'self::')) { $expression = $nonMatchingExpression; } elseif (0 === strpos($expression, 'descendant::')) { $expression = 'descendant-or-self::'.substr($expression, strlen('descendant::')); diff --git a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php index eb2d1ff484195..0e23756fcb351 100755 --- a/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php +++ b/src/Symfony/Component/DomCrawler/Tests/CrawlerTest.php @@ -551,16 +551,6 @@ public function testFilterXPathWithFakeRoot() $this->assertCount(0, $crawler->filterXPath('self::_root'), '->filterXPath() returns an empty result if the XPath references the fake root node'); } - /** @group legacy */ - public function testLegacyFilterXPathWithFakeRoot() - { - $crawler = $this->createTestCrawler(); - $this->assertCount(0, $crawler->filterXPath('/_root'), '->filterXPath() returns an empty result if the XPath references the fake root node'); - - $crawler = $this->createTestCrawler()->filterXPath('//body'); - $this->assertCount(1, $crawler->filterXPath('/_root/body')); - } - public function testFilterXPathWithAncestorAxis() { $crawler = $this->createTestCrawler()->filterXPath('//form'); diff --git a/src/Symfony/Component/Form/Tests/AbstractFormTest.php b/src/Symfony/Component/Form/Tests/AbstractFormTest.php index dc590c918cec4..dec9df70768cd 100644 --- a/src/Symfony/Component/Form/Tests/AbstractFormTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractFormTest.php @@ -34,8 +34,6 @@ abstract class AbstractFormTest extends \PHPUnit_Framework_TestCase protected function setUp() { - // We need an actual dispatcher to use the deprecated - // bindRequest() method $this->dispatcher = new EventDispatcher(); $this->factory = $this->getMock('Symfony\Component\Form\FormFactoryInterface'); $this->form = $this->createForm(); diff --git a/src/Symfony/Component/Process/ProcessBuilder.php b/src/Symfony/Component/Process/ProcessBuilder.php index 041ac38f5b04b..69843caeb94ca 100644 --- a/src/Symfony/Component/Process/ProcessBuilder.php +++ b/src/Symfony/Component/Process/ProcessBuilder.php @@ -268,7 +268,6 @@ public function getProcess() $script = implode(' ', array_map(array(__NAMESPACE__.'\\ProcessUtils', 'escapeArgument'), $arguments)); if ($this->inheritEnv) { - // include $_ENV for BC purposes $env = array_replace($_ENV, $_SERVER, $this->env); } else { $env = $this->env; diff --git a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php index 0405e7415cfb9..41de61eabf845 100644 --- a/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php +++ b/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php @@ -191,8 +191,6 @@ public function validateProperty($object, $propertyName, $groups = null) $classMetadata = $this->metadataFactory->getMetadataFor($object); if (!$classMetadata instanceof ClassMetadataInterface) { - // Cannot be UnsupportedMetadataException because of BC with - // Symfony < 2.5 throw new ValidatorException(sprintf( 'The metadata factory should return instances of '. '"\Symfony\Component\Validator\Mapping\ClassMetadataInterface", '. @@ -242,8 +240,6 @@ public function validatePropertyValue($objectOrClass, $propertyName, $value, $gr $classMetadata = $this->metadataFactory->getMetadataFor($objectOrClass); if (!$classMetadata instanceof ClassMetadataInterface) { - // Cannot be UnsupportedMetadataException because of BC with - // Symfony < 2.5 throw new ValidatorException(sprintf( 'The metadata factory should return instances of '. '"\Symfony\Component\Validator\Mapping\ClassMetadataInterface", '. @@ -404,7 +400,6 @@ private function validateEachObjectIn($collection, $propertyPath, array $groups, if (is_array($value)) { // Arrays are always cascaded, independent of the specified // traversal strategy - // (BC with Symfony < 2.5) $this->validateEachObjectIn( $value, $propertyPath.'['.$key.']', @@ -416,7 +411,6 @@ private function validateEachObjectIn($collection, $propertyPath, array $groups, } // Scalar and null values in the collection are ignored - // (BC with Symfony < 2.5) if (is_object($value)) { $this->validateObject( $value, @@ -615,8 +609,6 @@ private function validateClassNode($object, $cacheKey, ClassMetadataInterface $m // If TRAVERSE, fail if we have no Traversable if (!$object instanceof \Traversable) { - // Must throw a ConstraintDefinitionException for backwards - // compatibility reasons with Symfony < 2.5 throw new ConstraintDefinitionException(sprintf( 'Traversal was enabled for "%s", but this class '. 'does not implement "\Traversable".', @@ -726,7 +718,6 @@ private function validateGenericNode($value, $object, $cacheKey, MetadataInterfa if (is_array($value)) { // Arrays are always traversed, independent of the specified // traversal strategy - // (BC with Symfony < 2.5) $this->validateEachObjectIn( $value, $propertyPath, @@ -739,7 +730,6 @@ private function validateGenericNode($value, $object, $cacheKey, MetadataInterfa // If the value is a scalar, pass it anyway, because we want // a NoSuchMetadataException to be thrown in that case - // (BC with Symfony < 2.5) $this->validateObject( $value, $propertyPath,