Skip to content

Commit 0cd4914

Browse files
authored
Feature/php84 compatible (#391)
* fix phpunit options * fix deprecated warning * add gitignore coverage/ * refactor ci.yml
1 parent 25ee702 commit 0cd4914

4 files changed

Lines changed: 17 additions & 23 deletions

File tree

.github/workflows/ci.yml

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,19 @@ jobs:
2323

2424

2525
steps:
26-
- uses: actions/checkout@v3
27-
28-
- uses: php-actions/composer@v6
29-
30-
- name: PHPUnit Tests
31-
uses: php-actions/phpunit@v4
32-
env:
33-
XDEBUG_MODE: coverage
34-
with:
35-
php_extensions: xdebug
36-
coverage_html: "coverage/html/"
37-
version: 9.5
38-
bootstrap: tests/bootstrap.php
39-
configuration: phpunit.xml
40-
php_version: ${{ matrix.php-versions }}
41-
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- name: Setup PHP
29+
uses: shivammathur/setup-php@v2
30+
with:
31+
php-version: ${{ matrix.php-versions }}
32+
coverage: xdebug
33+
- name: Composer Install
34+
run: composer install --classmap-authoritative --no-interaction --no-cache
35+
- name: run tests
36+
run: vendor/bin/phpunit --configuration phpunit.xml --bootstrap=tests/bootstrap.php --coverage-html=coverage/html/
4237
- name: Archive code coverage results
43-
uses: actions/upload-artifact@v3
38+
uses: actions/upload-artifact@v4
4439
with:
45-
name: code-coverage-report
46-
path: coverage/html
40+
name: code-coverage-report-${{ matrix.php-versions }}
41+
path: coverage/html/

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ composer.lock
33
clover.xml
44
composer.phar
55
.idea
6+
coverage/

phpunit.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit backupGlobals="false"
33
backupStaticAttributes="false"
4-
failOnDeprecation="true"
5-
displayDetailsOnTestsThatTriggerDeprecations="true"
6-
displayDetailsOnPhpunitDeprecations="true"
4+
convertDeprecationsToExceptions="true"
75
verbose="true"
86
bootstrap="tests/bootstrap.php">
97
<testsuites>

src/PHPSQLParser/processors/AbstractProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ abstract class AbstractProcessor {
6464
*
6565
* @param Options $options
6666
*/
67-
public function __construct(Options $options = null)
67+
public function __construct(?Options $options = null)
6868
{
6969
$this->options = $options;
7070
}

0 commit comments

Comments
 (0)