diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index afce1eaa..6600149c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 \ No newline at end of file + name: code-coverage-report-${{ matrix.php-versions }} + path: coverage/html/ \ No newline at end of file diff --git a/.gitignore b/.gitignore index 05de5af5..dc0a08a2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ composer.lock clover.xml composer.phar .idea +coverage/ diff --git a/phpunit.xml b/phpunit.xml index 95704b43..64c1247f 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,9 +1,7 @@ diff --git a/src/PHPSQLParser/processors/AbstractProcessor.php b/src/PHPSQLParser/processors/AbstractProcessor.php index b172399d..4e88cc8e 100644 --- a/src/PHPSQLParser/processors/AbstractProcessor.php +++ b/src/PHPSQLParser/processors/AbstractProcessor.php @@ -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; }