Skip to content

Commit

Permalink
Support PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Oct 11, 2021
1 parent da459ba commit c5ec390
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ on: [push, pull_request]
jobs:
tests:
runs-on: ubuntu-latest

strategy:
matrix:
php: [7.4, 7.3, 7.2]
php: [8.0, 7.4, 7.3, 7.2]
database: [mysql, sqlite]
release: [stable, lowest]
include:
include:
- php: 7.4
database: mysql
release: stable
release: stable
coverage: xdebug

services:
mysql:
image: mysql:5.7
Expand All @@ -25,25 +25,21 @@ jobs:
MYSQL_DATABASE: test
ports:
- 3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v1
- uses: actions/cache@v1
- uses: actions/checkout@v2
with:
path: ~/.composer/cache/files
fetch-depth: 2
- uses: actions/cache@v2
with:
path: ~/.cache/composer/files
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }}
- uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bcmath, ctype, json, mbstring, openssl, pdo, pdo_${{ matrix.database }}, tokenizer, xml
coverage: ${{ matrix.coverage }}
- run: |
PHP_API=$(php -i | sed -n 's/PHP API => //p')
SQLITE=$(wget -qO- https://github.com/staudenmeir/php-sqlite/raw/master/LATEST)
sudo wget -q https://github.com/staudenmeir/php-sqlite/raw/master/$SQLITE/libsqlite3.so -O /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6
sudo ln -s /usr/lib/x86_64-linux-gnu/libsqlite3.so.0.8.6 /usr/lib/x86_64-linux-gnu/libsqlite3.so
sudo wget -q https://github.com/staudenmeir/php-sqlite/raw/master/$SQLITE/${{ matrix.php }}/pdo_sqlite.so -O /usr/lib/php/$PHP_API/pdo_sqlite.so
if: matrix.database == 'sqlite'
- run: composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-${{ matrix.release }}
- run: cp tests/config/database.ci.php tests/config/database.php
- run: |
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
}
],
"require": {
"php": "^7.2",
"php": "^7.2|^8.0",
"illuminate/database": "^6.0"
},
"require-dev": {
"illuminate/pagination": "^6.0",
"laravel/homestead": "^10.0",
"laravel/homestead": "^10.0|^11.0",
"phpunit/phpunit": "^8.0",
"staudenmeir/eloquent-eager-limit": "^1.4"
},
Expand Down

0 comments on commit c5ec390

Please sign in to comment.