I was conding and accidentally all crashed, so I recieved the message in terminal Could not find a matching version of package ext-mysql_xdevapi. tried composer require nexilo/xdevapi-php
Using version ^1.2 for nexilo/xdevapi-php
./composer.json has been updated
Running composer update nexilo/xdevapi-php
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
`
and
Composer detected issues in your platform:
ext=mysql_xdevapi is a PHP extension and not maintained through composer. You can check this link for some help on this.
I've tried to install xdevapi via cmd and it works. Karl Withers ty.
My current Drupal Version: 8.7.8. Want to upgrade to 8.8.0.
I already run
composer update
composer prohibits drupal/core:8.8.0
drupal/core 8.8.0 requires typo3/phar-stream-wrapper (^3.1.3)
drupal/drupal - requires typo3/phar-stream-wrapper (^2.1.1)
drupal/core 8.8.0 requires doctrine/annotations (^1.4)
drupal/drupal - does not require doctrine/annotations (but v1.2.7 is installed)
So I run
composer update drupal/core typo/* doctrine/* --with-dependencies
It gives
Package "drupal/core" listed for update is not installed. Ignoring.
Package "typo/*" listed for update is not installed. Ignoring.
Loading composer repositories with package information
Updating dependencies (including require-dev)
The "http://repo.packagist.org/p/sdboyer/gliph%24a386760768df0346abad1d5c7e9e8dcf3eba1dd5aaa86a30ddc548504b0fffa0.json" file could not be downloaded: failed to open stream: Operation timed out
Retrying with degraded mode, check https://getcomposer.org/doc/articles/troubleshooting.md#degraded-mode for more info
[Composer\Downloader\TransportException]
The "http://repo.packagist.org/p/sdboyer/gliph%24a386760768df0346abad1d5c7e9e8dcf3eba1dd5aaa86a30ddc548504b0fffa0.json" file could not be downloaded: php_network_getaddresses: geta
ddrinfo failed: nodename nor servname provided, or not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known
On
composer outdated drupal/*
It gives
drupal/admin_toolbar 1.27.0 2.0.0 Provides a drop-down menu interface to the core Drupal Toolbar.
So I tried
composer update "drupal/admin_toolbar:^2.0"
Package "drupal/admin_toolbar:^2.0" listed for update is not installed. Ignoring.
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 drupal/admin_toolbar (locked at 1.27.0, required as ^2.0) is satisfiable by drupal/admin_toolbar[1.27.0] but these conflict with your requirements or minimum-stability.
I also delete composer.lock file vendor folder & run the composer clearcache then composer install command.
I am not sure what is causing the issue to upgrade.
Look into your composer.json which basic requirements are set.
I think you have some very specific versions where a range would help.
Set new version(range)s explicit from command line or in json (of course save your old file). It's easier to set/update multiple versions in the file than by command line.
Also it might help to use the option --with-dependencies to update multiple packages in one run.
Then you have help with
composer update --dry-run which will tell you what will happen and with
composer why-not <packet>[:<version>] which tells you why a packet (in version ...) can't be installed.
Try deleting your /vendor folder and reinstall.
According to Help docs, there are some new issues that may pop up when upgrading by composer 8.8.0 and above.
Update core via Composer - Drupal.org
I'm having trouble setting up php-casperjs for my project. I've never used composer before, so I'm not exactly sure what I'm doing wrong.
I got xampp installed on Windows with php version 5.6.12
Here are the steps I completed so far.
Downloaded and installed composer. It launches successfully from the command prompt.
Downloaded php-casperjs and extracted composer.json and src/Casper.php into my project folder C:\xampp\htdocs\test
Navigated to the project folder in the command prompt and ran composer install command which installed 22 packages
Then I ran composer require phpcasperjs/phpcasperjs command and here I ran into problems. I get the following error message
Using version ^1.2 for phpcasperjs/phpcasperjs
./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
- The requested package phpcasperjs/phpcasperjs No version set (parsed as 1.0.0) is satisfiable by phpcasperjs/phpcasperjs[No version
set (parsed as 1.0.0)] but these conflict with your requirements or
minimum-stability.
Installation failed, reverting ./composer.json to its original
content.
When I run the following php code
use Browser\Casper;
$casper = new Casper();
I get Fatal error: Class 'Browser\Casper' not found in C:\xampp\htdocs\test\test.php on line 3
Step1: Go to you project directory and create a file "composer.json"
codes for composer.json
{
"require": {
"monolog/monolog": "1.0.*"
}
}
Note: You can create you composer.json with your required packages but i just created a simple composer.json file with monolog/monolog package. For your understanding you can follow my steps (this). You can remove the package monolog later on.
Now navigate to the project directory where composer.json file located
Run the following command:
composer require phpcasperjs/phpcasperjs
And you faced the above problem because of wrong or mismatched version of the intended package. Keep in mind that you always can create composer.json with your custom packages and their versions and which will be your package manager. For more detail about composer please visit Link
When I run
sudo composer global require "laravel/lumen-installer=~1.0"
I get an error (below) that says it failed to download elfet/php-ssh.
Changed current directory to /Users/chad/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing elfet/php-ssh (v1.1.0)
Downloading: Connecting... Failed to download elfet/php-ssh from dist: The "https://api.github.com/repos/elfet/php-ssh/zipball/439becf180272542cbf154df4856a49dd3c4bf04" file could not be downloaded (HTTP/1.1 404 Not Found)
Now trying to download from source
I am meeting all the server requirements too. Any ideas why it's failing to install?
It is a elfet/php-ssh package not found issue and it was resolved
Refer: https://github.com/deployphp/deployer/issues/158
Or you can install lumen via composer create-project and refer the following link has good tutorial about install lumen and create a simple rest api.
link: http://wsnippets.com/create-rest-api-using-lumen-micro-framework-by-laravel/
I expected that
composer update videlalvaro/php-amqplib
would only update one dependency, but instead of that it updates all.
What am I missing?
PS: this dependency is defined as "videlalvaro/php-amqplib": "2.2.0" in composer.json
PPS: the composer version used is 3da05c68f9561fa822c522b1815435ff990493ff 2013-10-02 14:25:06
PPPS: the actual output:
$ composer.phar update videlalvaro/php-amqplib --no-dev
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- symfony/icu v1.2.0 requires lib-icu >=4.4 -> the requested linked library icu has the wrong version installed or is missing from your system, make sure to have the extension providing it.
- Installation request for symfony/icu == 1.2.0.0 -> satisfiable by symfony/icu[v1.2.0].
The command composer update videlalvaro/php-amqplib does just update that dependency. However it doesn't disable the other dependency checking that Composer does.
What the error message is complaining about is that the lib-icu is not available on your system. Apparently this would be solved by installing the PHP Intl extension.
You would see similar issues if you did a composer update on a project that required PHP 5.5 in one of it's requires, downgraded to PHP 5.4 and then ran composer update on a separate require, that didn't require PHP 5.5. Even though you wouldn't be updating the require that needs PHP 5.5, the requirements for that package would not be resolvable, and so Composer would fail.
In your case, even though you're just trying to update videlalvaro/php-amqplib to the latest version, the requirements for symfony/icu aren't met, and so the composer update fails.
Edit
To try to be helpful, I'm guessing you re-installed PHP since you last did an update, and either removed or forgot to install the PHP Intl extension. Composer can't satisfactorily satisfy the requirements your composer.json is setting, and so is defaulting to doing nothing, rather than knowingly doing an update where the requirements aren't met.
So basically, you need to install the PHP extensions that are required for your existing installed software to run, and then Composer will be able to update the single package you want to update, as well as meet the requirements for the other packages.
tl;dr:
You can list more than one dependency to update in one command:
composer update one/dependency second/dependency other/dependency
Story:
If you want to update only one dependency (composer update some/dependency), you may face an issue that request is not satisfiable due to some other dependency is installed in wrong version. And that one does not necessarily must be listed in your composer.json, it could be just dependency of some other dependency.
E.g. I wanted to update only and only google/apiclient, but calling composer update google/apiclient complained, that google/auth (dependency of apiclient) requires guzzlehttp/psr7 in version 1.2.3. I had 1.3.0 installed. The guzzlehttp/psr7 was not listed in my composer.json. What I had to do, was to call:
composer update guzzlehttp/psr7 google/apiclient
and that's it! Just update the package you want, and if composer tells you, that you need to update (or downgrade :-)) some other package, list it in the command.
I had a similar case due to security reasons on a GitHub repository.
I solved updating the dependency to a specific version like this:
composer require phpseclib/phpseclib:2.0.31
If you are working with virtual environments like docker containers (ddev, lando, etc..) before running it you should connect to the container with a:
ddev ssh
To overcome this kind of dependency problem during the update of a specific package you should specify all the specific packages versions before running their update altogether.
In your case something like this:
composer require videlalvaro/php-amqplib:2.2.0 --no-update
composer require symfony/icu:1.2.0 --no-update
composer require lib-icu:4.4 --no-update
composer update videlalvaro/php-amqplib symfony/icu lib-icu