diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6f8aba6..09c1215 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,19 +5,18 @@ on: [pull_request] jobs: tests: - name: Tests + name: Tests (PHP ${{ matrix.php }}, ${{ matrix.dependencies }}) runs-on: ubuntu-latest env: MOCKSERVER_URL: 'http://localhost:1080' services: mockserver: - image: mockserver/mockserver + image: mockserver/mockserver:9.2.0 ports: - "1080:1080" env: MOCKSERVER_INITIALIZATION_JSON_PATH: /docker/mockserver/expectations/**.json MOCKSERVER_LOG_LEVEL: WARN - continue-on-error: ${{ matrix.experimental }} strategy: fail-fast: false matrix: @@ -25,68 +24,43 @@ jobs: - "lowest" - "highest" php: - - '7.4' - - '8.0' - experimental: - - false - include: - - php: "7.4" - composer-options: "" - experimental: true - dependencies: "highest" - - php: "8.0" - composer-options: "" - experimental: true - dependencies: "highest" - - php: "8.1" - composer-options: "" - experimental: true - dependencies: "highest" - - php: "8.2" - composer-options: "" - experimental: true - dependencies: "highest" - - php: "8.3" - composer-options: "" - experimental: true - dependencies: "highest" - - php: "8.4" - composer-options: "" - experimental: true - dependencies: "highest" + - '8.2' + - '8.3' + - '8.4' + - '8.5' steps: - name: Set up PHP - uses: shivammathur/setup-php@2.24.0 + uses: shivammathur/setup-php@2.40.0 with: php-version: ${{ matrix.php }} extensions: intl, mbstring tools: "composer:v2" - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v7 - name: "Install lowest dependencies" if: ${{ matrix.dependencies == 'lowest' }} - run: composer update --prefer-lowest --no-interaction --no-progress --no-suggest ${{ matrix.composer-options }} + run: composer update --prefer-lowest --no-interaction --no-progress - name: "Install highest dependencies" if: ${{ matrix.dependencies == 'highest' }} - run: composer update --no-interaction --no-progress --no-suggest ${{ matrix.composer-options }} + run: composer update --no-interaction --no-progress - name: "Run unit tests" run: ./vendor/bin/phpunit -c phpunit.xml cs: - name: Codestyle check on PHP 7.4 + name: Codestyle check on PHP 8.2 runs-on: ubuntu-latest steps: - name: Set up PHP - uses: shivammathur/setup-php@2.24.0 + uses: shivammathur/setup-php@2.40.0 with: - php-version: 7.4 + php-version: '8.2' - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v7 - name: Download dependencies run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable @@ -100,15 +74,15 @@ jobs: strategy: matrix: php: - - '7.4' + - '8.2' steps: - name: Set up PHP - uses: shivammathur/setup-php@2.24.0 + uses: shivammathur/setup-php@2.40.0 with: php-version: ${{ matrix.php }} - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v7 - name: Download dependencies run: composer update --no-interaction --prefer-dist --optimize-autoloader --prefer-stable diff --git a/.gitignore b/.gitignore index 9591ace..830fdff 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ vendor composer.lock .phpcs-cache .env +var diff --git a/README.md b/README.md index 98dee6f..7cbccfb 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Get the file or files in the path, and send the content to create expectations o ### Requirements -Codecetion-MockServer Helper needs at least php 7.4 or higher and codeception 4 or higher. +Codecetion-MockServer Helper needs PHP 8.2 or higher, Codeception 5 and PHPUnit 11 or higher. ### How to contribute diff --git a/composer.json b/composer.json index c0ea6ed..9e1ae95 100644 --- a/composer.json +++ b/composer.json @@ -22,10 +22,10 @@ ], "minimum-stability": "stable", "require": { - "php": "7.4.*||8.*", + "php": "^8.2", "guzzlehttp/guzzle": "^7.0", - "codeception/codeception": "4.*||5.*", - "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0 || ^11.0 || ^12.0 || ^13.0", + "codeception/codeception": "^5.0", + "phpunit/phpunit": "^11.0 || ^12.0 || ^13.0", "jfcherng/php-diff": "^6.14" }, "require-dev": { diff --git a/docker-compose.yml b/docker-compose.yml index da86eb8..337d5c4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -15,7 +15,7 @@ services: tty: true mockserver: container_name: mockserver - image: mockserver/mockserver + image: mockserver/mockserver:9.2.0 environment: MOCKSERVER_LOG_LEVEL: ${MOCKSERVER_LOG_LEVEL} ports: diff --git a/phpunit.xml b/phpunit.xml index 8320a27..7ff9319 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,27 +1,23 @@ + failOnWarning="true"> tests - + src - +