From 7e36eba38ffc8e6e9607808b16b1e4c9e03a3e92 Mon Sep 17 00:00:00 2001 From: helloween141 Date: Tue, 14 May 2024 17:45:08 +0500 Subject: [PATCH] Laravel 11 support was added (#15) * Laravel 11 support was added * `tests.yml` fix * Update Dockerfile * Update CHANGELOG.md --------- Co-authored-by: Dmitry Peichev Co-authored-by: Eldario --- .github/workflows/tests.yml | 10 ++++---- CHANGELOG.md | 12 +++++++++ Dockerfile | 6 ++--- composer.json | 16 ++++++------ phpunit.xml.dist | 49 ++++++++++++++++++------------------- 5 files changed, 52 insertions(+), 41 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 286ab5e..ee7a620 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -21,10 +21,10 @@ jobs: # Docs: setup: [basic, lowest] laravel: [default] coverage: [yes] - php: ['8.1', '8.2'] + php: ['8.1', '8.2', '8.3'] steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup PHP, with composer and extensions uses: shivammathur/setup-php@v2 # Action page: @@ -37,7 +37,7 @@ jobs: # Docs: run: echo "output_dir=dir::$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - name: Cache dependencies # Docs: - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.output_dir }} key: ${{ runner.os }}-composer-${{ matrix.setup }}-${{ hashFiles('**/composer.json') }} @@ -68,7 +68,7 @@ jobs: # Docs: XDEBUG_MODE: coverage run: composer test-cover - - uses: codecov/codecov-action@v3 # Docs: + - uses: codecov/codecov-action@v4 # Docs: if: matrix.coverage == 'yes' with: token: ${{ secrets.CODECOV_TOKEN }} @@ -81,7 +81,7 @@ jobs: # Docs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Lint changelog file uses: docker://avtodev/markdown-lint:v1 # Action page: diff --git a/CHANGELOG.md b/CHANGELOG.md index 040992c..da9ea77 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog][keepachangelog] and this project adheres to [Semantic Versioning][semver]. +## Unreleased + +### Added + +- Laravel `11.x` support + +### Changed + +- Minimal Laravel version now is `10.0` +- Version of `composer` in docker container updated up to `2.7.6` +- Updated dev dependencies + ## v3.4.1 ### Fixed diff --git a/Dockerfile b/Dockerfile index 74f7882..475ff63 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,15 @@ -FROM php:8.1-alpine +FROM php:8.3-alpine ENV COMPOSER_HOME="/tmp/composer" -COPY --from=composer:2.5.5 /usr/bin/composer /usr/bin/composer +COPY --from=composer:2.7.6 /usr/bin/composer /usr/bin/composer RUN set -x \ && apk add --no-cache binutils git \ && apk add --no-cache --virtual .build-deps linux-headers autoconf pkgconf make g++ gcc 1>/dev/null \ && docker-php-ext-install sockets \ # install xdebug (for testing with code coverage), but do not enable it - && pecl install xdebug-3.2.0 1>/dev/null \ + && pecl install xdebug-3.3.0 1>/dev/null \ && apk del .build-deps \ && mkdir /src ${COMPOSER_HOME} \ && ln -s /usr/bin/composer /usr/bin/c \ diff --git a/composer.json b/composer.json index 4b3c6f7..6b37ee2 100644 --- a/composer.json +++ b/composer.json @@ -19,18 +19,18 @@ "php": "^8.1", "psr/log": "^3.0", "monolog/monolog": "^3.0", - "illuminate/log": "^10.0", - "illuminate/config": "^10.0", - "illuminate/events": "^10.0", - "illuminate/contracts": "^10.0" + "illuminate/log": "^10.0 || ^11.0", + "illuminate/config": "^10.0 || ^11.0", + "illuminate/events": "^10.0 || ^11.0", + "illuminate/contracts": "^10.0 || ^11.0" }, "require-dev": { "ext-sockets": "*", "ext-json": "*", - "laravel/laravel": "^10.0", - "mockery/mockery": "^1.5.1", - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.0" + "laravel/laravel": "^10.0 || ^11.0", + "mockery/mockery": "^1.6.5", + "phpstan/phpstan": "^1.10.66", + "phpunit/phpunit": "^10.5" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ed238c4..38ffe04 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,28 +1,27 @@ - - - ./tests - - - - - ./src - - - ./vendor - - - - - - - - + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd" + bootstrap="./tests/bootstrap.php" colors="true"> + + + ./tests + + + + + + + + + + + + + ./src + + + ./vendor + ./tests + +