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

Unable to switch PHP version from 7.4 #187

Open
brianhogg opened this issue Apr 22, 2024 · 4 comments
Open

Unable to switch PHP version from 7.4 #187

brianhogg opened this issue Apr 22, 2024 · 4 comments

Comments

@brianhogg
Copy link

Steps to reproduce

  1. Run slic php-version set 8.1
  2. Response yes to restart the stack now

Expected

Stack images are restarted successfully

Actual

PHP version set to 8.2
Do you want to restart the stack now?  (yes) yes
Building the stack images...



Stack images built.

Updating the stack images...


[+] Pulling 5/0
 ✘ db Error        0.0s
 ✘ slic Error      0.0s
 ✘ wordpress Error 0.0s
 ✘ redis Error     0.0s
 ✘ chrome Error    0.0s
Error response from daemon: Get "https://ghcr.io/v2/": dialing ghcr.io:443 with direct connection: connecting to 140.82.112.34:443: dial tcp 140.82.112.34:443: connect: bad file descriptor

https://ghcr.io/v2/ appears to require auth:

{"errors":[{"code":"UNAUTHORIZED","message":"authentication required"}]}
@borkweb
Copy link
Member

borkweb commented Apr 24, 2024

Hrm, that's curious! I haven't seen that with slic before, so this will be a good thing to nail down and add to our docs! 🤔

Are you able to fetch the docker image within whatever environment you are running slic in?

wget https://ghcr.io/stellarwp/slic-wordpress-php8.2

@ntomkin
Copy link

ntomkin commented Apr 24, 2024

I've had this issue as well. I was able to completely delete the docker images, and when it re-created them they were in php 8.1. However, I now have a ton of issues with wpbrowser. It's hard to tell if it is slic or wpbrowser. Tests running with just codecept run seems to run wpbrowser without issue.

Warning: require_once(/wp-includes/PHPMailer/PHPMailer.php): Failed to open stream: No such file or directory in /var/www/html/wp-content/plugins/weather/vendor/lucatume/wp-browser/includes/core-phpunit/includes/mock-mailer.php on line 2

@brianhogg
Copy link
Author

While setting it up with a different plugin it seems to have used the 8.2 image. So I guess it needs to be done prior to doing anything else, or else deleting the docker images like @ntomkin mentioned.

After install I just get the following after doing a successful slic init <plugin>:

slic run
slic version 1.6.1 - StellarWP local testing and development tool

Using lifterlms


In Configuration.php line 236:

  Output path is not defined by key "paths: output"

I can open up a new issue for the above if you'd like. Thanks!

@cliffordp
Copy link
Contributor

Just tried it with slic v1.6.1 and slic php-version set 8.1 worked for me (was previously 8.0 before this command)

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

No branches or pull requests

4 participants