Skip to content

Update to PhpUnit 12, remove error if no methods declared #205

@tacman

Description

@tacman

Description

Since you've updated to Symfony 8, I figured you'd want to have composer outdated show everything as being up today.

So I updated to PHPUnit 12, and got errors related to not declaring methods on the controllers.

            $methods = $route->getMethods();
            if (!$methods) {
                @trigger_error(\sprintf('Route %s has no configured HTTP methods. It is recommended that you set at least one HTTP method for your route in its configuration.', $routeName), \E_USER_DEPRECATED);

                $methods[] = 'GET';
            }

I find this "error" completely incorrect, since at best it's a recommendation but not even the Symfony maker bundle generates it with a method.

I asked pierstoval about it, he created an environment variable to silence them, but for this package I think we should just skip it.

Pierstoval/SmokeTesting#9

I'll submit a PR.

Example

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions