Repository navigation
fix(request): rename the array macro to inputArray - #331
Merged
Merged
Conversation
Laravel 11+ ships a native Request::array(), and native methods win over macros, so on Laravel 12 this macro silently stops running. `?sort=a,b` and `?without=a,b` become a single value, and a sorted index returns a 500 for an unknown column. Renaming it now is safe on Laravel 10 and keeps the comma splitting after the upgrade. Callers and test harnesses follow the new name, with no behaviour change.
Released extensions still call the old name, and removing it breaks them against a core-api with this change. Storefront's suite hit that through released fleetops.
This was referenced Nov 6, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the
Request::array()macro toinputArray(), with its 46 callers.arraystays as a deprecated alias, so released extensions that still call it keep working on Laravel 10. Storefront's suite hit that through released fleetops. The Laravel 12 PR removes the alias, since the native method shadows it there anyway.Laravel 11+ ships a native
Request::array(). Native methods win over macros, so on Laravel 12 this macro silently stops running and nothing errors:GET /int/v1/places?limit=5&sort=-created_at,nameUnknown column 'created_at,name'?without=a,bis affected the same way. With an empty table it looks fine, because pagination skips the sorted query.The rename is safe on Laravel 10, so it can land before the upgrade. This has no behaviour change; the macro body is identical. As before, the macro takes one argument, so the second argument some callers pass (
$request->array('from', [])) is still ignored. I left that alone.Testing
composer test:uniton Laravel 10 at this commit: 2,375 passed, 14,701 assertions, the same as the untouchedmaincommit.The Laravel 12 failure was reproduced over HTTP in the upgrade spike, on both Octane and
php -S. This branch has not itself been run on Laravel 12; that's the core-api Laravel 12 PR, which stacks on this one.Merge order
Merge this first. These extension PRs call the new name and need a core-api release containing it:
fleetops, storefront, customer-portal, flespi, solid and pallet, all on branch
fix/request-input-array.