From 167eb67d09d3d9021ee5c290878e258eabbc54d7 Mon Sep 17 00:00:00 2001 From: Raza Mehdi Date: Wed, 19 Jun 2024 12:01:03 +0500 Subject: [PATCH] Make PHP 8.1 as base requirement. Signed-off-by: Raza Mehdi --- .github/workflows/tests.yml | 20 +++----------------- Dockerfile | 2 +- composer.json | 4 ++-- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0644c8e9..7f2d1241 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: Laravel PayPal +name: Laravel PayPal v4 on: [push, pull_request] jobs: paypal: @@ -7,10 +7,7 @@ jobs: strategy: fail-fast: false matrix: - php-versions: ['8.0', '8.1', '8.2', '8.3'] - include: - - php-versions: '8.0' - continue-on-error: true + php-versions: ['8.1', '8.2', '8.3'] steps: - name: Checkout uses: actions/checkout@v2 @@ -36,18 +33,7 @@ jobs: env: PHP_VERSION: ${{ matrix.php-versions }} run: composer install --no-progress --prefer-dist --optimize-autoloader $(if [ "$PHP_VERSION" == "8.0" || "$PHP_VERSION" == "8.1" ]; then echo "--ignore-platform-reqs"; fi;) - - name: Run tests for PHP 7.2 to 8.0 with code coverage - if: matrix.php-versions == '7.2' || matrix.php-versions == '7.3' || matrix.php-versions == '7.4' || matrix.php-versions == '8.0' - env: - PHP_VERSION: ${{ matrix.php-versions }} - run: vendor/bin/phpunit $(if [ "$PHP_VERSION" == "7.2" ]; then echo "-c phpunit.xml.dist.php72"; fi;) $(if [ "$PHP_VERSION" == "7.3" ]; then echo "-c phpunit.xml.dist.php8"; fi;) $(if [ "$PHP_VERSION" == "7.4" ]; then echo "-c phpunit.xml.dist.php8"; fi;) $(if [ "$PHP_VERSION" == "8.0" ]; then echo "-c phpunit.xml.dist.php8"; fi;) --coverage-clover build/logs/clover.xml - - name: Install PestPHP - if: matrix.php-versions == '8.1' || matrix.php-versions == '8.2' || matrix.php-versions == '8.3' - env: - PHP_VERSION: ${{ matrix.php-versions }} - run: composer require pestphp/pest --dev --with-all-dependencies - - name: Run tests for PHP 8.1+ with code coverage - if: matrix.php-versions == '8.1' || matrix.php-versions == '8.2' || matrix.php-versions == '8.3' + - name: Run tests with code coverage env: PHP_VERSION: ${{ matrix.php-versions }} run: vendor/bin/pest --coverage-clover build/logs/clover.xml diff --git a/Dockerfile b/Dockerfile index e340a2fe..bd6e1eaa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM srmklive/docker-php-cli:7.4 +FROM srmklive/docker-php-cli:8.1 LABEL maintainer="Raza Mehdi" diff --git a/composer.json b/composer.json index ac11651c..91aeafb7 100644 --- a/composer.json +++ b/composer.json @@ -27,15 +27,15 @@ } }, "require": { - "php": ">=7.2|^8.0", + "php": "^8.1", "ext-curl": "*", "guzzlehttp/guzzle": "~7.0", "illuminate/support": "~6.0|~7.0|~8.0|~9.0|^10.0|^11.0", "nesbot/carbon": "~2.0|^3.0" }, "require-dev": { + "pestphp/pest": "~2.0", "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^8.0|^9.0|^10.0|^11.0", "symfony/var-dumper": "~5.0|^6.0|^7.0" }, "config": {