Minify - Composer install error - php

I am trying to install from a composer.json file using composer install in the right directory but I am getting this error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package scrapbook/psr-cache could not be found in any version, there may be a typo in the package name.
Problem 2
- The requested package satooshi/php-coveralls dev-master exists as satooshi/php-coveralls[0.1.0, 0.2.0, 0.3.0, 0.3.1, 0.3.2, 0.4.0, 0.5.0, 1.0.x-dev, 1.1.x-dev, 2.0.x-dev, v0.6.0, v0.6.1, v0.7.0, v0.7.1, v1.0.0, v1.0.1, v1.0.2, v1.1.0, v2.0.0] but these are rejected by your constraint.

You have some problems:
1) There isn't any package named scrapbook/psr-cache inside packagist
2) satooshi/php-coveralls hasn't a valid version into your composer.json
I advise you to change the package psr-cache with one valid and fix the php-coveralls version
The composer error is very clear in this.
If you want to check for all valid package please refer to this:
Packagist

Related

Failed while installing a package using composer

iam tryin to use a cart package by using this command
composer require jason-napolitano/codeigniter4-cart-module
and it's failed. this is what it said
Using version dev-master for jason-napolitano/codeigniter4-cart-module
./composer.json has been updated
Running composer update jason-napolitano/codeigniter4-cart-module
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires jason-napolitano/codeigniter4-cart-module dev-master -> satisfiable by jason-napolitano/codeigniter4-cart-module[dev-master].
- jason-napolitano/codeigniter4-cart-module dev-master requires codeigniter4/framework ^4.0.3 -> satisfiable by codeigniter4/framework[v4.0.3, ..., v4.1.1] from composer repo (https://repo.packagist.org) but codeigniter4/framework[1.0.0+no-version-set] from root package repo has higher repository priority. The
packages with higher priority do not match your constraint and are therefore not installable. See https://getcomposer.org/repoprio for details and assistance.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
is it because my minimum-stability in composer.json is set to "stable"?
I presume you created your project by using composer create-project codeigniter4/framework. This effectively created a clean project for you without the .git folder, thus removing any metadata on what version of codeigniter4/framework package you installed. This is indicative by 1.0.0+no-version-set part of the error message.
The jason-napolitano/codeigniter4-cart-module package requires ^4.0.3 version of codeigniter4/framework, but since you have no version metadata in your project, install fails. This can be resolved by setting the version from which you bootstrapped your project manually in your root composer.json:
{
"name": "codeigniter4/framework",
"version": "4.0.3",
...
}
However, this is just a guess, since I have no insight into your main composer.json.
Your PHP is missing intl extension. It is useful for formatting currency, number and date/time as well as UCA-conformant collations, for message formatting and normalizing text..etc.
Check out Codeignitor 4 [Documentation][1]:
Follow the steps to install it in XAMPP -
Open [xampp_folder_path]/php/php.ini to edit.
Search for ;extension=intl and remove the ;.
Save the php.ini file and restart Apache.

The requested package exists but these are rejected by your constraint

I want to add this tag from the branch 1.x to my project.
I specified: "monolog/monolog": "dev-1.x#1.23.0"
And ran composer update monolog/monolog
Composer says:
Problem 1
- The requested package monolog/monolog dev-1.x#1.23.0 exists as monolog/monolog[1.0.0, 1.0.0-RC1, 1.0.1, 1.0.2, 1.1.0, 1.10.0, 1.11.0, 1.12.0, 1.13.0, 1.13.1, 1.14.0, 1.15.0, 1.16.0, 1.17.0, 1.17.1, 1.17.2, 1.18.0, 1.18.1, 1.18.2, 1.19.0, 1.2.0, 1.2.1, 1.20.0, 1.21.0, 1.22.0, 1.22.1, 1.23.0, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.5.0, 1.6.0, 1.7.0, 1.8.0, 1.9.0, 1.9.1, 1.x-dev, dev-master, 2.x-dev] but these are rejected by your constraint.
I want to pull specific tag from specific branch. What do I do? this answer suggests I should be ok.
UPDATE:
After following Loek's advise and removing everything before the actual tag I get this:
The requested package monolog/monolog (installed at 1.21.0, required as 1.23.0) is satisfiable by monolog/monolog[1.21.0] but these conflict with your requirements or minimum-stability.
I already have "minimum-stability": "dev" set up.
You can use the composer why-not command to see what packages are conflicting with the version you've specified.
So, without any changes to your composer.json, run:
composer why-not monolog/monolog 1.23.0
This should tell you where the conflict is occurring.
There are also some things you can do to make such conflicts less likely:
Be less strict in your version constraints. Pegging to a specific version of a package gives Composer less freedom to find a working set of packages.
Edit your constraints, and then run composer update without any arguments, to let Composer find the best set of packages that meets those constraints, rather than forcing it to change one package at a time.
I have had the same issue and the problem was on Packagist, I updated the release on Github and it was not updated on Packagist yet. So after updating it there the problem got fixed.
You can just specify the tag you want to download. If the package maintainers tagged their versions well, it doesn't matter on what branch or what stability it is. If you specify 1.23.0, it will always pull in 1.23.0.
EDIT
There is probably some package colliding. Check #IMSoP's answer for an easier way to resolve than mine.
Mine would be: update all the packages and Composer should show what packages are colliding.
I had a similar issue with phpmyadmin after some time keeping intact. version 4.5.0 which I realized was not existing, either deleted or wrongly inputted in past
What seems to help me was manually editing - removing the record from composer.json and issuing composer install command.
The next step was installing one of the concreted versions which was already mentioned like problematic - rejected by constrains 4.7.0 - php7.0 composer install phpmyadmin/phpmyadmin:4.7.0
I had also added along two settings - but those didn't seem to work alone
"minimum-stability": "dev",
"prefer-stable": true,
My original error message was
Problem 1
- The requested package phpmyadmin/phpmyadmin 4.5.0.* exists as phpmyadmin/phpmyadmin[4.0.0, 4.0.1, 4.0.10, 4.0.10.1, 4.0.10.2, 4.0.10.3, 4.0.10.4, 4.0.10.5, 4.0.10.6, 4.0.10.7, 4.0.10.8, 4.0.10.9, 4.0.2, 4.0.3, 4.0.4, 4.0.4.1, 4.0.4.2, 4.0.5, 4.0.6, 4.0.7, 4.0.8, 4.0.9, 4.7.0, 4.7.1, 4.7.2, 4.7.3, 4.7.4, 4.7.5, 4.7.6, 4.7.7, 4.7.8, 4.7.9, 4.7.x-dev, 4.8.0, 4.8.0.1, 4.8.1, 4.8.2, 4.8.3, 4.8.4, 4.8.5, 4.8.x-dev, 4.9.0, 4.9.0.1, 4.9.1, 4.9.x-dev, 5.0.x-dev, dev-master, 5.1.x-dev] but these are rejected by your constraint.

Issue with composer update

I've tried to run "php composer.phar update" but I got this error:
Key extra is a duplicate in ./composer.json at line 94
ComposerHookHandler::onPreUpdate
Deprecation Notice: The Composer\Package\LinkConstraint\VersionConstraint class is deprecated, use Composer\Semver\Constraint\Constraint instead. in phar:///home/budrysl2/domains/westeros.com.pl/public_html/composer.phar/src/Composer/Package/LinkConstraint/VersionConstraint.php:17
Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface instead. in phar:///home/budrysl2/domains/westeros.com.pl/public_html/composer.phar/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php:17
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
- The requested package mediawiki/mediawiki-codesniffer 0.5.0 is satisfiable by mediawiki/mediawiki-codesniffer[v0.5.0] but these conflict with your requirements or minimum-stability.
Problem 2
- The requested package mediawiki/mediawiki-codesniffer 0.5.0 is satisfiable by mediawiki/mediawiki-codesniffer[v0.5.0] but these conflict with your requirements or minimum-stability.
Problem 3
- The requested package mediawiki/mediawiki-codesniffer 0.4.0 is satisfiable by mediawiki/mediawiki-codesniffer[v0.4.0] but these conflict with your requirements or minimum-stability.
Problem 4
- The requested package mediawiki/mediawiki-codesniffer 0.4.0 is satisfiable by mediawiki/mediawiki-codesniffer[v0.4.0] but these conflict with your requirements or minimum-stability.
I use it on my MediaWiki page on westeros.com.pl
Could anybody help me?
Except for the duplicate "merge-plugin" key, your composer.json is correct and installs fine on my setup :
Generating optimized autoload files
Key merge-plugin is a duplicate in ./composer.json at line 92
Class ComposerHookHandler is not autoloadable, can not call pre-update-cmd script
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating optimized autoload files
$
Maybe there was a problem in one of the package dependencies before ?

Laravel: Install Microsoft Azure Client Library with composer

Does anyone installed Microsoft Azure Client Library to a Laravel 5 project with composer on an Ubuntu server?
When I try to install with Composer (command: composer require microsoft/windowsazure), I got the next error:
Using version ^0.4.1 for microsoft/windowsazure
./composer.json has been updated
> php artisan clear-compiled
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 microsoft/windowsazure ^0.4.1 -> satisfiable by microsoft/windowsazure[v0.4.1].
- microsoft/windowsazure v0.4.1 requires pear-pear2.php.net/http_request2 * -> no matching package found.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Installation failed, reverting ./composer.json to its original content.
Does anyone know what am I doing wrong?
Thanks for the help.
The problem was solved by modifying the config of the composer, by setting the secure-http to false
"config": {
"secure-http": "false"
}

zend framework 2 composer.php

when I try to install webino-image-thumb using zend php composer it gave me this error
php composer.phar require webino/webino-image-thumb:2.*<br/>
./composer.json has been updated<br/>
Loading composer repositories with package information<br/>
Ignoring unknown parameter "server role"<br/>
Updating dependencies (including require-dev)<br/>
Your requirements could not be resolved to an installable set of packages.<br/><br/>
Problem 1<br/>
- Can only install one of: zf-commons/zfc-admin[v0.1.0, dev-master].<br/>
- Can only install one of: zf-commons/zfc-admin[v0.1.0, dev-master].<br/>
- Installation request for zf-commons/zfc-admin 0.1.0 -> satisfiable by zf-commons/zfc-admin[v0.1.0].<br/>
- Installation request for zf-commons/zfc-admin == 9999999-dev -> satisfiable by zf-commons/zfc-admin[dev-master].<br/>Any help<br/>Lanka
Just replace "webino/webino-image-thumb":"2.*" by "webino/webino-image-thumb":"1.*"
Composer filters packages by stability and by default it requires a minimum stability of stable. You can change this to RC since webino-image-thumb is 2.0.0-RC1 at the time of writing this or just use the 1.* stable release. Check the doc here

Categories