From 9ff4df7b18f4220e27793f3403cc6784daa9d3b8 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 1 Oct 2023 11:48:12 -0700 Subject: [PATCH 1/2] Fix deprecated method usage We didn't need to use query() here as find() will do the same work and is compatible with 4.5 as well. --- src/Identifier/Resolver/OrmResolver.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Identifier/Resolver/OrmResolver.php b/src/Identifier/Resolver/OrmResolver.php index 9068fa00..3785d3a4 100644 --- a/src/Identifier/Resolver/OrmResolver.php +++ b/src/Identifier/Resolver/OrmResolver.php @@ -56,7 +56,7 @@ public function find(array $conditions, $type = self::TYPE_AND) { $table = $this->getTableLocator()->get($this->_config['userModel']); - $query = $table->query(); + $query = $table->find(); $finders = (array)$this->_config['finder']; foreach ($finders as $finder => $options) { if (is_string($options)) { From 46e801f7c8957639db37205ad40f39de7e7e5390 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 1 Oct 2023 11:55:15 -0700 Subject: [PATCH 2/2] Fix dynamic property warnings --- .../Authenticator/HttpBasicAuthenticatorTest.php | 10 ++++++++++ .../Authenticator/HttpDigestAuthenticatorTest.php | 10 ++++++++++ tests/TestCase/Authenticator/JwtAuthenticatorTest.php | 5 +++++ .../Authenticator/SessionAuthenticatorTest.php | 7 +++++++ .../TestCase/Authenticator/TokenAuthenticatorTest.php | 10 ++++++++++ .../Middleware/AuthenticationMiddlewareTest.php | 10 ++++++++++ 6 files changed, 52 insertions(+) diff --git a/tests/TestCase/Authenticator/HttpBasicAuthenticatorTest.php b/tests/TestCase/Authenticator/HttpBasicAuthenticatorTest.php index f11fdb53..4f4a9920 100644 --- a/tests/TestCase/Authenticator/HttpBasicAuthenticatorTest.php +++ b/tests/TestCase/Authenticator/HttpBasicAuthenticatorTest.php @@ -37,6 +37,16 @@ class HttpBasicAuthenticatorTest extends TestCase 'core.Users', ]; + /** + * @var \Authentication\IdentifierCollection + */ + protected $identifiers; + + /** + * @var \Autnentication\Authenticator\HttpBasicAuthenticator + */ + protected $auth; + /** * @inheritDoc */ diff --git a/tests/TestCase/Authenticator/HttpDigestAuthenticatorTest.php b/tests/TestCase/Authenticator/HttpDigestAuthenticatorTest.php index ec304c8b..fa57838c 100644 --- a/tests/TestCase/Authenticator/HttpDigestAuthenticatorTest.php +++ b/tests/TestCase/Authenticator/HttpDigestAuthenticatorTest.php @@ -43,6 +43,16 @@ class HttpDigestAuthenticatorTest extends TestCase 'core.Users', ]; + /** + * @var \Authentication\IdentifierCollection + */ + protected $identifiers; + + /** + * @var \Autnentication\Authenticator\HttpDigestAuthenticator + */ + protected $auth; + /** * setup * diff --git a/tests/TestCase/Authenticator/JwtAuthenticatorTest.php b/tests/TestCase/Authenticator/JwtAuthenticatorTest.php index 43117c96..a88f8d00 100644 --- a/tests/TestCase/Authenticator/JwtAuthenticatorTest.php +++ b/tests/TestCase/Authenticator/JwtAuthenticatorTest.php @@ -59,6 +59,11 @@ class JwtAuthenticatorTest extends TestCase */ public $identifiers; + /** + * @var \Cake\Http\ServerRequest + */ + protected $request; + /** * @inheritDoc */ diff --git a/tests/TestCase/Authenticator/SessionAuthenticatorTest.php b/tests/TestCase/Authenticator/SessionAuthenticatorTest.php index b8be6d07..d7437dfa 100644 --- a/tests/TestCase/Authenticator/SessionAuthenticatorTest.php +++ b/tests/TestCase/Authenticator/SessionAuthenticatorTest.php @@ -40,6 +40,13 @@ class SessionAuthenticatorTest extends TestCase 'core.Users', ]; + /** + * @var \Authentication\IdentifierCollection + */ + protected $identifiers; + + protected $sessionMock; + /** * @inheritDoc */ diff --git a/tests/TestCase/Authenticator/TokenAuthenticatorTest.php b/tests/TestCase/Authenticator/TokenAuthenticatorTest.php index 363c31ff..f7437646 100644 --- a/tests/TestCase/Authenticator/TokenAuthenticatorTest.php +++ b/tests/TestCase/Authenticator/TokenAuthenticatorTest.php @@ -34,6 +34,16 @@ class TokenAuthenticatorTest extends TestCase 'core.Users', ]; + /** + * @var \Authentication\IdentifierCollection + */ + protected $identifiers; + + /** + * @var \Cake\Http\ServerRequest + */ + protected $request; + /** * @inheritDoc */ diff --git a/tests/TestCase/Middleware/AuthenticationMiddlewareTest.php b/tests/TestCase/Middleware/AuthenticationMiddlewareTest.php index 654c59a5..1733f56d 100644 --- a/tests/TestCase/Middleware/AuthenticationMiddlewareTest.php +++ b/tests/TestCase/Middleware/AuthenticationMiddlewareTest.php @@ -33,6 +33,16 @@ class AuthenticationMiddlewareTest extends TestCase { + /** + * @var \Authentication\AuthenticationService + */ + protected $service; + + /** + * @var \TestApp\Application + */ + protected $application; + /** * Fixtures */