Skip to content

Commit d9442bc

Browse files
authored
Merge pull request #340 from cakephp/updates
Updates
2 parents 71fd24a + 9852b1d commit d9442bc

File tree

4 files changed

+47
-8
lines changed

4 files changed

+47
-8
lines changed

composer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"require-dev": {
2121
"cakephp/cakephp": "^4.0",
22-
"cakephp/cakephp-codesniffer": "dev-next",
22+
"cakephp/cakephp-codesniffer": "^4.0",
2323
"phpunit/phpunit": "^8.0",
2424
"firebase/php-jwt": "^5.0"
2525
},
@@ -31,8 +31,6 @@
3131
"cakephp/utility": "Provides CakePHP security methods. Required for the JWT adapter and Legacy password hasher."
3232
},
3333
"license": "MIT",
34-
"minimum-stability": "dev",
35-
"prefer-stable": true,
3634
"autoload": {
3735
"psr-4": {
3836
"Authentication\\": "src/"
@@ -72,7 +70,7 @@
7270
"@phpstan",
7371
"@psalm"
7472
],
75-
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan-shim:^0.11 psalm/phar:^3.5 && mv composer.backup composer.json",
73+
"stan-setup": "cp composer.json composer.backup && composer require --dev phpstan/phpstan:^0.12 psalm/phar:^3.7 && mv composer.backup composer.json",
7674
"test": "phpunit",
7775
"test-coverage": "phpunit --coverage-clover=clover.xml"
7876
},

phpstan.neon

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,44 @@
11
parameters:
2-
level: 5
2+
level: 6
3+
checkMissingIterableValueType: false
4+
checkGenericClassInNonGenericObjectType: false
35
ignoreErrors:
4-
- '#Result of && is always false#'
5-
- '#Else branch is unreachable because ternary operator condition is always true#'
6+
-
7+
message: "#^Strict comparison using \\=\\=\\= between string and false will always evaluate to false\\.$#"
8+
count: 1
9+
path: src/Authenticator/HttpDigestAuthenticator.php
10+
11+
-
12+
message: "#^Result of && is always false\\.$#"
13+
count: 1
14+
path: src/Authenticator/Result.php
15+
16+
-
17+
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
18+
count: 1
19+
path: src/Authenticator/Result.php
20+
21+
-
22+
message: "#^Result of && is always false\\.$#"
23+
count: 1
24+
path: src/Identity.php
25+
26+
-
27+
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
28+
count: 1
29+
path: src/Identity.php
30+
31+
-
32+
message: "#^Result of && is always false\\.$#"
33+
count: 1
34+
path: src/Middleware/AuthenticationMiddleware.php
35+
36+
-
37+
message: "#^Else branch is unreachable because ternary operator condition is always true\\.$#"
38+
count: 2
39+
path: src/Middleware/AuthenticationMiddleware.php
40+
41+
-
42+
message: "#^Method Authentication\\\\UrlChecker\\\\DefaultUrlChecker\\:\\:check\\(\\) has parameter \\$urls with no typehint specified\\.$#"
43+
count: 1
44+
path: src/UrlChecker/DefaultUrlChecker.php

src/Middleware/AuthenticationMiddleware.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ class AuthenticationMiddleware implements MiddlewareInterface
5050
* AuthenticationComponent::allowUnauthenticated()
5151
* - `queryParam` - Set to true to have unauthenticated redirects contain a `redirect` query string
5252
* parameter with the previously blocked URL.
53+
*
54+
* @var array
5355
*/
5456
protected $_defaultConfig = [];
5557

src/UrlChecker/DefaultUrlChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class DefaultUrlChecker implements UrlCheckerInterface
3838
];
3939

4040
/**
41-
* {@inheritDoc}
41+
* @inheritDoc
4242
*/
4343
public function check(ServerRequestInterface $request, $urls, array $options = []): bool
4444
{

0 commit comments

Comments
 (0)