stellarwp / slic

The slic (StellarWP Local Interactive Containers) CLI command provides a containerized and consistent environment for running automated tests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`slic site-cli cli info` version of PHP does not match that of `slic info`

cliffordp opened this issue · comments

slic site-cli cli info always shows PHP version: 7.4.33 but slic info shows SLIC_PHP_VERSION: 8.0

and it seems slic composer install uses the former's version and not the latter's

image

@defunctl confirmed better but not sure if 100% fixed because slic site-cli cli info gives full version number (PHP version: 8.0.28) and slic info outputs a truncated/rounded number (SLIC_PHP_VERSION: 8.0)

commented

That's correct, the environment variable, SLIC_PHP_VERSION is to tell Slic which PHP minor version should be used, and slic site-cli cli info is just running wp cli info inside the container.

These will never match (and aren't meant to), because one is showing you the currently set configuration option for Slic, and the other is the output of a 3rd party dependency/command.

Edit: The real bug here was the docker containers that were previously published only ever contained the default PHP 7.4 version, so any docker image besides the 7.4 had the incorrect PHP version installed in the container as they were mutated during the action, which according to the action docs, will be ignored.

Be careful because any file mutation in the steps that precede the build step will be ignored, including processing of the .dockerignore file since the context is based on the Git reference. However, you can use the Path context using the context input alongside the actions/checkout action to remove this restriction.

tyvm good sir