Skip to content

goto parsing fails with empty target #154

@ghost

Description

Symfony's route generator generates a url matcher on disk like so:

<?php
class UrlMatcher {
    public function match($path)
    {
        if ('/path' === $pathinfo) {
            if ('POST' !== $canonicalMethod) {
                $allow[] = 'POST';
                goto not_this_path;
            }
            return array ('_controller' => 'method',  '_route' => 'this_path');
        }
        not_this_path:
        // other routes with their own goto not_that_path
    }
}

PHP seems to allow empty targets, since it runs the code just fine. This is a regression compared to the previous version of the language server.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIssue identified by VS Code Team member as probable buglang-server-regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions