Skip to content

Syntax errors when running against PHP 7.1 codebase #92

Description

@NicolasCARPi

Hello,

I'm discovering psecio-parse and I've just ran it on my codebase.

I've opened this issue to report errors when running it against a PHP 7.1 codebase:

private const MY_PRIVATE_CONST = 'hello';

^ this will throw an error "Syntax error, unexpected T_CONST, expecting T_FUNCTION"

public function hello(?string $name): string

^ this will throw an error "unexpected ?, expecting T_VARIABLE

I believe these errors come from nikic/php-parser, right? Your composer.json locks it to version 2.0 (resolving to 2.1.1 back from 2016) when version 4.0 is out and supports newer syntax. So maybe updating the parser would simply solve these issues.

Also, it would be great if you could provide phar archives for releases and don't limit the symfony/console dependency to version 3.2 max ;)

Cheers and I wish the best to this project! :)

~Nico

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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