I'm using the following composer version, composer -V
Composer version #package_branch_alias_version# (1.0.0-beta2) 2016-03-27 16:00:34
I tried to do a "composer install" and I get the following error.
Drupal-project requires Composer version 1.0.0 or higher. Please update your Composer before continuing.
I don't know what should be checked differently on this project to be able to use a development version of composer.
I'd suggest uninstalling composer and re-installing the proper version:
second reply explains it pretty well, use the official documentation to re-install
Why am I unable to self-update composer?
Upgrade your system to Ubuntu 18.04 (bionic), where the Composer version is >= 1.0.0.
Related
Facing issue after downgrade the PHP version with updated version of composer,
I am trying to doing upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2 which option is given by CMD.
I tried myself with downgrade the PHP version using the Command of brew but I tried to get the solution for composer, Either it's possible to downgrade or upgrade the version of composer same like PHP.
After running sudo apt-get update && sudo apt-get dist-upgrade on my Laravel app, I'm getting this error on the next deployment:
- This package requires php ^7.1.3 but your PHP version (8.1.6) does not satisfy that requirement.
In my composer.json, ^7.1.3 is the specified version. This is my first time running the apt-get update and I don't know why the php version got updated as well.
On each deployment I run
composer install --no-interaction --prefer-dist --optimize-autoloader
How can I downgrade the version to 7.1.3? This happens on an existing app in production and I have to be very careful about it.
The php version installed on your environment should be compatible with your project.
If your project is based on composer package manager (as I see), it can help you to control which php version you need on the server.
In your case I would recommend to restore from the snapshot or just install php 7.1.3 version back.
If you want to use php 7.4/8/8.1 in your project, before you should upgrade your code and project dependencies and ensure, that everything working fine with the desired version of php.
Old topic, but for things like this, I recommend adding the flag to ignore requirements like this. So try:
composer install --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-reqs
There may be incompatibilities with your project using 8.1 instead of 7.1.3, but I doubt it. But still, only do this if you feel confident the PHP version won't be an issue. It's usually better than downgrading, however.
composer create-project --prefer-dist laravel/laravel:^7.0 blog using this command and I got error this
[InvalidArgumentException] Could not find package laravel/laravel
with version 7.0 in a version installable using your PHP version, PHP
exte nsions and Composer version.
Your PHP Version is not compatible with your Laravel version, If you are using XAMPP or other web servers, try to use the older version that is compatible with your Laravel-7 project file, and after that reinstall your Laravel-7 project.
Your PHP version is not compatible with Laravel version 7.0
Laravel 7 Docs
Laravel 7 requires PHP >= 7.2.5. Check your php version using php -v on terminal.
You can uninstall composer then again install it.
I just tried to install Magento 2 on my local server Xampp
I installed the composer and when tried to run composer install in command prompt , I got a error
amzn/amazon-pay-and-login-with-amazon-core-module 3.2.9 requires php 7.1.3- 7.2.0 your php version 7.3.2 doesn't satisfy that requirment.
How can I resolve this issue?
The current version of the amzn/amazon-pay-and-login-with-amazon-core-module package requires PHP version 7.2. You're on PHP version 7.3.2 which is not supported by version 3.2.9 of the package (yet).
You have multiple options to resolve the issue:
Downgrade to PHP 7.2.x to match the package's requirements.
Try to install a newer version of the package or directly from the master branch.
If the compatibility with PHP 7.3 has been added to the package's composer.json i.e. in a newer version or on the master branch you can use:
# install the master branch
composer require 'amzn/amazon-pay-and-login-with-amazon-core-module:dev-master'
# install a version greater than 3.2.9
composer require 'amzn/amazon-pay-and-login-with-amazon-core-module:~3.2.10'
Ignore the PHP version requirement for a single composer install with:
composer install --ignore-platform-reqs
Override the PHP version in your composer.json.
"config": {
"platform": {
"php": "7.2.21"
}
}
This way all subsequent runs of composer install|update will resolve the PHP to version 7.2.21.
I installed phpbrew to use php 5.4 in Ubuntu 14.04. It works fine, except when I try to use composer, which ignores phpbrew and installs dependencies related to php 5.5.
Is there a way to force composer to be compatible with phpbrew config?
I trying to add: php: "5.4" in my composer.json, but it says that this requirement is not possible with my php version.
You can easy install composer with phpbrew by following command:
$ phpbrew app get composer
Source: https://github.com/phpbrew/phpbrew Section: Installing Extra Apps
I was getting an error as app is not a valid command. To fix this, I used brew install composer.