Skip to content

Commit c0e175d

Browse files
committed
Update testing dependencies
1 parent dccc924 commit c0e175d

File tree

5 files changed

+22
-15
lines changed

5 files changed

+22
-15
lines changed

composer.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@
4646
"ext-json": "*"
4747
},
4848
"require-dev": {
49-
"friendsofphp/php-cs-fixer": "^2.19||~v3.4.0",
49+
"friendsofphp/php-cs-fixer": "^v3.5.0",
5050
"guzzlehttp/guzzle": "^7.0",
5151
"guzzlehttp/psr7": "^1.6||^2.0",
52-
"phpstan/phpstan": "^0.12.89",
53-
"phpstan/phpstan-phpunit": "^0.12.20",
54-
"phpstan/phpstan-strict-rules": "^0.12.9",
55-
"phpunit/phpunit": "^9.5",
56-
"psalm/plugin-phpunit": "^0.15.0",
52+
"phpstan/phpstan": "^1.4.6.",
53+
"phpstan/phpstan-phpunit": "^1.0.0",
54+
"phpstan/phpstan-strict-rules": "^1.1.0",
55+
"phpunit/phpunit": "^9.5.13",
56+
"psalm/plugin-phpunit": "^0.15.2",
5757
"psr/http-factory": "^1.0",
5858
"psr/simple-cache": "^1.0",
5959
"symfony/cache": "^v5.0",
60-
"vimeo/psalm": "^4.3"
60+
"vimeo/psalm": "^4.20"
6161
},
6262
"suggest": {
6363
"psr/http-client-implementation": "To use the storage functionnality which depends on PSR-18",

phpstan.neon

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,12 @@ includes:
44
- vendor/phpstan/phpstan-phpunit/rules.neon
55
parameters:
66
ignoreErrors:
7+
- message: '#has no value type specified in iterable type array.#'
8+
path: src/Rules.php
9+
- message: '#has parameter \$(properties|rules|list|tmpList) with no value type specified in iterable type array.#'
10+
path: src/Rules.php
11+
- message: "#Cannot access offset '!' on mixed.#"
12+
path: src/Rules.php
13+
- message: '#Variable \$line on left side of \?\? always exists and is not nullable.#'
14+
path: src/Rules.php
715
reportUnmatchedIgnoredErrors: true

src/DomainName.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public function withLabel(int $key, $label): self;
101101
* If $key is non-negative, the removed label will be the label at $key position from the start.
102102
* If $key is negative, the removed label will be the label at $key position from the end.
103103
*
104-
* @param int ...$keys
105104
*
106105
* @throws CannotProcessHost If the key is out of bounds
107106
*/

src/Rules.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ final class Rules implements PublicSuffixList
3636
/**
3737
* PSL rules as a multidimensional associative array.
3838
*
39-
* @var array<string, array<array>>
39+
* @var array{ICANN_DOMAINS: array<array>, PRIVATE_DOMAINS: array<array>}
4040
*/
4141
private array $rules;
4242

4343
/**
44-
* @param array<string, array<array>> $rules
44+
* @param array{ICANN_DOMAINS: array<array>, PRIVATE_DOMAINS: array<array>} $rules
4545
*/
4646
private function __construct(array $rules)
4747
{
@@ -84,7 +84,7 @@ public static function fromString($content): self
8484
/**
8585
* Convert the Public Suffix List into an associative, multidimensional array.
8686
*
87-
* @return array<string, array<array>>
87+
* @return array{ICANN_DOMAINS: array<array>, PRIVATE_DOMAINS: array<array>}
8888
*/
8989
private static function parse(string $content): array
9090
{
@@ -165,7 +165,7 @@ private static function addRule(array $list, array $ruleParts): array
165165
}
166166

167167
/**
168-
* @param array{rules:array<string, array<array>>} $properties
168+
* @param array{rules:array{ICANN_DOMAINS: array<array>, PRIVATE_DOMAINS: array<array>}} $properties
169169
*/
170170
public static function __set_state(array $properties): self
171171
{

src/TopLevelDomainsTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function testGetTopLevelDomain($tld): void
193193
}
194194

195195
/**
196-
* @return iterable<string,array>
196+
* @return iterable<string,array<object|string>>
197197
*/
198198
public function validDomainProvider(): iterable
199199
{
@@ -286,7 +286,7 @@ public function testGetTopLevelDomainWithUnregisteredTLD(): void
286286
}
287287

288288
/**
289-
* @return iterable<string,array>
289+
* @return iterable<string,array<string|object>>
290290
*/
291291
public function validTldProvider(): iterable
292292
{
@@ -312,7 +312,7 @@ public function __toString(): string
312312
}
313313

314314
/**
315-
* @return iterable<string,array>
315+
* @return iterable<string,array<object|string|null>>
316316
*/
317317
public function invalidTldProvider(): iterable
318318
{

0 commit comments

Comments
 (0)