-
Notifications
You must be signed in to change notification settings - Fork 11.5k
[12.x] Improve typing of arrays and callables #56470
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
Draft
shaedrich
wants to merge
25
commits into
laravel:12.x
Choose a base branch
from
shaedrich:type-arrays-and-callables-properly
base: 12.x
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
1a5dba6
Type $handler callable in Connection::whenQueryingForLongerThan()
shaedrich 60b5cf4
Properly type $queryDurationHandlers as list of a associative arrays
shaedrich db1ab6e
Type rest of the Connection class
shaedrich 45a73d9
Improve typing of closure and array
shaedrich 8274fdc
Narrow array down
shaedrich 731719a
Merge branch 'laravel:12.x' into type-arrays-and-callables-properly
shaedrich 333123f
Improve join callback typing
shaedrich 83c84ff
Improve typing in Controller
shaedrich 898d79d
Improve types for ControllerMiddlewareOptions
shaedrich 1f59536
Improve callable and array typing for PendingRequest
shaedrich 0f0ae3f
Add types to CacheManager
shaedrich 3c74adf
Type $prefixed
shaedrich f994214
Type lottery in DatabaseLock class
shaedrich f49a3e0
Type arrays in MemcachedConnector
shaedrich ce5ebf7
Make weight option optional
shaedrich ad89ac1
make weight optional in MemcachedConnector server configuration
shaedrich d8f5208
Type callback of Localizable::withLocale() and note its return value …
shaedrich 173d50f
Type Closure in PendingProcess
shaedrich ac92ef0
Typo
shaedrich 0c4ae2e
Fix typo
shaedrich 8e40407
Type $$currentCursorResolver Closure in AbstractCursorPaginator
shaedrich c8dce8a
Type closure in HidesAttributes.php
shaedrich ce89cb5
StyleCI
shaedrich fe59f95
Type connection Closure in ConnectionFactory
shaedrich 862684f
Type Closure return value of ManagesFrequencies::inTimeInterval()
shaedrich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,10 @@ class MemcachedConnector | |
/** | ||
* Create a new Memcached connection. | ||
* | ||
* @param array $servers | ||
* @param array{host: string, port: int, weight?: int}[] $servers | ||
* @param string|null $connectionId | ||
* @param array $options | ||
* @param array $credentials | ||
* @param array{string, string} $credentials | ||
* @return \Memcached | ||
*/ | ||
public function connect(array $servers, $connectionId = null, array $options = [], array $credentials = []) | ||
|
@@ -39,7 +39,7 @@ public function connect(array $servers, $connectionId = null, array $options = [ | |
* Get a new Memcached instance. | ||
* | ||
* @param string|null $connectionId | ||
* @param array $credentials | ||
* @param array{string, string} $credentials | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Types taken from |
||
* @param array $options | ||
* @return \Memcached | ||
*/ | ||
|
@@ -73,7 +73,7 @@ protected function createMemcachedInstance($connectionId) | |
* Set the SASL credentials on the Memcached connection. | ||
* | ||
* @param \Memcached $memcached | ||
* @param array $credentials | ||
* @param array{string, string} $credentials | ||
* @return void | ||
*/ | ||
protected function setCredentials($memcached, $credentials) | ||
|
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Types taken from
\Aws\DynamoDb\DynamoDbClient