Skip to content

Commit 1b10d62

Browse files
Fix phpstan issue with returned array highlight in Solr and Memory In and NotIn Conditions (#660)
Fixes following PHPStan issue by ignore them as we expected the fields are created in the expected document schema: ``` ------ ------------------------------------------------------------------------------------------ Line src/SolrSearcher.php ------ ------------------------------------------------------------------------------------------ 203 Parameter #2 $array of function implode expects array<string>, array<mixed, mixed> given . 🪪 argument.type ------ ------------------------------------------------------------------------------------------ ``` ``` ------ ----------------------------------------------------------------------------------------- Line src/MemorySearcher.php ------ ----------------------------------------------------------------------------------------- 198 Parameter #2 $arrays of function array_intersect expects an array of values castable to string, array<mixed, mixed> given. 🪪 argument.type 208 Parameter #2 $arrays of function array_intersect expects an array of values castable to string, array<mixed, mixed> given. 🪪 argument.type ------ ----------------------------------------------------------------------------------------- ```
1 parent ba281c0 commit 1b10d62

File tree

25 files changed

+1123
-1098
lines changed

25 files changed

+1123
-1098
lines changed

.examples/laravel/composer.lock

Lines changed: 146 additions & 145 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.examples/mezzio/composer.lock

Lines changed: 67 additions & 66 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.examples/spiral/composer.lock

Lines changed: 145 additions & 142 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.examples/symfony/composer.lock

Lines changed: 118 additions & 118 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.examples/symfony/config/reference.php

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -208,29 +208,29 @@
208208
* initial_marking?: list<scalar|Param|null>,
209209
* events_to_dispatch?: list<string|Param>|null,
210210
* places?: list<array{ // Default: []
211-
* name: scalar|Param|null,
212-
* metadata?: list<mixed>,
211+
* name?: scalar|Param|null,
212+
* metadata?: array<string, mixed>,
213213
* }>,
214-
* transitions: list<array{ // Default: []
215-
* name: string|Param,
214+
* transitions?: list<array{ // Default: []
215+
* name?: string|Param,
216216
* guard?: string|Param, // An expression to block the transition.
217217
* from?: list<array{ // Default: []
218-
* place: string|Param,
218+
* place?: string|Param,
219219
* weight?: int|Param, // Default: 1
220220
* }>,
221221
* to?: list<array{ // Default: []
222-
* place: string|Param,
222+
* place?: string|Param,
223223
* weight?: int|Param, // Default: 1
224224
* }>,
225225
* weight?: int|Param, // Default: 1
226-
* metadata?: list<mixed>,
226+
* metadata?: array<string, mixed>,
227227
* }>,
228-
* metadata?: list<mixed>,
228+
* metadata?: array<string, mixed>,
229229
* }>,
230230
* },
231231
* router?: bool|array{ // Router configuration
232232
* enabled?: bool|Param, // Default: false
233-
* resource: scalar|Param|null,
233+
* resource?: scalar|Param|null,
234234
* type?: scalar|Param|null,
235235
* cache_dir?: scalar|Param|null, // Deprecated: Setting the "framework.router.cache_dir.cache_dir" configuration option is deprecated. It will be removed in version 8.0. // Default: "%kernel.build_dir%"
236236
* default_uri?: scalar|Param|null, // The default URI used to generate URLs in a non-HTTP context. // Default: null
@@ -360,10 +360,10 @@
360360
* mapping?: array{
361361
* paths?: list<scalar|Param|null>,
362362
* },
363-
* default_context?: list<mixed>,
363+
* default_context?: array<string, mixed>,
364364
* named_serializers?: array<string, array{ // Default: []
365365
* name_converter?: scalar|Param|null,
366-
* default_context?: list<mixed>,
366+
* default_context?: array<string, mixed>,
367367
* include_built_in_normalizers?: bool|Param, // Whether to include the built-in normalizers // Default: true
368368
* include_built_in_encoders?: bool|Param, // Whether to include the built-in encoders // Default: true
369369
* }>,
@@ -427,7 +427,7 @@
427427
* },
428428
* messenger?: bool|array{ // Messenger configuration
429429
* enabled?: bool|Param, // Default: false
430-
* routing?: array<string, array{ // Default: []
430+
* routing?: array<string, string|array{ // Default: []
431431
* senders?: list<scalar|Param|null>,
432432
* }>,
433433
* serializer?: array{
@@ -440,7 +440,7 @@
440440
* transports?: array<string, string|array{ // Default: []
441441
* dsn?: scalar|Param|null,
442442
* serializer?: scalar|Param|null, // Service id of a custom serializer to use. // Default: null
443-
* options?: list<mixed>,
443+
* options?: array<string, mixed>,
444444
* failure_transport?: scalar|Param|null, // Transport name to send failed messages to (after all retries have failed). // Default: null
445445
* retry_strategy?: string|array{
446446
* service?: scalar|Param|null, // Service id to override the retry strategy entirely. // Default: null
@@ -462,7 +462,7 @@
462462
* allow_no_senders?: bool|Param, // Default: true
463463
* },
464464
* middleware?: list<string|array{ // Default: []
465-
* id: scalar|Param|null,
465+
* id?: scalar|Param|null,
466466
* arguments?: list<mixed>,
467467
* }>,
468468
* }>,
@@ -634,7 +634,7 @@
634634
* lock_factory?: scalar|Param|null, // The service ID of the lock factory used by this limiter (or null to disable locking). // Default: "auto"
635635
* cache_pool?: scalar|Param|null, // The cache pool to use for storing the current limiter state. // Default: "cache.rate_limiter"
636636
* storage_service?: scalar|Param|null, // The service ID of a custom storage implementation, this precedes any configured "cache_pool". // Default: null
637-
* policy: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
637+
* policy?: "fixed_window"|"token_bucket"|"sliding_window"|"compound"|"no_limit"|Param, // The algorithm to be used by this limiter.
638638
* limiters?: list<scalar|Param|null>,
639639
* limit?: int|Param, // The maximum allowed hits in a fixed interval or burst.
640640
* interval?: scalar|Param|null, // Configures the fixed interval if "policy" is set to "fixed_window" or "sliding_window". The value must be a number followed by "second", "minute", "hour", "day", "week" or "month" (or their plural equivalent).
@@ -679,7 +679,7 @@
679679
* enabled?: bool|Param, // Default: false
680680
* message_bus?: scalar|Param|null, // The message bus to use. // Default: "messenger.default_bus"
681681
* routing?: array<string, array{ // Default: []
682-
* service: scalar|Param|null,
682+
* service?: scalar|Param|null,
683683
* secret?: scalar|Param|null, // Default: ""
684684
* }>,
685685
* },
@@ -750,7 +750,10 @@ final class App
750750
*/
751751
public static function config(array $config): array
752752
{
753-
return AppReference::config($config);
753+
/** @var ConfigType $config */
754+
$config = AppReference::config($config);
755+
756+
return $config;
754757
}
755758
}
756759

0 commit comments

Comments
 (0)