beyondcode / invoker-community

74 stars 2 forks source link

PHP 8.1 not supported: ParseToAstFailure when going to Jobs #276

Closed ziming closed 1 year ago

ziming commented 2 years ago

OS: darwin Invoker Version: 2.8.0 Laravel Version: 8.83.4 Local project: unknown PHP Binary: /usr/local/bin/php Route: /events?project=remote-2Qqm6z6oLNWQT4JxvZ3dUh

Error:

In ParseToAstFailure.php line 22:

  AST failed to parse in located source (in /home/forge/censored-my-site-name/rel  
  eases/20220311140050/vendor/dyrynda/laravel-model-uuid/src/GeneratesUuid.php)                                                                           

In Lexer.php line 197:

  Undefined array key 403
ziming commented 2 years ago

If it help, the last time it worked fine, I was on PHP 8.0. Now I'm on PHP 8.1

ziming commented 2 years ago

@mpociot

So I went to look at https://github.com/nikic/PHP-Parser/commits/master/lib/PhpParser/Lexer.php

And looking at the git history. I saw that they have 2 commits that add supports for PHP 8.1 for Lexer.php

https://github.com/nikic/PHP-Parser/commits/master/lib/PhpParser/Lexer.php

Since Invoker is closed source. I would like to ask if you have updated nikic/PHP-Parser to the latest version.

Also like to mention I have since upgraded to laravel 9.5.1 and this problem still exist. Since I previously tested it on laravel 8 & PHP 8.1

mpociot commented 1 year ago

This will be fixed in the next version 👍

ziming commented 1 year ago

Awesome!