peachpiecompiler/peachpie

some syntax error

xiangyi-wang opened this issue · 4 comments

Hi, the string is not recognized in this constructor. I'm not sure whether it's a syntax error or whether it doesn't support this writing method

PHP2014 Syntax error: unexpected token 'Sort' Flarum D:\Flarum\vendor\ramsey\collection\src\Sort.php 20
image
PHP2014 Syntax error: unexpected token 'string' Flarum D:\Flarum\vendor\ramsey\collection\src\Set.php 50
image

PHP4087 Argument 1 passed to is() must be of the type Pchp\Core\PhpValue, NULL given
} elseif ($def === null && !Nette\Utils\Validators::is(null, $type)) {

thank you for reporting that! It's a bug in the parser; for now you can workaround it by commenting /*string*/ out.

@jakubmisek thanks! I have one more question.How to modify this situation.
PHP4085 Property Ramsey\Uuid\Builder\FallbackBuilder::$builders cannot have type iterable Flarum D:\Flarum\vendor\ramsey\uuid\src\Builder\FallbackBuilder.php 33
image

PHP4087 Argument 1 passed to is() must be of the type Pchp\Core\PhpValue, NULL given Flarum D:\Flarum\vendor\nette\schema\src\Schema\Expect.php 89
image

Thank you, the syntax issues were fixed in 531bcf0

I'll prepare a release soon.

fixed, and updated PHP language level (syntax) to 8.2

Thank you @xiangyi-wang !