PHP 8 Causing Anisble Conflicts

Hi all,

I am getting to grips with the Roots ecosystem which has been quite a lot of work but I wish to persevere and get this going.

The latest issue I am noticing is that, when I run vagrant up the virtual box fails to provision due to PHP 8 becoming the default version and hirak/prestissimo not supporting it.

I get the following error when running vagrant provision

non-zero return code
Changed current directory to /root/.composer
Do not run Composer as root/super user! See https://getcomposer.org/root for
details
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - hirak/prestissimo 0.3.9 requires php ^5.3.2 || ^7.0 -> your PHP version
(8.0.0rc1) does not satisfy that requirement.

I have tried editing the files in trellis/roles/php to set PHP version to 7.4 but it does not work.

Can someone advise me here? I tried to change it via CLI in the VM’s SSH environment but I get permission denied.

Any help would be appreciated. I don’t know why PHP 8 is the default now and I would like ^7 to be the default as this is what my server uses.

Thanks

2 Likes

Same issue here. I am running Trellis v1.4.0.

I happened to be doing a vagrant destroy/up today and error appears for me too.

vagrant ssh -> php -v = PHP 8.0.0rc1

  • Trellis 1.4.0 uses php 7.4 so I’m not sure why 8.0 was installed.
1 Like

As PHP 8 users, have you noticed a real world performance improvement?

For those facing the issue with php v8 being installed, there is a temporary workaround at https://github.com/roots/trellis/issues/1233#issuecomment-706643743

2 Likes

So after having tried out PHP 8 on Docker on WSL 2 (Docker for Desktop) I noticed a very significant performance boost. This is of course on WSL 2 with the files not on a Windows file sytem (WSl 2 - Windows filesytem crossing is still very slow) but on a *nix file system (which is very easy to keep in sync thanks to Git + Gitlab + VSCode).
I was also pleased by the appearance of only very few compatibility issues. There are still some warnings though and some DOM doesn’t seem to be correct in Gutenberg editor (compared to PHP 7), but overall evrything works as in PHP 7.4.

This topic was automatically closed after 42 days. New replies are no longer allowed.