Php-language-server: composer global require felixfbecker/php-language-server fails

Created on 2 Feb 2017  路  9Comments  路  Source: felixfbecker/php-language-server

Here's what I'm seeing:

$ composer global require felixfbecker/language-server
Changed current directory to /home/cweagans/.config/composer
Using version ^4.2 for felixfbecker/language-server
./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
    - felixfbecker/language-server v4.2.3 requires squizlabs/php_codesniffer 3.0.x-dev#e8acf8e029301b0e3ea7e7c9eef0aee914db78bf -> satisfiable by squizlabs/php_codesniffer[3.0.x-dev] but these conflict with your requirements or minimum-stability.
    - felixfbecker/language-server v4.2.2 requires squizlabs/php_codesniffer 3.0.x-dev#e8acf8e029301b0e3ea7e7c9eef0aee914db78bf -> satisfiable by squizlabs/php_codesniffer[3.0.x-dev] but these conflict with your requirements or minimum-stability.
    - felixfbecker/language-server v4.2.1 requires squizlabs/php_codesniffer 3.0.x-dev#e8acf8e029301b0e3ea7e7c9eef0aee914db78bf -> satisfiable by squizlabs/php_codesniffer[3.0.x-dev] but these conflict with your requirements or minimum-stability.
    - felixfbecker/language-server v4.2.0 requires squizlabs/php_codesniffer 3.0.x-dev#e8acf8e029301b0e3ea7e7c9eef0aee914db78bf -> satisfiable by squizlabs/php_codesniffer[3.0.x-dev] but these conflict with your requirements or minimum-stability.
    - Installation request for felixfbecker/language-server ^4.2 -> satisfiable by felixfbecker/language-server[v4.2.0, v4.2.1, v4.2.2, v4.2.3].


Installation failed, reverting ./composer.json to its original content.

Would it be okay to update the codesniffer dependency to their most recent 3.0 RC?

Most helpful comment

@hk0i this should work:

composer global require "squizlabs/php_codesniffer:3.0.0RC3 as 3.0.0"

You will probably also run into a minimum stability error for the phpstorm-stubs, so you can do this:

composer global require "jetbrains/phpstorm-stubs:dev-master@dev"

All 9 comments

No, the 3.0 RC is bugged. I don't know how to increase the minimum-stability to dev for global packages, that would be the way to go.

Do you know which specific bug it is? 'Cause I'm seeing that RC2 was tagged after the commit that codesniffer is pinned at.

It was https://github.com/squizlabs/PHP_CodeSniffer/issues/1218. If you think RC2 includes that, feel free to do a PR that updates the dependency and test it out. Note that the pinning doesn't work really, it always uses the latest branch.

Just based on the dates of the commits in that issue and when RC2 was tagged, I'm pretty sure it's there, but I'll open a PR to test it out.

You should consider adding a composer.lock to the repo, though. That way, your tests are always happening against a particular version of the dependency.

No. composer.lock is for projects, not for libraries.

I think that's a bit of a false distinction, but nbd. If you don't want to, it's all good. Opening PR shortly.

I'm getting a similar issue, could someone point me in the right direction of what I need to do here?

composer require felixfbecker/language-server
Using version ^4.4 for felixfbecker/language-server
./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
    - felixfbecker/language-server v4.4.1 requires squizlabs/php_codesniffer 3.0.0RC3 -> satisfiable by squizlabs/php_codesniffer[3.0.0RC3] but these conflict with your requirements or minimum-stability.
    - felixfbecker/language-server v4.4.0 requires squizlabs/php_codesniffer 3.0.0RC3 -> satisfiable by squizlabs/php_codesniffer[3.0.0RC3] but these conflict with your requirements or minimum-stability.
    - Installation request for felixfbecker/language-server ^4.4 -> satisfiable by felixfbecker/language-server[v4.4.0, v4.4.1].


Installation failed, reverting ./composer.json to its original content.

@hk0i this should work:

composer global require "squizlabs/php_codesniffer:3.0.0RC3 as 3.0.0"

You will probably also run into a minimum stability error for the phpstorm-stubs, so you can do this:

composer global require "jetbrains/phpstorm-stubs:dev-master@dev"
Was this page helpful?
0 / 5 - 0 ratings