Skip to content

Commit 84dbb87

Browse files
authored
Merge pull request #702 from cakephp/cleanup
Cleanup deprecated stuff.
2 parents 3ae3563 + 96cf7c8 commit 84dbb87

File tree

4 files changed

+2
-65
lines changed

4 files changed

+2
-65
lines changed

composer.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,7 @@
7070
"cs-check": "phpcs --colors -p src/ tests/",
7171
"cs-fix": "phpcbf --colors -p src/ tests/",
7272
"phpstan": "tools/phpstan analyse",
73-
"psalm": "tools/psalm --show-info=false",
74-
"psalm-baseline": "tools/psalm --set-baseline=psalm-baseline.xml",
75-
"stan": [
76-
"@phpstan",
77-
"@psalm"
78-
],
73+
"stan": "@phpstan",
7974
"stan-baseline": "tools/phpstan --generate-baseline",
8075
"stan-setup": "phive install",
8176
"test": "phpunit",

psalm-baseline.xml

-2
This file was deleted.

psalm.xml

-32
This file was deleted.

src/Authenticator/CookieAuthenticator.php

+1-25
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
use ArrayAccess;
2020
use Authentication\Identifier\AbstractIdentifier;
21-
use Authentication\Identifier\IdentifierCollection;
2221
use Authentication\PasswordHasher\PasswordHasherTrait;
2322
use Authentication\UrlChecker\UrlCheckerTrait;
2423
use Cake\Http\Cookie\Cookie;
@@ -27,12 +26,11 @@
2726
use InvalidArgumentException;
2827
use Psr\Http\Message\ResponseInterface;
2928
use Psr\Http\Message\ServerRequestInterface;
30-
use RuntimeException;
3129

3230
/**
3331
* Cookie Authenticator
3432
*
35-
* Authenticates an identity based on a cookies data.
33+
* Authenticates an identity based on a cookie data.
3634
*/
3735
class CookieAuthenticator extends AbstractAuthenticator implements PersistenceInterface
3836
{
@@ -57,28 +55,6 @@ class CookieAuthenticator extends AbstractAuthenticator implements PersistenceIn
5755
'salt' => true,
5856
];
5957

60-
/**
61-
* @inheritDoc
62-
*/
63-
public function __construct(IdentifierCollection $identifiers, array $config = [])
64-
{
65-
$this->_checkCakeVersion();
66-
67-
parent::__construct($identifiers, $config);
68-
}
69-
70-
/**
71-
* Checks the CakePHP Version by looking for the cookie implementation
72-
*
73-
* @return void
74-
*/
75-
protected function _checkCakeVersion(): void
76-
{
77-
if (!class_exists(Cookie::class)) {
78-
throw new RuntimeException('Install CakePHP version >=3.5.0 to use the `CookieAuthenticator`.');
79-
}
80-
}
81-
8258
/**
8359
* @inheritDoc
8460
*/

0 commit comments

Comments
 (0)