Skip to content
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

Node::isEqual not properly comparing nodes with array properties #88

Open
tomzx opened this issue May 15, 2016 · 2 comments
Open

Node::isEqual not properly comparing nodes with array properties #88

tomzx opened this issue May 15, 2016 · 2 comments

Comments

@tomzx
Copy link
Owner

tomzx commented May 15, 2016

A signature such as public function find($id, $columns = ['*']) contains an Array_ expression, which itself contains $items = []. When we iterate over the properties of a node, we should check if it is an array and if so, test if each corresponding elements is a \PhpParser\Node (and recursively call Node::isEqual) or directly compare the two.

Another simple and dirty solution would be to reuse the code in \PHPSemVerChecker\Comparator\Implementation (using the \PhpParser\NodeDumper and check for dump identicality).

Affected version: 0.10.0

@x86demon
Copy link

x86demon commented Apr 1, 2020

Hi, @tomzx. This bug affects our CI recently, do you have plans to fix this issue?

@tomzx
Copy link
Owner Author

tomzx commented Apr 17, 2020

Hello @x86demon, I do not have time to maintain this library anymore, so there are no plans for this issue to be fixed.

Feel free to create a PR, I'll be happy to review a solution.

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

No branches or pull requests

2 participants