Skip to content

Simplify non-empty-array removal in array_push/array_unshift#1552

Merged
ondrejmirtes merged 1 commit intophpstan:1.8.xfrom
herndlm:simplify-array-push-non-empty-array-removal
Jul 26, 2022
Merged

Simplify non-empty-array removal in array_push/array_unshift#1552
ondrejmirtes merged 1 commit intophpstan:1.8.xfrom
herndlm:simplify-array-push-non-empty-array-removal

Conversation

@herndlm
Copy link
Copy Markdown
Contributor

@herndlm herndlm commented Jul 25, 2022

The previous way I did that was just an overkill and hard to read. This is already the else branch that deals with generic arrays only. Since this just recently made problems it is luckily relatively well tested.

@herndlm herndlm changed the title Simplify non-empty-array removel in array_push/array_unshift Simplify non-empty-array removal in array_push/array_unshift Jul 25, 2022
@herndlm herndlm force-pushed the simplify-array-push-non-empty-array-removal branch from 446a78c to 8806e4f Compare July 25, 2022 19:37
@herndlm herndlm marked this pull request as ready for review July 25, 2022 20:12
@herndlm herndlm marked this pull request as draft July 25, 2022 21:03
@herndlm herndlm force-pushed the simplify-array-push-non-empty-array-removal branch 2 times, most recently from 42aa916 to 2dbd086 Compare July 25, 2022 21:20
@herndlm herndlm force-pushed the simplify-array-push-non-empty-array-removal branch from 2dbd086 to 20c533e Compare July 26, 2022 06:53
@herndlm
Copy link
Copy Markdown
Contributor Author

herndlm commented Jul 26, 2022

should be good, looks like the one composer failure is unrelated and happening in other PRs too. sorry for the pushes, wanted to double-check that :)

@herndlm herndlm marked this pull request as ready for review July 26, 2022 07:02
@ondrejmirtes ondrejmirtes merged commit 5d044df into phpstan:1.8.x Jul 26, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Thank you! This is the way to go - phase out the wrong way of doing things (remove it in places where it's not necessary), introduce a new better way, gradually, over many PRs :)

@herndlm herndlm deleted the simplify-array-push-non-empty-array-removal branch July 26, 2022 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants