Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trouble Installing with Composer #33

Open
KyleWLawrence opened this issue Nov 20, 2022 · 5 comments
Open

Trouble Installing with Composer #33

KyleWLawrence opened this issue Nov 20, 2022 · 5 comments

Comments

@KyleWLawrence
Copy link

Sorry, I know this answer should be obvious, but I've spent way too much time on this without success. I'm just trying to install this branch with Composer running PHP8.1.12. I think this is a "me" issue and not a package issue, but hoping someone can help :)

Here's what I've done:

composer require felixfbecker/language-server --ignore-platform-req php

Then I go and edit the composer.json:
{ "require": { "jetbrains/phpstorm-stubs": "@dev", "felixfbecker/language-server": "dev-master" }, "repositories": [ { "type": "vcs", "url": "https://github.com/zobo/php-language-server" } ] }

Then when I run "composer update felixfbecker/language-server" I get an error:
- Root composer.json requires felixfbecker/language-server dev-master, it is satisfiable by felixfbecker/language-server[dev-master] from composer repo (https://repo.packagist.org) but felixfbecker/language-server[dev-@semantic-release/last-release-git-tag-2.0.0-38.1.0, ..., dev-prettier, v1.0.0, v2.0.0, ..., v2.3.1, v3.0.0, v3.0.1, v3.1.0, v4.0.0, ..., v4.6.4, v5.0.0, ..., v5.4.6] from vcs repo (github https://github.com/zobo/php-language-server) has higher repository priority. The packages from the higher priority repository do not match your constraint and are therefore not installable. That repository is canonical so the lower priority repo's packages are not installable. See https://getcomposer.org/repoprio for details and assistance.

However, if I change the composer version to "dev-main" (instead of "dev-master"), I get this:
Problem 1 - Root composer.json requires felixfbecker/language-server dev-main -> satisfiable by felixfbecker/language-server[dev-main]. - felixfbecker/language-server dev-main requires felixfbecker/language-server-protocol dev-main -> found felixfbecker/language-server-protocol[dev-master, v1.0.0, ..., 1.x-dev (alias of dev-master)] but it does not match the constraint.

Any idea what I'm doing wrong in this composer configuration?

@zobo
Copy link
Owner

zobo commented Nov 21, 2022

Hi. The problem is probably all the overrides I use, since I'm not in control of composer packages...

You will probably need to do something like this:

{ "require": { 
"jetbrains/phpstorm-stubs": "@dev", 
"felixfbecker/language-server": "dev-main",
"felixfbecker/language-server-protocol": "dev-main",
 }, "repositories": [ 
{ "type": "vcs", "url": "https://github.com/zobo/php-language-server" },
{ "type": "git", "url": "https://github.com/zobo/php-language-server-protocol" } 
] }

The se overrides do not get inherited, but must be entered in the top composer.json.

I did not try this, so hope it works.

@KyleWLawrence
Copy link
Author

KyleWLawrence commented Dec 7, 2022

Well I'm not going crazy then, here's the error I get on it. I guess this just isn't installable with composer at this point, even through overrides?

Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - composer/xdebug-handler[1.1.0, ..., 1.3.3] require php ^5.3.2 || ^7.0 -> your php version (8.1.13) does not satisfy that requirement.
    - phan/phan[5.4.0, ..., 5.4.1] require composer/xdebug-handler ^2.0|^3.0 -> satisfiable by composer/xdebug-handler[2.0.0, ..., 2.0.5, 3.0.0, 3.0.1, 3.0.2, 3.0.3].
    - You can only install one version of a package, so only one of these can be installed: composer/xdebug-handler[1.1.0, ..., 1.4.6, 2.0.0, ..., 2.0.5, 3.0.0, 3.0.1, 3.0.2, 3.0.3].
    - felixfbecker/language-server dev-main requires composer/xdebug-handler ^1.0 -> satisfiable by composer/xdebug-handler[1.0.0, ..., 1.4.6].
    - Root composer.json requires felixfbecker/language-server dev-main -> satisfiable by felixfbecker/language-server[dev-main].
    - Root composer.json requires phan/phan ^5.4 -> satisfiable by phan/phan[5.4.0, 5.4.1].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.

@zobo
Copy link
Owner

zobo commented Dec 7, 2022

I can try to update the definitions in the language server project.
It would help if you could give me some extra context on what you are trying to do.

@zobo
Copy link
Owner

zobo commented Dec 10, 2022

I was working on this project today and I have to say I did not see any problems.
composer/xdebug-handler is 1.4.6
phan/phan is 5.3.1

@KyleWLawrence
Copy link
Author

Hey, sorry for the late replies. I'm simply trying to install your branch with composer, but I can't seem to find a way that a) doesn't give me an error and b) loads your branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants