capistrano-magento2
capistrano-magento2 copied to clipboard
Doesn't work with PHP 7.4 and Magento 2..42
Hi !
With Magento 2.4.2 and PHP 7.4.X,t he deployment doesn't work due to php's version in update/ directory. I've tried to update the Magento updater with this documentation: https://devdocs.magento.com/guides/v2.3/comp-mgr/updater/update-updater.html but without success.
To resolve this issue, I've deleted the update/ folder and all works fine. Do you think it would be possible to add a parameter not to update the updater?
https://github.com/davidalger/capistrano-magento2/blob/master/lib/capistrano/tasks/magento.rake#L132
Thanks !
You could also try:
SSHKit.config.command_map[:php] = "/usr/bin/php74"
SSHKit.config.command_map[:composer] = "/usr/bin/php74 /usr/local/bin/composer"
SSHKit.config.command_map[:magento] = "/usr/bin/php74 -f bin/magento --"
(If /usr/bin/php74 is the location of your php 7.4.x)
Hi @PascalBrouwers , Can I have question? I try to check your guide on above but It's not working. I checked capistrano use ssh and php default running to build. I have multi PHP env on staging server, I need defined exactly PHP env. How can I set value SSHKit.config.command_map[:php] = "/usr/bin/php*" on deploy.rd. Thank you
Just put it somewhere in the deploy.rd doesn't really matter where. Though it's better to put it in your config/[environment].rd
Hi @PascalBrouwers,
I tried to add a command on file.rd. It's working now.
Thanks for support