I have created an application based on symfony, and I am trying to deploy it on shared hosting.
Almost all tasks happen successfully, but on vendors it fails.
This is the log of tasks:
task deploy:info
[im] info deploying HEAD
task deploy:setup
task deploy:lock
task deploy:release
task deploy:update_code
task deploy:shared
task deploy:writable
task deploy:vendors
[im] error in vendors.php on line 31:
[im] run cd ~/myfolder/app/releases/1 && /usr/local/bin/php /opt/cpanel/composer/bin/composer install --verbose --prefer-dist --no-progress --no-interaction --no-dev --optimize-autoloader 2>&1
[im] Installing dependencies from lock file
[im] Verifying lock file contents can be installed on current platform.
[im] Dependency resolution completed in 0.000 seconds
[im] Your lock file does not contain a compatible set of packages. Please run composer update.
[im] Problem 1
[im] - Root composer.json requires php >=8.1 but your php version (7.4.33) does not satisfy that requirement.
[im] Problem 2
[im] - doctrine/collections is locked to version 2.1.2 and an update of this package was not requested.
[im] - doctrine/collections 2.1.2 requires php ^8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 3
[im] - doctrine/event-manager is locked to version 2.0.0 and an update of this package was not requested.
[im] - doctrine/event-manager 2.0.0 requires php ^8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 4
[im] - doctrine/instantiator is locked to version 2.0.0 and an update of this package was not requested.
[im] - doctrine/instantiator 2.0.0 requires php ^8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 5
[im] - doctrine/migrations is locked to version 3.6.0 and an update of this package was not requested.
[im] - doctrine/migrations 3.6.0 requires php ^8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 6
[im] - egulias/email-validator is locked to version 4.0.1 and an update of this package was not requested.
[im] - egulias/email-validator 4.0.1 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 7
[im] - monolog/monolog is locked to version 3.3.1 and an update of this package was not requested.
[im] - monolog/monolog 3.3.1 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 8
[im] - psr/cache is locked to version 3.0.0 and an update of this package was not requested.
[im] - psr/cache 3.0.0 requires php >=8.0.0 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 9
[im] - psr/link is locked to version 2.0.1 and an update of this package was not requested.
[im] - psr/link 2.0.1 requires php >=8.0.0 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 10
[im] - psr/log is locked to version 3.0.0 and an update of this package was not requested.
[im] - psr/log 3.0.0 requires php >=8.0.0 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 11
[im] - symfony/asset is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/asset v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 12
[im] - symfony/cache is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/cache v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 13
[im] - symfony/cache-contracts is locked to version v3.2.1 and an update of this package was not requested.
[im] - symfony/cache-contracts v3.2.1 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 14
[im] - symfony/config is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/config v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 15
[im] - symfony/console is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/console v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 16
[im] - symfony/dependency-injection is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/dependency-injection v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 17
[im] - symfony/deprecation-contracts is locked to version v3.2.1 and an update of this package was not requested.
[im] - symfony/deprecation-contracts v3.2.1 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 18
[im] - symfony/doctrine-bridge is locked to version v6.2.9 and an update of this package was not requested.
[im] - symfony/doctrine-bridge v6.2.9 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 19
[im] - symfony/doctrine-messenger is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/doctrine-messenger v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 20
[im] - symfony/dotenv is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/dotenv v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 21
[im] - symfony/error-handler is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/error-handler v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 22
[im] - symfony/event-dispatcher is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/event-dispatcher v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 23
[im] - symfony/event-dispatcher-contracts is locked to version v3.2.1 and an update of this package was not requested.
[im] - symfony/event-dispatcher-contracts v3.2.1 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 24
[im] - symfony/expression-language is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/expression-language v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 25
[im] - symfony/filesystem is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/filesystem v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 26
[im] - symfony/finder is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/finder v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 27
[im] - symfony/flex is locked to version v2.2.5 and an update of this package was not requested.
[im] - symfony/flex v2.2.5 requires php >=8.0 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 28
[im] - symfony/form is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/form v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 29
[im] - symfony/framework-bundle is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/framework-bundle v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 30
[im] - symfony/http-client is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/http-client v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 31
[im] - symfony/http-client-contracts is locked to version v3.2.1 and an update of this package was not requested.
[im] - symfony/http-client-contracts v3.2.1 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 32
[im] - symfony/http-foundation is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/http-foundation v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 33
[im] - symfony/http-kernel is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/http-kernel v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 34
[im] - symfony/intl is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/intl v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 35
[im] - symfony/mailer is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/mailer v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 36
[im] - symfony/messenger is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/messenger v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 37
[im] - symfony/mime is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/mime v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 38
[im] - symfony/monolog-bridge is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/monolog-bridge v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 39
[im] - symfony/notifier is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/notifier v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 40
[im] - symfony/options-resolver is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/options-resolver v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 41
[im] - symfony/password-hasher is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/password-hasher v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 42
[im] - symfony/process is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/process v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 43
[im] - symfony/property-access is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/property-access v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 44
[im] - symfony/property-info is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/property-info v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 45
[im] - symfony/routing is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/routing v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 46
[im] - symfony/runtime is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/runtime v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 47
[im] - symfony/security-bundle is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/security-bundle v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 48
[im] - symfony/security-core is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/security-core v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 49
[im] - symfony/security-csrf is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/security-csrf v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 50
[im] - symfony/security-http is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/security-http v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 51
[im] - symfony/serializer is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/serializer v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 52
[im] - symfony/service-contracts is locked to version v3.2.1 and an update of this package was not requested.
[im] - symfony/service-contracts v3.2.1 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 53
[im] - symfony/stopwatch is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/stopwatch v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 54
[im] - symfony/string is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/string v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 55
[im] - symfony/translation is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/translation v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 56
[im] - symfony/translation-contracts is locked to version v3.2.1 and an update of this package was not requested.
[im] - symfony/translation-contracts v3.2.1 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 57
[im] - symfony/twig-bridge is locked to version v6.2.8 and an update of this package was not requested.
[im] - symfony/twig-bridge v6.2.8 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 58
[im] - symfony/twig-bundle is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/twig-bundle v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 59
[im] - symfony/validator is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/validator v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 60
[im] - symfony/var-dumper is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/var-dumper v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 61
[im] - symfony/var-exporter is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/var-exporter v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 62
[im] - symfony/web-link is locked to version v6.2.7 and an update of this package was not requested.
[im] - symfony/web-link v6.2.7 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 63
[im] - symfony/yaml is locked to version v6.2.10 and an update of this package was not requested.
[im] - symfony/yaml v6.2.10 requires php >=8.1 -> your php version (7.4.33) does not satisfy that requirement.
[im] Problem 64
[im] - psr/cache 3.0.0 requires php >=8.0.0 -> your php version (7.4.33) does not satisfy that requirement.
[im] - doctrine/orm 2.15.1 requires psr/cache ^1 || ^2 || ^3 -> satisfiable by psr/cache[3.0.0].
[im] - doctrine/orm is locked to version 2.15.1 and an update of this package was not requested.
[im] exit code 2 (Misuse of shell builtins)
ERROR: Task deploy:vendors failed!
task deploy:failed
task deploy:unlock
I don't understand all these errors about PHP 8. On the remote server and on the local computer, I have PHP 8.2:
php -v
on remote server shows:
PHP 8.2.4 (cli) (built: Mar 23 2023 14:20:25) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.4, Copyright (c) Zend Technologies
with Zend OPcache v8.2.4, Copyright (c), by Zend Technologies
php -v
on local:
PHP 8.2.6 (cli) (built: May 11 2023 12:51:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.6, Copyright (c) Zend Technologies
with Zend OPcache v8.2.6, Copyright (c), by Zend Technologies
On remote and on local I executed:
composer self-update
And it says:
You are already using the latest
available Composer version 2.5.7
(stable channel).
What can i do to resolve this error?