Skip to content

Commit 0e33b3b

Browse files
authored
Fix : GetResponseForControllerResultEvent depreciation (#1179)
- GetResponseForControllerResultEvent is deprecated since Symfony 4.3, use ViewEvent instead
1 parent c81d5d0 commit 0e33b3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/errors.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use App\Entity\Product;
3535
use App\Exception\ProductNotFoundException;
3636
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
3737
use Symfony\Component\HttpFoundation\Request;
38-
use Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent;
38+
use Symfony\Component\HttpKernel\Event\ViewEvent;
3939
use Symfony\Component\HttpKernel\KernelEvents;
4040

4141
final class ProductManager implements EventSubscriberInterface
@@ -47,7 +47,7 @@ final class ProductManager implements EventSubscriberInterface
4747
];
4848
}
4949

50-
public function checkProductAvailability(GetResponseForControllerResultEvent $event): void
50+
public function checkProductAvailability(ViewEvent $event): void
5151
{
5252
$product = $event->getControllerResult();
5353
if (!$product instanceof Product || !$event->getRequest()->isMethodSafe(false)) {

0 commit comments

Comments
 (0)