File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 16
16
"doctrine/persistence" : " ^1.3 || ^2.1" ,
17
17
"league/uri" : " ^6.0" ,
18
18
"league/uri-components" : " ^2.3" ,
19
+ "setono/symfony-main-request-trait" : " ^1.0" ,
19
20
"sylius/resource-bundle" : " ^1.6" ,
20
21
"symfony/config" : " ^5.4 || ^6.0" ,
21
22
"symfony/console" : " ^5.4 || ^6.0" ,
Original file line number Diff line number Diff line change 5
5
namespace Setono \SyliusRedirectPlugin \EventListener ;
6
6
7
7
use Doctrine \Persistence \ObjectManager ;
8
+ use Setono \MainRequestTrait \MainRequestTrait ;
8
9
use Setono \SyliusRedirectPlugin \Resolver \RedirectionPathResolverInterface ;
9
10
use Sylius \Component \Channel \Context \ChannelContextInterface ;
10
11
use Symfony \Component \EventDispatcher \EventSubscriberInterface ;
16
17
17
18
class NotFoundSubscriber implements EventSubscriberInterface
18
19
{
20
+ use MainRequestTrait;
21
+
19
22
use RedirectResponseTrait;
20
23
21
24
/** @var ObjectManager */
@@ -46,7 +49,7 @@ public static function getSubscribedEvents(): array
46
49
47
50
public function onKernelException (ExceptionEvent $ event ): void
48
51
{
49
- if (!$ event -> isMasterRequest ( )) {
52
+ if (!$ this -> isMainRequest ( $ event )) {
50
53
return ;
51
54
}
52
55
You can’t perform that action at this time.
0 commit comments