diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 924ff55d..e211896e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: pull_request: branches: - '*' + workflow_dispatch: jobs: testsuite: @@ -15,7 +16,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['7.4', '8.0', '8.1'] + php-version: ['7.4', '8.0', '8.1', '8.2'] db-type: [sqlite] prefer-lowest: [''] include: @@ -24,7 +25,7 @@ jobs: prefer-lowest: 'prefer-lowest' steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Setup PHP uses: shivammathur/setup-php@v2 @@ -50,9 +51,7 @@ jobs: - name: Composer install run: | - if [[ ${{ matrix.php-version }} == '8.1' ]]; then - composer update --ignore-platform-reqs - elif ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then + if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then composer update --prefer-lowest --prefer-stable else composer update diff --git a/.github/workflows/deploy_docs_2x.yml b/.github/workflows/deploy_docs_2x.yml index 83288472..ba0f8618 100644 --- a/.github/workflows/deploy_docs_2x.yml +++ b/.github/workflows/deploy_docs_2x.yml @@ -5,13 +5,14 @@ on: push: branches: - 2.x + workflow_dispatch: jobs: deploy: runs-on: ubuntu-latest steps: - name: Cloning repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 diff --git a/src/IdentityInterface.php b/src/IdentityInterface.php index 77caecc2..630eedd3 100644 --- a/src/IdentityInterface.php +++ b/src/IdentityInterface.php @@ -28,7 +28,7 @@ interface IdentityInterface extends ArrayAccess /** * Get the primary key/id field for the identity. * - * @return string|int|null + * @return string|int|array|null */ public function getIdentifier(); diff --git a/src/View/Helper/IdentityHelper.php b/src/View/Helper/IdentityHelper.php index eea4ab8a..573af692 100644 --- a/src/View/Helper/IdentityHelper.php +++ b/src/View/Helper/IdentityHelper.php @@ -71,7 +71,7 @@ public function initialize(array $config): void /** * Gets the id of the current logged in identity * - * @return int|null|string + * @return string|int|array|null */ public function getId() { 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 16d64f74..d1145c2d 100644 --- a/tests/TestCase/Middleware/AuthenticationMiddlewareTest.php +++ b/tests/TestCase/Middleware/AuthenticationMiddlewareTest.php @@ -34,6 +34,16 @@ class AuthenticationMiddlewareTest extends TestCase { use ContainerStubTrait; + /** + * @var \Authentication\AuthenticationService + */ + protected $service; + + /** + * @var \TestApp\Application + */ + protected $application; + /** * Fixtures */