php-semver-checker icon indicating copy to clipboard operation
php-semver-checker copied to clipboard

Node::isEqual not properly comparing nodes with array properties

Open tomzx opened this issue 9 years ago • 2 comments
trafficstars

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

tomzx avatar May 15 '16 11:05 tomzx

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

x86demon avatar Apr 01 '20 08:04 x86demon

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.

tomzx avatar Apr 17 '20 04:04 tomzx