8000 Updated event_listener.rst · symfony/symfony-docs@0127bd2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0127bd2

Browse files
committed
Updated event_listener.rst
Updated event_listener.rst to use the new KernelEvent::isMasterRequest method
1 parent 1172b7d commit 0127bd2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cookbook/service_container/event_listener.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ done as follow::
115115
{
116116
public function onKernelRequest(GetResponseEvent $event)
117117
{
118-
if (HttpKernel::MASTER_REQUEST != $event->getRequestType()) {
118+
if (false === $event->isMasterRequest()) {
119119
// don't do anything if it's not the master request
120120
return;
121121
}

0 commit comments

Comments
 (0)
0