Skip to content

Commit 9745a50

Browse files
authored
PHP 8.1 (#6)
1 parent 972981e commit 9745a50

File tree

3 files changed

+49
-51
lines changed

3 files changed

+49
-51
lines changed

.github/workflows/run-tests.yml

Lines changed: 44 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ jobs:
88
strategy:
99
fail-fast: true
1010
matrix:
11-
php: [8.0, 7.4]
12-
laravel: [8.*, 7.*]
11+
php: [8.1, 8.0, 7.4]
12+
laravel: [8.*]
1313
db: [mysql, postgres, sqlite]
1414
dependency-version: [prefer-lowest, prefer-stable]
1515
include:
16-
- laravel: 8.*
17-
testbench: 6.*
18-
- laravel: 7.*
19-
testbench: 5.*
16+
- laravel: 8.*
17+
testbench: 6.*
2018

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

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

4543
steps:
46-
- name: Checkout code
47-
uses: actions/checkout@v2
44+
- name: Checkout code
45+
uses: actions/checkout@v2
4846

49-
- name: Cache dependencies
50-
uses: actions/cache@v2
51-
with:
52-
path: ~/.composer/cache/files
53-
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
47+
- name: Cache dependencies
48+
uses: actions/cache@v2
49+
with:
50+
path: ~/.composer/cache/files
51+
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
5452

55-
- name: Setup PHP
56-
uses: shivammathur/setup-php@v2
57-
with:
58-
php-version: ${{ matrix.php }}
59-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql
60-
coverage: none
53+
- name: Setup PHP
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: ${{ matrix.php }}
57+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, mysql, mysqli, pdo_mysql
58+
coverage: none
6159

62-
- name: Install dependencies
63-
run: |
64-
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
65-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
60+
- name: Install dependencies
61+
run: |
62+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
63+
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
6664
67-
- name: Execute tests (MySQL)
68-
run: vendor/bin/phpunit
69-
if: ${{ matrix.db == 'mysql' }}
70-
env:
71-
DB_DATABASE: protone_media_db_test_mysql
72-
DB_USERNAME: protone_media_db_test
73-
DB_PASSWORD: secret
74-
DB_PORT: ${{ job.services.mysql.ports[3306] }}
65+
- name: Execute tests (MySQL)
66+
run: vendor/bin/phpunit
67+
if: ${{ matrix.db == 'mysql' }}
68+
env:
69+
DB_DATABASE: protone_media_db_test_mysql
70+
DB_USERNAME: protone_media_db_test
71+
DB_PASSWORD: secret
72+
DB_PORT: ${{ job.services.mysql.ports[3306] }}
7573

76-
- name: Execute tests (PostgreSQL)
77-
run: vendor/bin/phpunit
78-
if: ${{ matrix.db == 'postgres' }}
79-
env:
80-
DB_CONNECTION: pgsql
81-
DB_DATABASE: protone_media_db_test_postgres
82-
DB_USERNAME: protone_media_db_test
83-
DB_PASSWORD: secret
84-
DB_PORT: ${{ job.services.postgres.ports[5432] }}
74+
- name: Execute tests (PostgreSQL)
75+
run: vendor/bin/phpunit
76+
if: ${{ matrix.db == 'postgres' }}
77+
env:
78+
DB_CONNECTION: pgsql
79+
DB_DATABASE: protone_media_db_test_postgres
80+
DB_USERNAME: protone_media_db_test
81+
DB_PASSWORD: secret
82+
DB_PORT: ${{ job.services.postgres.ports[5432] }}
8583

86-
- name: Execute tests (SQLite)
87-
run: vendor/bin/phpunit
88-
if: ${{ matrix.db == 'sqlite' }}
89-
env:
90-
DB_CONNECTION: sqlite
91-
DB_DATABASE: ':memory:'
84+
- name: Execute tests (SQLite)
85+
run: vendor/bin/phpunit
86+
if: ${{ matrix.db == 'sqlite' }}
87+
env:
88+
DB_CONNECTION: sqlite
89+
DB_DATABASE: ":memory:"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Stop duplicating your Eloquent query scopes and constraints in PHP. This package
1313
## Requirements
1414

1515
* PHP 7.4+
16-
* Laravel 7.0 and higher
16+
* Laravel 8.0
1717

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

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
}
1717
],
1818
"require": {
19-
"php": "^7.4|^8.0",
20-
"illuminate/support": "^7.0|^8.0"
19+
"php": "^7.4|^8.0|^8.1",
20+
"illuminate/support": "^8.67"
2121
},
2222
"require-dev": {
2323
"mockery/mockery": "^1.3.3",
24-
"orchestra/testbench": "^5.0|^6.0",
25-
"phpunit/phpunit": "^9.0"
24+
"orchestra/testbench": "^6.23",
25+
"phpunit/phpunit": "^9.4"
2626
},
2727
"autoload": {
2828
"psr-4": {

0 commit comments

Comments
 (0)