Closed jozsika closed 5 years ago
This issue relates to the new version of nikic/php-parser
and goaop/parser-reflection
and should be fixed for the 2.x and master branches
I had the same issue as @jozsika with the same dependency versions. As mentioned, downgrading to goaop/framework 2.2.0
, with the related dependency downgrades, fixed the problem.
I suggest these two fixes: https://github.com/goaop/framework/pull/417/files https://github.com/nikic/PHP-Parser/pull/596/files
@ahmed-abid @lisachenko it seems that the issue is resolved in master but the fix has not been released as a stable version. Was it just forgotten or there is a known issue with it?
not yet released
So, what would it take to get released?
@lisachenko I'm sorry to be bothering again. Can we please have a bugfix version published with the latest master unless there is a particular reason for it to be held back?
Hi, @ddinchev! I'm still worrying about releasing master branch, because it isn't well-tested and going to be next major version. Could you please check, how it works for you if you require it explicitly?
@lisachenko it works for me with two changes being necessary in AspectMock itself (the current issue here starts with AspectMock anyway). I did a PR for them: https://github.com/Codeception/AspectMock/pull/171
I still am wondering why the above fix does not get released under 2.4.0
for example. If there are issues, they can be addressed, people still can easily freeze their dependencies up to 2.3.x
. What do you think?
@ddinchev I'm open for discussions and PRs, unfortunately, I haven't time to work on project, this is why some issues are still open.
If your know the way how to fix this issue, then let's do this! )
Fixed in 2.3.2 with #419
Hi,
I get this error when the parsed code contains a dynamic method call using a variable, like $relation = $this->$getter(); from here: https://github.com/yiisoft/yii2/blob/6aa6359bbc76a85d039b8b2d04b39ef7db3d5093/framework/db/BaseActiveRecord.php#L1244
In vendor/goaop/framework/src/Instrument/Transformer/MagicConstantTransformer.php wrapReflectionGetFileName() $methodCallNode->name is the following:
Installed packages versions are:
Downgrading to goaop/framework 2.2.0 solves the problem, so: