[Native] Fix invalid priority for DevServerListener

This commit is contained in:
Imad Zairig
2026-03-22 16:56:54 +01:00
committed by Hugo Alliaume
parent 251eb855d4
commit 1af8fa0d11
4 changed files with 24 additions and 5 deletions

View File

@@ -51,10 +51,6 @@ jobs:
run: php bin/console cache:clear
working-directory: apps/demo-native
- name: Dump native configuration files
run: php bin/console ux-native:dump
working-directory: apps/demo-native
- name: Start Symfony server
run: symfony server:start -d --port=9888 --no-tls
working-directory: apps/demo-native

View File

@@ -21,6 +21,6 @@ return static function (ContainerConfigurator $container): void {
->args([
service('.ux_native.configuration_builder'),
])
->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'onKernelRequest'])
->tag('kernel.event_listener', ['event' => 'kernel.request', 'method' => 'onKernelRequest', 'priority' => 33])
;
};

View File

@@ -38,6 +38,11 @@ return static function (ContainerConfigurator $container) {
'secret' => 'test',
'http_method_override' => true,
'handle_all_throwables' => true,
'router' => [
'utf8' => true,
'resource' => __DIR__.'/routes.php',
'type' => 'php',
],
'assets' => [
'enabled' => true,
],

View File

@@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
return static function (RoutingConfigurator $routes): void {
// return 404 for any path not intercepted by a higher-priority listener.
};