diff --git a/.github/workflows/run-test.yml b/.github/workflows/run-test.yml index 67cb331..5aae3fd 100644 --- a/.github/workflows/run-test.yml +++ b/.github/workflows/run-test.yml @@ -8,8 +8,8 @@ jobs: strategy: fail-fast: true matrix: - os: [ubuntu-20.04] - php: [7.4, 8.0, 8.1] + os: [ubuntu-22.04] + php: [8.1, 8.2, 8.3] name: PHP ${{ matrix.php }} on ${{ matrix.os }} diff --git a/.github/workflows/static-analysis.yml b/.github/workflows/static-analysis.yml index 243bdc7..b362f08 100644 --- a/.github/workflows/static-analysis.yml +++ b/.github/workflows/static-analysis.yml @@ -4,7 +4,7 @@ name: Static analysis jobs: phpstan: name: PHPStan - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code @@ -19,14 +19,14 @@ jobs: tools: phpstan:1.4.10 - name: Download dependencies - uses: ramsey/composer-install@v1 + uses: ramsey/composer-install@v2 - name: PHPStan run: phpstan analyze psalm: name: Psalm - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - name: Checkout code uses: actions/checkout@v2 @@ -40,7 +40,7 @@ jobs: tools: vimeo/psalm:4.22.0 - name: Download dependencies - uses: ramsey/composer-install@v1 + uses: ramsey/composer-install@v2 - name: Psalm run: psalm --no-progress --output-format=github diff --git a/.github/workflows/style-checker.yml b/.github/workflows/style-checker.yml index 9c60110..6216111 100644 --- a/.github/workflows/style-checker.yml +++ b/.github/workflows/style-checker.yml @@ -14,11 +14,11 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' - name: Cache Dependencies id: composer-cache-style - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: vendor key: ubuntu-composer-cache-style-${{ hashFiles('**/composer.lock') }} diff --git a/README.md b/README.md index c30ac20..7a70fcc 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ $ composer require ellipsesynergie/api-response The following versions of PHP are supported by this version: ->= PHP 7.4 +>= PHP 8.1 ### Install in Laravel Add this following service provider to your `config/app.php` file. diff --git a/composer.json b/composer.json index 68a3ecd..bce14d9 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ } ], "require": { - "php": ">=7.4", + "php": ">=8.1", "league/fractal": "~0.20.1" }, "require-dev": { diff --git a/src/AbstractResponse.php b/src/AbstractResponse.php index 1511250..61c4439 100644 --- a/src/AbstractResponse.php +++ b/src/AbstractResponse.php @@ -15,7 +15,7 @@ * file that was distributed with this source code. * * @package EllipseSynergie\ApiResponse - * @author Maxime Beaudoin + * @author Maxime Beaudoin * @author Phil Sturgeon */ abstract class AbstractResponse implements Response @@ -41,12 +41,12 @@ abstract class AbstractResponse implements Response /** * Fractal manager * - * @var \League\Fractal\Manager + * @var Manager */ protected $manager; /** - * @param \League\Fractal\Manager $manager + * @param Manager $manager */ public function __construct(Manager $manager) { @@ -54,9 +54,9 @@ public function __construct(Manager $manager) } /** - * @return \League\Fractal\Manager + * @return Manager */ - public function getManager() + public function getManager(): Manager { return $this->manager; } @@ -66,7 +66,7 @@ public function getManager() * * @return int */ - public function getStatusCode() + public function getStatusCode(): int { return $this->statusCode; } @@ -75,9 +75,9 @@ public function getStatusCode() * Setter for status code * * @param int $statusCode - * @return \EllipseSynergie\ApiResponse\AbstractResponse + * @return AbstractResponse */ - public function setStatusCode($statusCode) + public function setStatusCode($statusCode): AbstractResponse { $this->statusCode = $statusCode; return $this; diff --git a/src/Contracts/Response.php b/src/Contracts/Response.php index a635726..0070433 100644 --- a/src/Contracts/Response.php +++ b/src/Contracts/Response.php @@ -14,7 +14,7 @@ * file that was distributed with this source code. * * @package EllipseSynergie\ApiResponse\Contracts - * @author Maxime Beaudoin + * @author Maxime Beaudoin */ interface Response { diff --git a/src/Laravel/LumenServiceProvider.php b/src/Laravel/LumenServiceProvider.php index 55601e7..acf8a25 100644 --- a/src/Laravel/LumenServiceProvider.php +++ b/src/Laravel/LumenServiceProvider.php @@ -12,7 +12,7 @@ * file that was distributed with this source code. * * @package EllipseSynergie\ApiResponse\Laravel - * @author Maxime Beaudoin + * @author Maxime Beaudoin */ class LumenServiceProvider extends ServiceProvider { diff --git a/src/Laravel/Response.php b/src/Laravel/Response.php index b984336..7eb0a6d 100644 --- a/src/Laravel/Response.php +++ b/src/Laravel/Response.php @@ -16,7 +16,7 @@ * file that was distributed with this source code. * * @package EllipseSynergie\ApiResponse\Laravel - * @author Maxime Beaudoin + * @author Maxime Beaudoin */ class Response extends AbstractResponse { diff --git a/src/Laravel/ResponseServiceProvider.php b/src/Laravel/ResponseServiceProvider.php index 577e396..982b0cb 100644 --- a/src/Laravel/ResponseServiceProvider.php +++ b/src/Laravel/ResponseServiceProvider.php @@ -13,7 +13,7 @@ * file that was distributed with this source code. * * @package EllipseSynergie\ApiResponse\Laravel - * @author Maxime Beaudoin + * @author Maxime Beaudoin */ class ResponseServiceProvider extends ServiceProvider { diff --git a/src/Serializer/Serializer.php b/src/Serializer/Serializer.php index 2975f24..73b5214 100644 --- a/src/Serializer/Serializer.php +++ b/src/Serializer/Serializer.php @@ -7,7 +7,7 @@ /** * Class Serializer * @package EllipseSynergie\ApiResponse\Serializer - * @author Maxime Beaudoin + * @author Maxime Beaudoin */ class Serializer extends ArraySerializer { diff --git a/src/Testing/Laravel/AddTestingSupportForInclude.php b/src/Testing/Laravel/AddTestingSupportForInclude.php index d99ea41..279a81b 100644 --- a/src/Testing/Laravel/AddTestingSupportForInclude.php +++ b/src/Testing/Laravel/AddTestingSupportForInclude.php @@ -8,7 +8,7 @@ /** * Class AddTestingSupportForInclude * @package EllipseSynergie\ApiResponse\Testing\Laravel - * @author Maxime Beaudoin + * @author Maxime Beaudoin */ trait AddTestingSupportForInclude {