Skip to content

Conversation

shaedrich
Copy link
Contributor

No description provided.

@@ -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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Types taken from Memcached::setSaslAuthData()

@@ -287,6 +287,7 @@ protected function createDynamodbDriver(array $config)
/**
* Create new DynamoDb Client instance.
*
* @param array{region: string, endpoint?: string, key?: string, secret?: string, token?: string} $config
Copy link
Contributor Author

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

@shaedrich
Copy link
Contributor Author

@browner12 What do you dislike about this PR?

@LjjGit
Copy link
Contributor

LjjGit commented Jul 30, 2025

Can PphStorm recognize these formats?

@shaedrich
Copy link
Contributor Author

As far as I'm concerned, they are recognized by PHPStan as well as psalm, which should cover the majority of the ecosystem. I don't have PHPStorm installed to check explicitly, but assuming, it follows common sense, that should work, I'd say.

@taylorotwell taylorotwell marked this pull request as draft July 30, 2025 15:29
@shaedrich shaedrich changed the title Improve typing of arrays and callables [12.x] Improve typing of arrays and callables Aug 2, 2025
@@ -217,7 +217,7 @@ protected function createNullDriver()
/**
* Create an instance of the Redis cache driver.
*
* @param array $config
* @param array{connection?: sttring, lock_connection?: string} $config
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

‘Sttring’ ;)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Damn, thanks 👍🏻

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.

4 participants