Closed norcross closed 1 year ago
Thanks for opening your first issue here! Be sure to follow the issue template and include your OS/Vagrant/VVV versions! Don't forget you can get support in the VVV slack at https://varyingvagrantvagrants.org/docs/en-US/slack/
VVV
Join the VVV Slack Workspace
if it matters, my OS is running PHP 8.2 itself
@norcross do you have PHP set to 8.2, or do you have the nginx upstream set to PHP 8.2? And is this via vagrant shell
or during provisioning?
sorry for the lack of clarity. here is the settings:
OS (Mac 12.6.2) : 8.2.0 Vagrant site (via config.yml): 8.0.27 WP CLI in Vagrant: 7.4.33
@norcross for provisioning it should be enough to declare php: 8.0
for the site, nginx_upstream
is obsolete for that, though still useful if you wanted to mess around with extensions and custom upstreams, e.g. if you wanted to install experimental PHP FPM's or stuff like HHVM
As for SSH'ing manually into the VM, it'll use the default by default, you would need to do one of the following:
php80
instead of php
to explicitly call PHP 8If you do take the second route, remember to reset the version afterwards, changing it isn't a per shell session thing, it's a system wide thing that takes effect until it's next changed. Re-provisioning will probably reset it back to 7.4 but there's a chance something expecting 7.4 will get 8.0 by accident and fail before then
GitHub
An open source Vagrant configuration for developing with WordPress - VVV/vvv_restore_php_default at develop · Varying-Vagrant-Vagrants/VVV
In the meantime, I'm hoping to bump the default to 8.0 soon
thank you! changing the default for now is likely the route i will take if you're gonna update the default here soon anyway. checking some notes i had, i apparently did this a while ago and forgot about it, which would explain why i didn't get errors until now.
Are you using the latest stable or develop branch version of VVV?
Yes (develop)
Is it a new VVV, or an existing VVV that used to work?
Existing, worked but now broken
Did you use a CustomFile?
No (default)
Whats the problem?
i apologize if this has been covered somewhere else, but i'm running into an issue where i have PHP 8.0 set in my config file and the site is correctly loading with it, however, the related WP-CLI is still running on 7.4.
i saw the discussion here, but didn't see anything on how to actually change which version is running inside the SSH / CLI.
I have functions that are new to PHP 8 that are throwing errors when the function is run via CLI
How do we reproduce it?
No response
What is the output of
vagrant status
Which Operating System are you using?
Apple MacOS (Intel)
Which provider are you using?
VirtualBox 6