Open cameronterry opened 2 years ago
I think this is happening to me when I use union types (php8) in my project. It looks like wpsnapshots pulls the Docker image from the wp-local-docker-image repository which only supports up to PHP 7.3
I created a PR in the wp-local-docker-image to add PHP 7.4, 8.0, and 8.1 --> https://github.com/10up/wp-local-docker-images/pull/27
@tlovett1 Can you confirm that this is the case with PHP support in wpsnapshots?
cc @johnwatkins0 @tylercherpak
Describe the bug
Using WP Snapshots with the latest VIP Go MU Plugins changes, https://github.com/Automattic/vip-go-mu-plugins/commit/51ccaa379bedb39f9f41ef7319d9ddfd87883a0c#diff-f689ded77c119b968db89a8c3b868aa245442df4c8711edbe95d59c0a471d834R18, is causing the following error (project name omitted using
*
):That line in particular is using a coding convention introduced in PHP 7.4 and above: https://www.php.net/manual/en/language.types.declarations.php.
Using the following with the Docker CLI confirms that the WP Snapshots container is running PHP 7.3.x, which will be the cause of the error:
Note: I previously created a ticket here, https://github.com/10up/wp-local-docker-v2/issues/305, incorrectly.
Steps to Reproduce
vip-go-mu-plugins
repository to thewp-content/mu-plugins
directory, using the guide here: https://docs.wpvip.com/how-tos/local-development/#h-step-2-add-vip-go-mu-plugins.10updocker wpsnapshots create
.Screenshots, screen recording, code snippet
No response
Environment information
WordPress information
WordPress: 5.9.3 Themes: custom Plugins:
Code of Conduct