Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

route:list does not handle OPTIONS verb #1096

Open
lifewcody opened this issue Mar 27, 2024 · 0 comments
Open

route:list does not handle OPTIONS verb #1096

lifewcody opened this issue Mar 27, 2024 · 0 comments
Labels

Comments

@lifewcody
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant