-
-
Notifications
You must be signed in to change notification settings - Fork 670
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error, unexpected T_NS_SEPARATOR, expecting ';' or '{' on line 3 #3834
Comments
Hi, thanks for perfect report! Could you try |
Now it's giving me
will try to manually add it in a minute, but shouldn't it just take the composer autoloader? |
I am using an Eloquent mixin on my Models in app/models which is generated to help IDE hint the magic functions that are provided by Laravel. It is stated as @mixin Eloquent but is not meant to be load/included by a project. Anyway now I get a memory leak present somehow.
2/152 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░] 1%Segmentation fault (core dumped)
|
What specific lines in Try running only on the file
Then removing code line by line from the file and re-run Rector again, untill the error disappears. It should be 5-10 lines in the end. |
I'll release new Rector in few minutes |
Done: https://github.com/rectorphp/rector/releases/tag/v0.7.56 Closing as former issue is resolved. Please open new issue with the minimal PHP code that causes segfault. |
This works
this won't
The underlying property doesn't exist, it's only as a @Property float $price and is available via Laravel's Model magic. MAYBE the problem is that BaseModel, which I am extending in Cart class, is defined on two places: that generated ide helper & actual BaseModel class |
Let's keep it focused in one place: #3836 |
Why 0.756 use nikic/php-parser 4.7 now ? |
There should be newer versions, see: Could you verify the problem is still there? |
The problem is still there using 0.7.55 |
I see even 0.7.59 version on packagist |
yes but it uses nikic/php-parser: ^4.7 wich we cannot have in our project, only 4.6 |
We cannot use older php-parser version because of compatibility with PHPStan. What's the minimal PHP code causing the issue? That might be a bug in php-parser |
we use psalm in our project but nothing existing for codingmachine safe. So to prevent using stan only for codingmachine safe, we want to use rector as suggested here https://github.com/thecodingmachine/safe in our CI as rector --dry-run. |
Bug Report
So I am not sure whether it's a parser issue or a rector issue, but I ran vendor/bin/rector process app -v (I thought -v is verbose but it's not the case I think)
with this config (rector.php in root folder)
I get this error
If I remove the -v modifier, I get this instead
(the notice is getting out many times)
After these, I get some errrors such as
Or also
Minimal PHP Code Causing Issue
Expected Behaviour
I can't show you the demo permalink because I got this warning
The text was updated successfully, but these errors were encountered: