From 0a5b016427e7bfe086f690776125378e2e5a3128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Sat, 18 Nov 2017 13:16:13 +0100 Subject: [PATCH] Move deprecation under use statements --- src/Symfony/Bridge/Twig/Form/TwigRenderer.php | 4 ++-- src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php | 4 ++-- src/Symfony/Component/Filesystem/LockHandler.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Form/TwigRenderer.php b/src/Symfony/Bridge/Twig/Form/TwigRenderer.php index 696738b5a7..82521f70cd 100644 --- a/src/Symfony/Bridge/Twig/Form/TwigRenderer.php +++ b/src/Symfony/Bridge/Twig/Form/TwigRenderer.php @@ -11,12 +11,12 @@ namespace Symfony\Bridge\Twig\Form; -@trigger_error(sprintf('The %s class is deprecated since version 3.4 and will be removed in 4.0. Use %s instead.', TwigRenderer::class, FormRenderer::class), E_USER_DEPRECATED); - use Symfony\Component\Form\FormRenderer; use Symfony\Component\Security\Csrf\CsrfTokenManagerInterface; use Twig\Environment; +@trigger_error(sprintf('The %s class is deprecated since version 3.4 and will be removed in 4.0. Use %s instead.', TwigRenderer::class, FormRenderer::class), E_USER_DEPRECATED); + /** * @author Bernhard Schussek * diff --git a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php index 42e4f8825d..09947b0c7e 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -11,8 +11,6 @@ namespace Symfony\Bundle\SecurityBundle\Command; -@trigger_error(sprintf('Class "%s" is deprecated since version 3.4 and will be removed in 4.0. Use Symfony\Bundle\AclBundle\Command\SetAclCommand instead.', SetAclCommand::class), E_USER_DEPRECATED); - use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\ConsoleOutputInterface; @@ -22,6 +20,8 @@ use Symfony\Component\Security\Acl\Dbal\Schema; use Doctrine\DBAL\Connection; use Doctrine\DBAL\Schema\SchemaException; +@trigger_error(sprintf('Class "%s" is deprecated since version 3.4 and will be removed in 4.0. Use Symfony\Bundle\AclBundle\Command\InitAclCommand instead.', InitAclCommand::class), E_USER_DEPRECATED); + /** * Installs the tables required by the ACL system. * diff --git a/src/Symfony/Component/Filesystem/LockHandler.php b/src/Symfony/Component/Filesystem/LockHandler.php index f1bb8d0ebf..6e5dfdd506 100644 --- a/src/Symfony/Component/Filesystem/LockHandler.php +++ b/src/Symfony/Component/Filesystem/LockHandler.php @@ -11,12 +11,12 @@ namespace Symfony\Component\Filesystem; -@trigger_error(sprintf('The %s class is deprecated since version 3.4 and will be removed in 4.0. Use %s or %s instead.', LockHandler::class, SemaphoreStore::class, FlockStore::class), E_USER_DEPRECATED); - use Symfony\Component\Filesystem\Exception\IOException; use Symfony\Component\Lock\Store\FlockStore; use Symfony\Component\Lock\Store\SemaphoreStore; +@trigger_error(sprintf('The %s class is deprecated since version 3.4 and will be removed in 4.0. Use %s or %s instead.', LockHandler::class, SemaphoreStore::class, FlockStore::class), E_USER_DEPRECATED); + /** * LockHandler class provides a simple abstraction to lock anything by means of * a file lock.