Skip to content

Commit

Permalink
RFC: Move REST route recognition after routing resolves
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveb-p committed Aug 30, 2024
1 parent 896a02f commit 78b29de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bundle/EventListener/RequestListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function onKernelRequest(RequestEvent $event): void

public function addAttributeForIbexaRestRoute(RequestEvent $event): void
{
$path = $event->getRequest()->attributes->get('semanticPathInfo');
$path = $event->getRequest()->attributes->get('semanticPathinfo');
if ($path === null) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/bundle/EventListener/RequestListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ protected function performFakeRequest(string $uri, int $type = HttpKernelInterfa
if (str_starts_with($uri, '/admin')) {
$uri = substr($uri, strlen('/admin'));
}
$request->attributes->set('semanticPathInfo', $uri);
$request->attributes->set('semanticPathinfo', $uri);
$this->getEventListener()->addAttributeForIbexaRestRoute($event);

return $event->getRequest();
Expand Down

0 comments on commit 78b29de

Please sign in to comment.