Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
- ubuntu-latest

php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v7

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -36,7 +36,7 @@ jobs:
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v3
uses: actions/cache@v6
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand All @@ -50,6 +50,6 @@ jobs:
run: vendor/bin/phpunit --colors=always --coverage-clover clover.xml

- name: Send code coverage report to Codecov.io
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v7
with:
token: ${{ secrets.CODECOV_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ jobs:
- ubuntu-latest

php:
- "8.2"
- "8.3"
- "8.4"
- "8.5"
- "8.6"

steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Install PHP
uses: shivammathur/setup-php@v2
Expand All @@ -36,7 +36,7 @@ jobs:
run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV

- name: Cache dependencies installed with composer
uses: actions/cache@v4
uses: actions/cache@v6
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ Documentation is available at: https://docs.dotkernel.org/dot-authentication/.
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-authentication)](https://github.com/dotkernel/dot-authentication/stargazers)
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-authentication)](https://github.com/dotkernel/dot-authentication/blob/2.0/LICENSE.md)

[![Build Static](https://github.com/dotkernel/dot-authentication/actions/workflows/continuous-integration.yml/badge.svg?branch=2.0)](https://github.com/dotkernel/dot-authentication/actions/workflows/continuous-integration.yml)
[![Build Static](https://github.com/dotkernel/dot-authentication/actions/workflows/continuous-integration.yml/badge.svg?branch=2.x)](https://github.com/dotkernel/dot-authentication/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/dot-authentication/graph/badge.svg?token=ZBZDEA3LY8)](https://codecov.io/gh/dotkernel/dot-authentication)
[![PHPStan](https://github.com/dotkernel/dot-authentication/actions/workflows/static-analysis.yml/badge.svg?branch=2.0)](https://github.com/dotkernel/dot-authentication/actions/workflows/static-analysis.yml)
[![PHPStan](https://github.com/dotkernel/dot-authentication/actions/workflows/static-analysis.yml/badge.svg?branch=2.x)](https://github.com/dotkernel/dot-authentication/actions/workflows/static-analysis.yml)

## Installation

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
}
],
"require": {
"php": "~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0",
"php": "~8.3.0 || ~8.4.0 || ~8.5.0 || ~8.6.0",
"psr/http-message": "^1.0 || ^2.0"
},
"require-dev": {
"laminas/laminas-coding-standard": "^3.0",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/phpunit": "^10.2"
"phpunit/phpunit": "^12.5.22"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions docs/book/v2/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ Core interfaces for authentication implementations.
[![GitHub stars](https://img.shields.io/github/stars/dotkernel/dot-authentication)](https://github.com/dotkernel/dot-authentication/stargazers)
[![GitHub license](https://img.shields.io/github/license/dotkernel/dot-authentication)](https://github.com/dotkernel/dot-authentication/blob/2.0/LICENSE.md)

[![Build Static](https://github.com/dotkernel/dot-authentication/actions/workflows/continuous-integration.yml/badge.svg?branch=2.0)](https://github.com/dotkernel/dot-authentication/actions/workflows/continuous-integration.yml)
[![Build Static](https://github.com/dotkernel/dot-authentication/actions/workflows/continuous-integration.yml/badge.svg?branch=2.x)](https://github.com/dotkernel/dot-authentication/actions/workflows/continuous-integration.yml)
[![codecov](https://codecov.io/gh/dotkernel/dot-authentication/graph/badge.svg?token=ZBZDEA3LY8)](https://codecov.io/gh/dotkernel/dot-authentication)
[![PHPStan](https://github.com/dotkernel/dot-authentication/actions/workflows/static-analysis.yml/badge.svg?branch=2.0)](https://github.com/dotkernel/dot-authentication/actions/workflows/static-analysis.yml)
[![PHPStan](https://github.com/dotkernel/dot-authentication/actions/workflows/static-analysis.yml/badge.svg?branch=2.x)](https://github.com/dotkernel/dot-authentication/actions/workflows/static-analysis.yml)
12 changes: 6 additions & 6 deletions test/AuthenticationInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,23 @@
use Dot\Authentication\AuthenticationInterface;
use Dot\Authentication\Identity\IdentityInterface;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;

class AuthenticationInterfaceTest extends TestCase
{
protected AuthenticationInterface|MockObject $mockAuthenticationInterface;
protected AuthenticationInterface|Stub $mockAuthenticationInterface;

protected IdentityInterface|MockObject $identityInterfaceMock;
protected IdentityInterface|Stub $identityInterfaceMock;

/**
* @throws Exception
*/
public function setUp(): void
{
$this->mockAuthenticationInterface = $this->createMock(AuthenticationInterface::class);
$this->identityInterfaceMock = $this->createMock(IdentityInterface::class);
$this->identityInterfaceMock->method('getId')->will($this->returnValue(10));
$this->mockAuthenticationInterface = $this->createStub(AuthenticationInterface::class);
$this->identityInterfaceMock = $this->createStub(IdentityInterface::class);
$this->identityInterfaceMock->method('getId')->willReturn(10);
$this->identityInterfaceMock->method('getName')->willReturn('username');
$this->mockAuthenticationInterface->method('hasIdentity')->willReturn(true);
$this->mockAuthenticationInterface->method('getIdentity')->willReturn($this->identityInterfaceMock);
Expand Down
8 changes: 4 additions & 4 deletions test/AuthenticationResultTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,21 @@
use Dot\Authentication\AuthenticationResult;
use Dot\Authentication\Identity\IdentityInterface;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;

class AuthenticationResultTest extends TestCase
{
protected AuthenticationResult $subject;
protected IdentityInterface|MockObject $identityInterfaceMock;
protected IdentityInterface|Stub $identityInterfaceMock;

/**
* @throws Exception
*/
protected function setUp(): void
{
$this->identityInterfaceMock = $this->createMock(IdentityInterface::class);
$this->identityInterfaceMock->method('getId')->will($this->returnValue(10));
$this->identityInterfaceMock = $this->createStub(IdentityInterface::class);
$this->identityInterfaceMock->method('getId')->willReturn(10);
$this->identityInterfaceMock->method('getName')->willReturn('username');
$this->subject = new AuthenticationResult(2, 'valid', $this->identityInterfaceMock);
}
Expand Down
6 changes: 3 additions & 3 deletions test/Exception/InvalidArgumentExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
namespace DotTest\Authentication\Exception;

use InvalidArgumentException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;

class InvalidArgumentExceptionTest extends TestCase
{
protected InvalidArgumentException|MockObject $exceptionInterfaceMock;
protected InvalidArgumentException|Stub $exceptionInterfaceMock;

public function setUp(): void
{
$this->exceptionInterfaceMock = $this->createMock(InvalidArgumentException::class);
$this->exceptionInterfaceMock = $this->createStub(InvalidArgumentException::class);
}

public function testCreate(): void
Expand Down
6 changes: 3 additions & 3 deletions test/Exception/RuntimeExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
namespace DotTest\Authentication\Exception;

use Dot\Authentication\Exception\RuntimeException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;

class RuntimeExceptionTest extends TestCase
{
protected RuntimeException|MockObject $exceptionInterfaceMock;
protected RuntimeException|Stub $exceptionInterfaceMock;

public function setUp(): void
{
$this->exceptionInterfaceMock = $this->createMock(RuntimeException::class);
$this->exceptionInterfaceMock = $this->createStub(RuntimeException::class);
}

public function testCreate(): void
Expand Down
6 changes: 3 additions & 3 deletions test/Exception/UnauthorizedExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
namespace DotTest\Authentication\Exception;

use Dot\Authentication\Exception\UnauthorizedException;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;

class UnauthorizedExceptionTest extends TestCase
{
protected UnauthorizedException|MockObject $exceptionInterfaceMock;
protected UnauthorizedException|Stub $exceptionInterfaceMock;

public function setUp(): void
{
$this->exceptionInterfaceMock = $this->createMock(UnauthorizedException::class);
$this->exceptionInterfaceMock = $this->createStub(UnauthorizedException::class);
}

public function testCreate(): void
Expand Down
8 changes: 4 additions & 4 deletions test/Identity/IdentityInterfaceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@

use Dot\Authentication\Identity\IdentityInterface;
use PHPUnit\Framework\MockObject\Exception;
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\MockObject\Stub;
use PHPUnit\Framework\TestCase;

class IdentityInterfaceTest extends TestCase
{
protected IdentityInterface|MockObject $identityInterfaceMock;
protected IdentityInterface|Stub $identityInterfaceMock;

/**
* @throws Exception
*/
public function setUp(): void
{
$this->identityInterfaceMock = $this->createMock(IdentityInterface::class);
$this->identityInterfaceMock->method('getId')->will($this->returnValue(10));
$this->identityInterfaceMock = $this->createStub(IdentityInterface::class);
$this->identityInterfaceMock->method('getId')->willReturn(10);
$this->identityInterfaceMock->method('getName')->willReturn('username');
}

Expand Down
Loading