Skip to content

Support for PHP 8.1 #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
90 changes: 44 additions & 46 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [8.0, 7.4]
laravel: [8.*, 7.*]
php: [8.1, 8.0, 7.4]
laravel: [8.*]
db: [mysql, postgres, sqlite]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*
- laravel: 8.*
testbench: 6.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - DB ${{ matrix.db }} - ${{ matrix.dependency-version }}

Expand All @@ -43,49 +41,49 @@ jobs:
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- 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: 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: 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 (MySQL)
run: vendor/bin/phpunit
if: ${{ matrix.db == 'mysql' }}
env:
DB_DATABASE: protone_media_db_test_mysql
DB_USERNAME: protone_media_db_test
DB_PASSWORD: secret
DB_PORT: ${{ job.services.mysql.ports[3306] }}
- name: Execute tests (MySQL)
run: vendor/bin/phpunit
if: ${{ matrix.db == 'mysql' }}
env:
DB_DATABASE: protone_media_db_test_mysql
DB_USERNAME: protone_media_db_test
DB_PASSWORD: secret
DB_PORT: ${{ job.services.mysql.ports[3306] }}

- name: Execute tests (PostgreSQL)
run: vendor/bin/phpunit
if: ${{ matrix.db == 'postgres' }}
env:
DB_CONNECTION: pgsql
DB_DATABASE: protone_media_db_test_postgres
DB_USERNAME: protone_media_db_test
DB_PASSWORD: secret
DB_PORT: ${{ job.services.postgres.ports[5432] }}
- name: Execute tests (PostgreSQL)
run: vendor/bin/phpunit
if: ${{ matrix.db == 'postgres' }}
env:
DB_CONNECTION: pgsql
DB_DATABASE: protone_media_db_test_postgres
DB_USERNAME: protone_media_db_test
DB_PASSWORD: secret
DB_PORT: ${{ job.services.postgres.ports[5432] }}

- name: Execute tests (SQLite)
run: vendor/bin/phpunit
if: ${{ matrix.db == 'sqlite' }}
env:
DB_CONNECTION: sqlite
DB_DATABASE: ':memory:'
- name: Execute tests (SQLite)
run: vendor/bin/phpunit
if: ${{ matrix.db == 'sqlite' }}
env:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Stop duplicating your Eloquent query scopes and constraints in PHP. This package
## Requirements

* PHP 7.4+
* Laravel 7.0 and higher
* Laravel 8.0

This package is tested with GitHub Actions using MySQL 5.7, PostgreSQL 10.8 and SQLite.

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@
}
],
"require": {
"php": "^7.4|^8.0",
"illuminate/support": "^7.0|^8.0"
"php": "^7.4|^8.0|^8.1",
"illuminate/support": "^8.67"
},
"require-dev": {
"mockery/mockery": "^1.3.3",
"orchestra/testbench": "^5.0|^6.0",
"phpunit/phpunit": "^9.0"
"orchestra/testbench": "^6.23",
"phpunit/phpunit": "^9.4"
},
"autoload": {
"psr-4": {
Expand Down