Skip to content

Commit

Permalink
Feature/php84 compatible (#391)
Browse files Browse the repository at this point in the history
* fix phpunit options

* fix deprecated warning

* add gitignore coverage/

* refactor ci.yml
  • Loading branch information
dmnlk authored Dec 2, 2024
1 parent 25ee702 commit 0cd4914
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 23 deletions.
33 changes: 14 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,19 @@ jobs:


steps:
- uses: actions/checkout@v3

- uses: php-actions/composer@v6

- name: PHPUnit Tests
uses: php-actions/phpunit@v4
env:
XDEBUG_MODE: coverage
with:
php_extensions: xdebug
coverage_html: "coverage/html/"
version: 9.5
bootstrap: tests/bootstrap.php
configuration: phpunit.xml
php_version: ${{ matrix.php-versions }}

- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: Composer Install
run: composer install --classmap-authoritative --no-interaction --no-cache
- name: run tests
run: vendor/bin/phpunit --configuration phpunit.xml --bootstrap=tests/bootstrap.php --coverage-html=coverage/html/
- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-coverage-report
path: coverage/html
name: code-coverage-report-${{ matrix.php-versions }}
path: coverage/html/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ composer.lock
clover.xml
composer.phar
.idea
coverage/
4 changes: 1 addition & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
failOnDeprecation="true"
displayDetailsOnTestsThatTriggerDeprecations="true"
displayDetailsOnPhpunitDeprecations="true"
convertDeprecationsToExceptions="true"
verbose="true"
bootstrap="tests/bootstrap.php">
<testsuites>
Expand Down
2 changes: 1 addition & 1 deletion src/PHPSQLParser/processors/AbstractProcessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ abstract class AbstractProcessor {
*
* @param Options $options
*/
public function __construct(Options $options = null)
public function __construct(?Options $options = null)
{
$this->options = $options;
}
Expand Down

0 comments on commit 0cd4914

Please sign in to comment.