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

Fix PHP 8 compatibility #72

Merged
merged 16 commits into from
Aug 31, 2024
Merged

Fix PHP 8 compatibility #72

merged 16 commits into from
Aug 31, 2024

Conversation

kasparsd
Copy link
Owner

@kasparsd kasparsd commented Aug 31, 2024

Fixes #71.

  • Pull in the latest dev version of phpcompatibility/php-compatibility to check for PHP 8 issues.
  • Update wpcs and apply the suggested fixes.
  • Update local dev environment to use native Docker. Remove Vagrant support.

@@ -2,10 +2,9 @@

class WidgetContextWordCount {

private static $instance;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wasn't referenced anywhere.

@@ -32,7 +32,7 @@ jobs:
run: npm run lint

- name: Test
run: npm run test
run: composer test
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The npm test script now runs things inside the Docker environment.

"mockery/mockery": "^0.9.5",
"php-coveralls/php-coveralls": "^2.4",
"phpcompatibility/php-compatibility": "^9.3",
"phpcompatibility/php-compatibility": "dev-develop as 9.99.99",
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed for PHP 8+ checks since it only lives in the develop.

@@ -3,7 +3,7 @@ version: '3'
services:

mysql:
image: mysql:5
image: mysql:8.0
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This supports arm machines now.

@@ -14,7 +14,7 @@ services:
MYSQL_ROOT_PASSWORD: password

wordpress:
image: wordpress:latest
image: wordpress:php7.4
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lock to a known PHP version to support phpunit tests at the current version.

@kasparsd kasparsd merged commit 838954a into develop Aug 31, 2024
3 checks passed
@kasparsd kasparsd deleted the php8-compat branch August 31, 2024 10:52
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.

PHP 8.2 compatibility
1 participant