-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
[5.5] Add operator support to Collection@partition #22352
Conversation
…/jasonvarga/framework into jasonvarga-feature/flysystem-cached-adapter
…laravel#22345) * Rollback to 7c8d3d0 Put the payload column of jobs table to the end of insert statements. * Rollback to 7c8d3d0 Put the payload column of jobs table to the end of insert statements. * Test: BuildDatabaseRecord returning 'payload' at the end (for 56ba5cc)
This is a breaking change |
@Dylan-DPC Dude, it is not... |
{ | ||
$partitions = [new static, new static]; | ||
|
||
$callback = $this->valueRetriever($callback); | ||
$callback = func_num_args() == 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't it be ===
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will not make any difference in this case.
func_num_args() will always return an integer, no real need to typecheck in this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically there's no difference indeed, just like 90% of other strict comparison cases out there. The difference here is we'll have an (arguably) better code standard.
Oh yeah it is not breaking. But having a parameter named "key" that takes in a callback as well is misleading |
Anyone that has derived from Collection and overridden the partition method will now see php warnings. I believe this indicates that the PR should target 5.6.
|
Looks good to me. Can you submit to master branch because of what @sisve noted. |
Enables this: