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

[5.5] Ensure getJobIds always return an array. #19232

Merged
merged 1 commit into from
May 16, 2017
Merged

[5.5] Ensure getJobIds always return an array. #19232

merged 1 commit into from
May 16, 2017

Conversation

lucasmichot
Copy link
Contributor

Ensure getJobIds always return an array.

@taylorotwell taylorotwell merged commit 2237669 into laravel:master May 16, 2017
@lucasmichot lucasmichot deleted the feature/master/getJobIds branch May 16, 2017 12:12
marcusmyers added a commit to marcusmyers/framework that referenced this pull request Jul 31, 2017
* 'master' of github.com:laravel/framework: (264 commits)
  fix bug
  Ensure getJobIds always return an array. (laravel#19232)
  Use Str:: class. (laravel#19221)
  Add a PasswordReset event. (laravel#19188)
  Remove all Arr:: helpers. (laravel#19219)
  Also test PHP 7.1 with lowest and stable setup. (laravel#19209)
  No need to reinstall Travis as we only test PHP>=7.0 (laravel#19210)
  Also disable Xdebug for PHP 7.1 (laravel#19211)
  Fix typo. (laravel#19216)
  Remove all Arr:: helpers. (laravel#19218)
  refactor container (laravel#19201)
  formatting
  fix formatting
  add thumb_url to Slack Attachment https://api.slack.com/docs/message-attachments#thumb_url
  Updated v5.5 release notes
  Use Authenticatable-functionality to update remember_token
  add method for easier error bag checking
  add `abilities` method to Gate contract (laravel#19173)
  update
  allow using assertSessionHasErrors to look into different error bags
  ...
@unlike777
Copy link

with Collections doesn't work

example:
Artisan::call("queue:retry", ['id' => collect(1, 2, 3)])

@GrahamCampbell
Copy link
Member

That is not a valid way to call the command.

@unlike777
Copy link

This problem, when upgrade from 5.4 to 5.5, prompted me to think that the Collection should have the __toArray() method implemented.

Because something as simple as a type cast (array) breaks behavior.

Despite the fact that collections work quietly with "foreach" and "count"
but they do not know how to work with (array)

It turns out that the Collections want to appear as an array, but are not converted to an array.

@GrahamCampbell
Copy link
Member

The code you had before was never supported, and worked by chance.

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.

4 participants