spiral/framework

route:list does not handle OPTIONS verb

Opened this issue · 0 comments

Description

ListCommand.php:72

For $result[], there is not an OPTIONS, so if your code has an OPTIONS verb route it crashes with

[UnhandledMatchError]
Unhandled match case 'options'

How To Reproduce

#[Route(route: '/test', name: 'test.cors', methods: ['OPTIONS'])]
    public function testCors() {
        return [
            'status' => true
        ];
    }

Additional Info

Q A
Framework Version 3.12
PHP version 8.3
Operating system Alpine