Good day:
I'm running PHP 5.6 and I'm trying to install aws/aws-sdk-php however, getting error:
$ composer require aws/aws-sdk-php
./composer.json has been updated
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
- symfony/translation v4.1.3 requires php ^7.1.3 -> your PHP version (5.6.20) does not satisfy that requirement.
- symfony/translation v4.1.3 requires php ^7.1.3 -> your PHP version (5.6.20) does not satisfy that requirement.
- Installation request for symfony/translation == 4.1.3.0 -> satisfiable by symfony/translation[v4.1.3].
Installation failed, reverting ./composer.json to its original content.
Not sure why I'm getting this issue as aws/aws-sdk-php requires minimum PHP 5.6 however, these dependencies requires php 7. I already have these dependencies installed in my vendor directory (through composer)
"require" : {
"jenssegers/proxy" : "^2.2",
"league/oauth2-client" : "0.12.1",
"zendframework/zend-diactoros" : "^1.7",
"nesbot/carbon" : "^1.22"
}
As #rob006 mentioned, I needed to delete my vendor directly and run composer again.
This main reason for the issue is that I ran composer install initially on a PHP 7 system and then ran it subsequently on php 5.6 which cause the issue. Another fix is to set the platform version of php in the composer.json file.
Related
I am trying to make pdf using baaryvdh/dompdf in laravel but while installing the package using the command:
`composer require barryvdh/laravel-dompdf`
getting the error:
Using version ^0.9.0 for barryvdh/laravel-dompdf
./composer.json has been updated
Running composer update barryvdh/laravel-dompdf
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/ui[v3.0.0, ..., v3.2.0] require illuminate/console ^8.0 -> found illuminate/console[v8.0.0, ..., v8.36.2] but these were not loaded, likely because it conflicts with another require.
- Root composer.json requires laravel/ui ^3.0 -> satisfiable by laravel/ui[v3.0.0, v3.1.0, v3.2.0].
Run below command
composer require barryvdh/laravel-dompdf:0.8.5
But Remember above version needs,
This package requires php ^7.1.3.
Because if will not pass version bydefault it will take latest version and the latest version of dompdf is supported with laravel 8 and laravel ui 3.x
or
Please run "Composer update" Command
And Then Run
composer require barryvdh/laravel-dompdf:0.8.5
Hope this will work for you.
I tried to install phpunit/phpunit-selenium but it shows me few errors. I given it in below:
composer require --dev phpunit/phpunit-selenium
Using version ^7.0 for phpunit/phpunit-selenium
./composer.json has been updated
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
- Installation request for phpunit/phpunit-selenium ^7.0 -> satisfiable by phpunit/phpunit-selenium[7.0.0].
- phpunit/phpunit-selenium 7.0.0 requires phpunit/phpunit >=7.0,<8.0 -> satisfiable by phpunit/phpunit[7.0.0, 7.0.1, 7.0.2, 7.0.3, 7.1.0, 7.1.1, 7.1.2, 7.1.3, 7.1.4, 7.1.5, 7.2.0, 7.2.1, 7.2.2, 7.2.3, 7.2.4, 7.2.5, 7.2.6, 7.2.7, 7.3.0, 7.3.1, 7.3.2, 7.3.3, 7.3.4, 7.3.5, 7.4.0, 7.4.1, 7.4.2, 7.4.3, 7.4.4, 7.4.5, 7.5.0, 7.5.1, 7.5.10, 7.5.11, 7.5.12, 7.5.13, 7.5.14, 7.5.15, 7.5.16, 7.5.2, 7.5.3, 7.5.4, 7.5.5, 7.5.6, 7.5.7, 7.5.8, 7.5.9, 7.5.x-dev] but these conflict with your requirements or minimum-stability.
Installation failed, reverting ./composer.json to its original content.
Before installing selenium, I tried to install PHPUnit and it installed successfully.
I also move the selenium jar file to usr/local/bin folder then run it.
I didn't find any solution. Can anyone help me out for this?
I'm trying to create a new laravel app, but when I use the command "laravel new" I've got an error :
laravel new
Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for phpunit/php-token-stream 2.0.0 -> satisfiable by phpunit/php-token-stream[2.0.0].
- phpunit/php-token-stream 2.0.0 requires php ^7.0 -> your PHP version (5.6.30) does not satisfy that requirement. Problem 2
- phpunit/php-token-stream 2.0.0 requires php ^7.0 -> your PHP version (5.6.30) does not satisfy that requirement.
- phpunit/php-code-coverage 4.0.8 requires phpunit/php-token-stream ^1.4.2 || ^2.0 -> satisfiable by phpunit/php-token-stream[2.0.0].
- Installation request for phpunit/php-code-coverage 4.0.8 -> satisfiable by phpunit/php-code-coverage[4.0.8].
Application ready! Build something amazing.
I'm on Windows 10, with php 5.6.30 installed.
I already tried to update composer itself, and laravel's installer (via composer global require "laravel/installer"), but it still doesn't work.
Last time I tried on this computer was three weeks ago, and it worked then.
Edit : I can't change my PHP version since it is the one I use on my server.
It looks like you are trying to download the latest realease of laravel. Though it is 5.4 but for some reason, it is downloading laravel's version that is compatible only with PHP7
Try with composer create-project --prefer-dist laravel/laravel blog "5.4.*" to install laravel 5.4
It's only the phpunit version. Change the version to smaller, like:
"phpunit/phpunit": "~5.7"
to
"phpunit/phpunit": "~5.0"
I have Symfony Demo Application up and running and now I'm trying to install API Platform as a standalone bundle.
I'm using PHP 7.0.10 with latest composer, but my previous test was using PHP 5.6.20.
When I try to add API Platform Core as a dependency, I get the following error message:
$ composer require api-platform/core
Using version ^1.1 for api-platform/core
./composer.json has been updated
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
- Installation request for symfony/symfony (locked at v3.2.8, required as ^3
.2) -> satisfiable by symfony/symfony[v3.2.8].
- api-platform/core v1.1.0 requires phpdocumentor/reflection ^1.0.7 -> satis
fiable by phpdocumentor/reflection[1.0.7].
- api-platform/core v1.1.1 requires phpdocumentor/reflection ^1.0.7 -> satis
fiable by phpdocumentor/reflection[1.0.7].
- Conclusion: don't install phpdocumentor/reflection 1.0.7
- Installation request for api-platform/core ^1.1 -> satisfiable by api-plat
form/core[v1.1.0, v1.1.1].
Installation failed, reverting ./composer.json to its original content.
In your composer.json file:
Find:
"symfony/symfony": "3.2.*",
Replace with:
"symfony/symfony": "3.3.*",
...or:
"symfony/symfony": "^3.2.*",
You'll probably need (want) to run composer update first, THEN add your api-platform package with composer require api-platform/core so you have all the dependencies properly loaded, but it's not essential.
With PHP 7.x, you should be using ^2.0, e.g.
composer require api-platform/core ^2.0
Note: To workaround PHP 7.x requirements, you can try to add --ignore-platform-reqs.
If you get the error about minimum-stability, change it to beta in your composer.json file.
Source: Compatibility issue when using composer require with symfony 3.1.4 at GitHub.
See: Installing API Platform Core.
I've been trying to install composer.phar to my HostGator website. However, I come across this error:
[~/public_html/flarum]# php composer.phar install
Loading composer repositories with package information
Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- flarum/core v0.1.0-beta.4 requires php >=5.5.9 -> your PHP version (5.4.45) or value of "config.platform.php" in composer.json does not satisfy that requirement.
- flarum/core v0.1.0-beta.3 requires php >=5.5.9 -> your PHP version (5.4.45) or value of "config.platform.php" in composer.json does not satisfy that requirement.
- flarum/flarum-ext-suspend v0.1.0-beta.3 requires flarum/core ^0.1.0-beta.3 -> satisfiable by flarum/core[v0.1.0-beta.3, v0.1.0-beta.4].
- Installation request for flarum/flarum-ext-suspend ^0.1.0 -> satisfiable by flarum/flarum-ext-suspend[v0.1.0-beta.3].
I have updated my PHP to the newest via the cPanel.
If there is any help at all that I could get on this it would be greatly appreciated!
Your PHP version is too low for Flarum. You need 55 or better 56.
Enable and use a higher PHP version on HostGator.
To find the other PHP versions take a look at the /opt/ folder.
# /opt/php56/bin/php composer.phar install
You can refer this link
http://laravel.io/forum/02-13-2014-how-to-install-laravel-on-a-hostgator-shared-server
and install flarum with following
~/composer create-project flarum/flarum ~/public_html/flarum --stability=beta