Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PHP 8 support #26

Merged
merged 2 commits into from
Dec 8, 2020
Merged

Add PHP 8 support #26

merged 2 commits into from
Dec 8, 2020

Conversation

macburgee1
Copy link

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
Copy link
Owner

neilime commented Dec 8, 2020

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