Skip to content

Commit

Permalink
Support PHP 8
Browse files Browse the repository at this point in the history
  • Loading branch information
staudenmeir committed Apr 2, 2021
1 parent b6d5dbf commit 6edf9bf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
25 changes: 13 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:

strategy:
matrix:
php: [7.4, 7.3, 7.2]
php: [8.0, 7.4, 7.3, 7.2]
database: [mysql, pgsql, sqlite, sqlsrv]
release: [stable, lowest]
include:
Expand All @@ -32,6 +32,16 @@ jobs:
POSTGRES_DB: test
ports:
- 5432/tcp
sqlsrv:
image: mcr.microsoft.com/mssql/server:2019-latest
env:
ACCEPT_EULA: Y
SA_PASSWORD: Password!
options: >-
--name sqlsrv
--health-cmd "echo quit | /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -l 1 -U sa -P Password!"
ports:
- 1433

steps:
- uses: actions/checkout@v2
Expand All @@ -45,17 +55,7 @@ jobs:
tools: pecl
extensions: bcmath, ctype, json, mbstring, openssl, pdo, pdo_${{ matrix.database }}, tokenizer, xml
coverage: ${{ matrix.coverage }}
- run: |
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server-2017.list | sudo tee /etc/apt/sources.list.d/mssql-server-2017.list
sudo apt-get update
sudo apt-get install mssql-server=14.0.3192.2-2
sudo MSSQL_SA_PASSWORD=Password! MSSQL_PID=developer /opt/mssql/bin/mssql-conf -n setup accept-eula
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install mssql-tools unixodbc-dev
sudo /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password! -Q "create database [test]"
- run: docker exec sqlsrv /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -U sa -P Password! -Q "create database [test]"
if: matrix.database == 'sqlsrv'
- 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
Expand All @@ -66,6 +66,7 @@ jobs:
DATABASE: ${{ matrix.database }}
MYSQL_PORT: ${{ job.services.mysql.ports[3306] }}
PGSQL_PORT: ${{ job.services.pgsql.ports[5432] }}
SQLSRV_PORT: ${{ job.services.sqlsrv.ports[1433] }}
- run: |
wget -q https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover coverage.xml
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.2.5|^8.0",
"illuminate/database": "^7.0"
},
"require-dev": {
"laravel/homestead": "^10.0",
"laravel/homestead": "^11.0",
"phpunit/phpunit": "^8.5"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion tests/config/database.ci.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => '127.0.0.1',
'port' => '1433',
'port' => getenv('SQLSRV_PORT'),
'database' => 'test',
'username' => 'sa',
'password' => 'Password!',
Expand Down

0 comments on commit 6edf9bf

Please sign in to comment.