Skip to content

fix(ArrayKeyFirstLastRector): Skip exection when pointer is changed#5038

Merged
samsonasik merged 3 commits intorectorphp:mainfrom
scyzoryck:fix-array-key-first-next-call
Sep 17, 2023
Merged

fix(ArrayKeyFirstLastRector): Skip exection when pointer is changed#5038
samsonasik merged 3 commits intorectorphp:mainfrom
scyzoryck:fix-array-key-first-next-call

Conversation

@scyzoryck
Copy link
Copy Markdown
Contributor

@scyzoryck scyzoryck commented Sep 17, 2023

Hello!

Fix rectorphp/rector#8203
It looks like skipping next node was also causing the issue - next call was not checked inside the loop.

Comment thread rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php Outdated
Comment thread rules/Php73/Rector/FuncCall/ArrayKeyFirstLastRector.php
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
…ure/skip_next_call_after.php.inc

Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
@samsonasik samsonasik merged commit c956f86 into rectorphp:main Sep 17, 2023
@samsonasik
Copy link
Copy Markdown
Member

Thank you @scyzoryck

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect behavior of ArrayKeyFirstLastRector

2 participants