-
Notifications
You must be signed in to change notification settings - Fork 11.7k
Fix Arr::array default to use empty array #57012
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
Closed
Closed
Conversation
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
…g actions and names (#56920) * Ensure cached and uncached routes share same precedence * formatting * Formatting * formatting * Fix tests
* SQLite: Allow setting any pragmas * formatting --------- Co-authored-by: Taylor Otwell <[email protected]>
* Add phpredis pack ignore numbers support * Update PhpRedisConnector.php --------- Co-authored-by: Taylor Otwell <[email protected]>
* Allow for BackedEnum on dynamic blade component * use enum_value() helper function Co-authored-by: Andrew Brown <[email protected]> * Fix missing function import --------- Co-authored-by: Andrew Brown <[email protected]>
* [REMOVE] Redundant array access * [retrigger tests] * Revert "[retrigger tests]" This reverts commit 9e83eb8.
…scopes (#56957) * Add method to remove all except specified global scopes * Fix parameter type hint * Add test for removing all global scopes except specified ones * Update Builder.php --------- Co-authored-by: Taylor Otwell <[email protected]>
* add --wisper option to schedule:work * Update ScheduleWorkCommand.php --------- Co-authored-by: Taylor Otwell <[email protected]>
Co-authored-by: Arshid <[email protected]>
if you're not passing a second parameter with a closure to `with()`, it doesn't do anything other than return the value. this is verrrry old legacy code from 10+ years ago that isn't necessary anymore to chain.
* Add callback support to takeUntilTimeout in LazyCollection The takeUntilTimeout method now accepts an optional callback that is invoked when the timeout is reached, providing the last yielded value and key. Tests and type assertions have been updated to cover the new callback functionality. * Fix indentation * Simplify initialization of `$timedOutWith` in SupportLazyCollectionTest
if no second argument is passed to `with()` it simply returns the value, so there's no reason to call it when we only pass 1 argument. while the performance impact it probably negligible, it does take 1 thing out of the call stack, which is helpful.
* fix: correct typo in docblock for setName method * fix: update return type in getRouteDomain method to string|null
helps with better diffs
used the following regex to find them, not perfect, but it gets you close:
```
[^,]
(\ *)\)\ \{
```
* feat(session): adding new method to remeber value for a given time * wip * feat(cache): adding session driver skeleton * feat(cache): finish cache session driver * test(cache): adding tests for cache session driver * wip * wip * wip * wip * refactor(cache): some adjusts * wip * formatting * refactor(cache): some adjusts in cache session driver * Update cache.php * Update CacheManager.php * formatting --------- Co-authored-by: Taylor Otwell <[email protected]>
…n(...)] attributes on models (#56966) * test: add fixture resources for Eloquent resource collection tests * feat: add UseResource and UseResourceCollection attributes for model resource transformation * refactor: update parameter type hints for resource and resource collection attributes * formatting --------- Co-authored-by: Taylor Otwell <[email protected]>
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.
This PR updates the Arr::array() method to use an empty array ([]) as the default return value when no key exists, instead of null.
Previously, the method signature allowed a null default (?array $default = null), but this created a mismatch with the strict : array return type. If a developer passed null as the default, the method would still throw an exception because null is not an array.