Skip to content

Commit 69b43fa

Browse files
committed
bug symfony#30993 [FrameworkBundle] Fix for Controller DEPRECATED when using composer --optimized (aweelex)
This PR was merged into the 4.2 branch. Discussion ---------- [FrameworkBundle] Fix for Controller DEPRECATED when using composer --optimized | Q | A | | --- | --- | | Branch? | 4.2 | | Bug fix? | Yes | | New feature? | No | | BC breaks? | No | | Deprecations? | No | | Tests pass? | Yes | | Fixed tickets | --- | | License | MIT | Using `composer --optimize-autoload` causes `console cache:clear` (without warmup) to give DEPRECATED error, that stays in profiler. I moved `@trigger_error` from beggining of the file to Controller __consctruct method. Commits ------- 2ae2fd8 [FrameworkBundle] Fix Controller deprecated when using composer --optimized
2 parents ebe9ccf + 2ae2fd8 commit 69b43fa

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,12 @@
1414
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
1515
use Symfony\Component\DependencyInjection\ContainerAwareTrait;
1616

17-
@trigger_error(sprintf('The "%s" class is deprecated since Symfony 4.2, use %s instead.', Controller::class, AbstractController::class), E_USER_DEPRECATED);
18-
1917
/**
2018
* Controller is a simple implementation of a Controller.
2119
*
2220
* It provides methods to common features needed in controllers.
2321
*
24-
* @deprecated since Symfony 4.2, use {@see AbstractController} instead.
22+
* @deprecated since Symfony 4.2, use "Symfony\Bundle\FrameworkBundle\Controller\AbstractController" instead.
2523
*
2624
* @author Fabien Potencier <[email protected]>
2725
*/

0 commit comments

Comments
 (0)