Skip to content

[14.x] Allow Collection::getOrPut() key to be null - #61621

Merged
taylorotwell merged 1 commit into
laravel:masterfrom
jackbayliss:14.x-deg-or-put
Sep 17, 2026
Merged

taylorotwell merged 1 commit into
laravel:masterfrom
jackbayliss:14.x-deg-or-put

Conversation

@jackbayliss

@jackbayliss jackbayliss commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Good day Taylor!

Static analysis is failing https://github.com/laravel/framework/actions/runs/35187886789, this only affects 14.x cos something was pr'd to master afaik.

testGetOrPutWithNoKey proves the key can be null.

This PR adjusts the docblock (boring) so its now the same as the get method.

Sooo, this fixes stan crying

@github-actions

Copy link
Copy Markdown

Thanks for submitting a PR!

Note that draft PRs are not reviewed. If you would like a review, please mark your pull request as ready for review in the GitHub user interface.

Pull requests that are abandoned in draft may be closed due to inactivity.

@jackbayliss
jackbayliss marked this pull request as ready for review September 17, 2026 09:17
@taylorotwell
taylorotwell merged commit 93ef135 into laravel:master Sep 17, 2026
48 checks passed
@jackbayliss
jackbayliss deleted the 14.x-deg-or-put branch September 17, 2026 18:46
binaryfire added a commit to hypervel/components-backup that referenced this pull request Oct 1, 2026
Handle string outer keys in collapseWithKeys and describe receiver types after collection mutation, including nullable keys. Return base collections for Eloquent duplicate attribute or callback values; keep model collections when no callback is supplied.

Correct mapped duplicate and sum types, annotate empty builders and Wayfinder defaults, and preserve explicit null-key behavior without PHP 8.5 deprecations. Consolidate overlapping coverage. Collection tests and full type analysis pass.

Upstream:
laravel/framework#61539
laravel/framework#61571
laravel/framework#61572
laravel/framework#61578
laravel/framework#61597
laravel/framework#61611
laravel/framework#61621

Source: laravel/framework at 7068848dfe48fc3a433598e09ce798799d442a52.
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