diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..f9a7446 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,37 @@ +name: run-tests + +on: [push, pull_request] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + php: [8.0, 7.4] + laravel: [8.*] + dependency-version: [prefer-lowest, prefer-stable] + include: + - laravel: 8.* + testbench: 6.* + + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql + coverage: none + + - name: Install dependencies + run: | + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest + + - name: Execute tests + run: vendor/bin/phpunit diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index f4d3cbc..0000000 --- a/.styleci.yml +++ /dev/null @@ -1,4 +0,0 @@ -preset: laravel - -disabled: - - single_class_element_per_statement diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a998820..0000000 --- a/.travis.yml +++ /dev/null @@ -1,40 +0,0 @@ -language: php - -cache: - directories: - - $HOME/.composer/cache - -addons: - apt: - update: true - packages: - - ghostscript - -matrix: - include: - - php: 7.4 - env: LARAVEL='6.*' TESTBENCH='^4.2' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='6.*' TESTBENCH='^4.2' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='7.*' TESTBENCH='5.*' COMPOSER_FLAGS='--prefer-stable' - - php: 7.4 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.4 - env: LARAVEL='8.*' TESTBENCH='6.*' COMPOSER_FLAGS='--prefer-stable' - fast_finish: true - -before_install: - - composer config discard-changes true - - travis_retry composer self-update - - travis_retry composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update - -install: - - travis_retry composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction --no-suggest - - sudo apt-get -qq update - - sudo apt-get install -y --allow-unauthenticated ghostscript - -script: - - vendor/bin/phpunit diff --git a/README.md b/README.md index 4c6a504..2bf16d3 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ ## Installation -This package requires PHP 7.4 and Laravel 6.0 or higher. You can install the package via composer: +Only the master branch and version 3.0 of this package are compatible with Laravel 8.0. If you're still using an older version of Laravel (or PHP < 7.4), please use the 2.x branch. Mind that older versions are no longer supported. + +You can install the package via composer: ```bash composer require protonemedia/laravel-mixins diff --git a/composer.json b/composer.json index 83d6791..354ff81 100644 --- a/composer.json +++ b/composer.json @@ -16,18 +16,18 @@ } ], "require": { - "php": "^7.4", - "illuminate/support": "^6.0 || ^7.0 || ^8.0" + "php": "^7.4 || ^8.0", + "illuminate/support": "^8.0" }, "require-dev": { "html2text/html2text": "^4.3", - "laravel/ui": "^1.0 || ^2.0", - "mockery/mockery": "^1.3", + "laravel/ui": "^2.0 || ^3.0", + "mockery/mockery": "^1.3.3", "moneyphp/money": "^3.3", - "orchestra/testbench": "^4.2 || ^5.0 || ^6.0", - "phpunit/phpunit": "^8.5", + "orchestra/testbench": "^6.0", + "phpunit/phpunit": "^9.0", "spatie/laravel-sitemap": "^5.7", - "symfony/process": "^4.3 || ^5.1" + "symfony/process": "^5.1" }, "suggest": { "html2text/html2text": "To convert HTML to formatted plain text",