Skip to content

Commit

Permalink
NTR: fix routing for 6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitalij Mik committed Mar 13, 2024
1 parent 6738908 commit 89d388b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion src/Compatibility/DependencyLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,4 @@ public function prepareStorefrontBuild(): void
# copy($file, $target);
}
}

}
8 changes: 7 additions & 1 deletion src/Subscriber/KernelSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ public function onModifyRouteScope(ControllerEvent $event): void

/** @var null|RouteScope|string $routeScope */
$routeScope = $attributes->get(PlatformRequest::ATTRIBUTE_ROUTE_SCOPE);

if (is_string($routeScope)) {
$routeScope = new RouteScope(['scopes'=>[$routeScope]]);
$routeScope = [$routeScope];

if (class_exists(RouteScope::class)) {
$routeScope = new RouteScope(['scopes' => [$routeScope]]);
}


$attributes->set(PlatformRequest::ATTRIBUTE_ROUTE_SCOPE, $routeScope);
}
Expand Down

0 comments on commit 89d388b

Please sign in to comment.