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

Fix Collection::implode with \Stringable objects #54630

Merged

Conversation

timkelty
Copy link
Contributor

Was incorrectly checking for \Illuminate\Support\Stringable.

Verified

This commit was signed with the committer’s verified signature.
eliottness Eliott Bouhana

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
WS
@taylorotwell taylorotwell merged commit 9626c3d into laravel:11.x Feb 17, 2025
44 checks passed
@sebdesign
Copy link
Contributor

sebdesign commented Feb 18, 2025

@taylorotwell This PR breaks implode on eloquent collections!

The Model implements the \Stringable interface, so the condition is never truthy when the collection contains eloquent models.

E.g. calling something like $posts->implode('title', ',') no longer implodes the plucked titles from the post models.

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.

None yet

3 participants