diff --git a/src/Symfony/Bridge/Twig/Extension/AssetExtension.php b/src/Symfony/Bridge/Twig/Extension/AssetExtension.php index f76e80b4ca..f599a9eb5c 100644 --- a/src/Symfony/Bridge/Twig/Extension/AssetExtension.php +++ b/src/Symfony/Bridge/Twig/Extension/AssetExtension.php @@ -12,7 +12,6 @@ namespace Symfony\Bridge\Twig\Extension; use Symfony\Component\Asset\Packages; -use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; /** * Twig extension for the Symfony Asset component. diff --git a/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php b/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php index 572e92a2e7..99d67dd974 100644 --- a/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php +++ b/src/Symfony/Bundle/TwigBundle/Command/DebugCommand.php @@ -12,8 +12,6 @@ namespace Symfony\Bundle\TwigBundle\Command; use Symfony\Bridge\Twig\Command\DebugCommand as BaseDebugCommand; -use Symfony\Component\Console\Input\InputInterface; -use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ContainerAwareInterface; @@ -44,23 +42,4 @@ class DebugCommand extends BaseDebugCommand implements ContainerAwareInterface { return $this->container->get('twig'); } - - /** - * {@inheritdoc} - */ - protected function configure() - { - parent::configure(); - - $this->setAliases(array('twig:debug')); - } - - protected function execute(InputInterface $input, OutputInterface $output) - { - if (false !== strpos($input->getFirstArgument(), ':d')) { - $output->writeln('The use of "twig:debug" command is deprecated since version 2.7 and will be removed in 3.0. Use the "debug:twig" instead.'); - } - - parent::execute($input, $output); - } } diff --git a/src/Symfony/Bundle/TwigBundle/Debug/TimedTwigEngine.php b/src/Symfony/Bundle/TwigBundle/Debug/TimedTwigEngine.php deleted file mode 100644 index 826af7925f..0000000000 --- a/src/Symfony/Bundle/TwigBundle/Debug/TimedTwigEngine.php +++ /dev/null @@ -1,60 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Bundle\TwigBundle\Debug; - -trigger_error('The '.__NAMESPACE__.'\TimedTwigEngine class is deprecated since version 2.7 and will be removed in 3.0. Use the Twig native profiler instead.', E_USER_DEPRECATED); - -use Symfony\Bundle\TwigBundle\TwigEngine; -use Symfony\Component\Templating\TemplateNameParserInterface; -use Symfony\Component\Stopwatch\Stopwatch; -use Symfony\Component\Config\FileLocatorInterface; - -/** - * Times the time spent to render a template. - * - * @author Fabien Potencier - * - * @deprecated since version 2.7, to be removed in 3.0. Use the Twig native profiler instead. - */ -class TimedTwigEngine extends TwigEngine -{ - protected $stopwatch; - - /** - * Constructor. - * - * @param \Twig_Environment $environment A \Twig_Environment instance - * @param TemplateNameParserInterface $parser A TemplateNameParserInterface instance - * @param FileLocatorInterface $locator A FileLocatorInterface instance - * @param Stopwatch $stopwatch A Stopwatch instance - */ - public function __construct(\Twig_Environment $environment, TemplateNameParserInterface $parser, FileLocatorInterface $locator, Stopwatch $stopwatch) - { - parent::__construct($environment, $parser, $locator); - - $this->stopwatch = $stopwatch; - } - - /** - * {@inheritdoc} - */ - public function render($name, array $parameters = array()) - { - $e = $this->stopwatch->start(sprintf('template.twig (%s)', $name), 'template'); - - $ret = parent::render($name, $parameters); - - $e->stop(); - - return $ret; - } -}