vccw-team / vccw

A Vagrant based development environment.
http://vccw.cc/
MIT License
1.02k stars 181 forks source link

Updating to php7.4: composer fails to install #362

Open sid099 opened 3 years ago

sid099 commented 3 years ago

Operating System: MacOS Vagrant Version: 2.2.10 Virtual Box Version: 6.1.12

Hello, I have an issue when upgrading the version of PHP, Which I think is due to a mix match between the vagrant config an the virtual machine. When I update PHP by sshing into the VM everything works fine. The issue occurs when starting the box back up/provisioning which breaks my site every time. Heres a part of the error I'm getting:

TASK [Install Composer libraries] **********************************************
failed: [site.test] (item=phpunit/phpunit:5.6) => {"ansible_loop_var": "item", "changed": false, "item": "phpunit/phpunit:5.6", "msg": "Deprecation Notice: Array and string offset access syntax with curly braces is deprecated in phar:///usr/local/bin/composer/vendor/justinrainbow/json-schema/src/JsonSch...

This is what I'm running on the VM to update it... Like I said - It works perfectly before it breaks

sudo apt update && sudo apt upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.4
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y
sudo a2dismod php7.0
sudo a2enmod php7.4
sudo service apache2 restart

I have tried commenting out the part where the composer stuff runs which does stop the error from showing in the terminal however my site is still broken after. Is this a known error? You should be able to reproduce this easily, Its happened 100% of the time on my machine.