Skip to content

Add PHP 8 support#26

Merged
neilime merged 2 commits into
neilime:masterfrom
macburgee1:master
Dec 8, 2020
Merged

Add PHP 8 support#26
neilime merged 2 commits into
neilime:masterfrom
macburgee1:master

Conversation

@macburgee1

Copy link
Copy Markdown

This PR seeks to add PHP 8 support to composer.json and to update tests for compatibility.

A code scan doesn't reveal any compatibility issues:

$ vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PHPCompatibility src/ --runtime-set testVersion 8.0
$
$ vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PHPCompatibility tests/ --runtime-set testVersion 8.0
$
$ vendor/squizlabs/php_codesniffer/bin/phpcs --standard=PHPCompatibility scripts/ --runtime-set testVersion 8.0
$

Tests pass successfully post-update on both PHP 7.3 and PHP 8.0.

Tests with PHP 7.3:

$ composer test
> phpunit --colors --configuration tests/phpunit.xml
PHPUnit 9.5.0 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.3.16
Configuration: tests/phpunit.xml
Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

...............                                                   15 / 15 (100%)

Time: 00:00.251, Memory: 6.00 MB

OK (15 tests, 25 assertions)

Tests with PHP 8.0:

$ composer test
> phpunit --colors --configuration tests/phpunit.xml
PHPUnit 9.5.0 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.0.0
Configuration: tests/phpunit.xml
Warning:       Your XML configuration validates against a deprecated schema.
Suggestion:    Migrate your XML configuration using "--migrate-configuration"!

...............                                                   15 / 15 (100%)

Time: 00:01.768, Memory: 4.00 MB

OK (15 tests, 25 assertions)

Note: PHP compatibility will need to be addressed in dependencies before php-css-lint can be installed on PHP 8; however. To run tests in PHP 8, I installed with PHP 7.3 and then swapped out versions in DDEV.

@neilime neilime merged commit 42b5558 into neilime:master Dec 8, 2020
@neilime

neilime commented Dec 8, 2020

Copy link
Copy Markdown
Owner

Hi, thank you for this PR @macburgee1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants