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

refactor: Update every operation. #242

Merged
merged 1 commit into from Mar 22, 2022
Merged

Conversation

drupol
Copy link
Collaborator

@drupol drupol commented Mar 5, 2022

Make it more flexible and fast.

This PR:

  • Update every operation
  • Need to update TakeWhile and DropWhile
  • It breaks backward compatibility
  • Is covered by unit tests
  • Has static analysis tests (psalm, phpstan)
  • Has documentation

@drupol drupol self-assigned this Mar 5, 2022
@drupol drupol force-pushed the misc/update-callback-reducer-signature branch 3 times, most recently from 5f22391 to 3c6bb94 Compare March 7, 2022 08:16
Base automatically changed from misc/update-callback-reducer-signature to master March 7, 2022 08:22
@drupol drupol force-pushed the misc/update-every-operation branch from 1f59d66 to 10a5693 Compare March 7, 2022 08:26
@github-actions
Copy link

Since this pull request has not had any activity within the last 5 days, I have marked it as stale.
I will close it if no further activity occurs within the next 5 days.

@github-actions github-actions bot added the stale label Mar 12, 2022
@drupol drupol removed the stale label Mar 12, 2022
@drupol drupol force-pushed the misc/update-every-operation branch 4 times, most recently from 2dccb4c to a65e3d0 Compare March 14, 2022 09:32
@drupol drupol force-pushed the misc/update-every-operation branch 4 times, most recently from 3a1501f to b2abd1b Compare March 15, 2022 07:42
@@ -19,6 +19,7 @@
use function in_array;
use function is_array;
use function is_object;
use function is_scalar;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm did you add this manually or was it added by php-cs-fixer or something automatically? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

php-cs-fixer :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool, I guess it's not set up to import all native functions though, because there are others like array_shift and property_exists in this file that are not imported

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been added in here: PHP-CS-Fixer/PHP-CS-Fixer#6277

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a commit in master with these CS changes, so they don't pollute this branch.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah I see, I've typically used that rule with the all option rather than only the compiler optimized ones just for consistency, which is why I was surprised 😄

@drupol drupol force-pushed the misc/update-every-operation branch 2 times, most recently from 1a23877 to cbb6258 Compare March 19, 2022 19:33
AlexandruGG
AlexandruGG previously approved these changes Mar 20, 2022
@drupol drupol force-pushed the misc/update-every-operation branch 2 times, most recently from e15ee2e to 898abef Compare March 20, 2022 21:42
Make it more flexible and fast.
@drupol drupol force-pushed the misc/update-every-operation branch from 898abef to e013ae0 Compare March 20, 2022 21:45
@drupol drupol marked this pull request as ready for review March 22, 2022 07:33
@drupol drupol merged commit 7e9ecf7 into master Mar 22, 2022
@drupol drupol deleted the misc/update-every-operation branch March 22, 2022 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants