-
Notifications
You must be signed in to change notification settings - Fork 186
Installation error: "requires jetbrains/phpstorm-stubs dev-master ... conflict with your requirements or minimum-stability" #611
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
Comments
I agree that the But I don't want to duplicate explanations for basic concepts of how Composer works - for example, creating a composer.json. This language server is a Composer package, intended to be installed into a Composer project. A lot of PHP users are familiar with Composer, but for those who are not, the Readme links to its project website:
If you click "Getting started" Composer you get to a very easy to follow guide about what Composer is:
In particular, it explains that Composer works around projects:
Which leads you to how to the Basic Usage guide, which explains that you need a composer.json:
|
I understand what you're getting at, but the fact is that requiring users to firstly learn all about composer in order to figure out how to modify your recommended installation instructions so that they work is a significant (and entirely unnecessary) burden. The instructions say "Simply run (a) That's not true (or not for some users, at minimum). Your aim was clearly to make it simple for people, and I'm just trying to point out that at the moment it's not simple -- but it could easily be so, with a small amount of additional documentation. |
https://youtrack.jetbrains.com/issue/WI-40958 is a ticket in the phpstorm bug tracker for creating release tags for the stubs repo. If composer.json used version tags, this could be changed to version ranges. A related discussion is phpstan/phpstan#846 (comment) (But I'd assume that php-language-server uses auxilary information from the jetbrains stubs, such as method/class descriptions for hover text)
|
Local installationCreate a directory for php-language-server. Create a composer.json file in it, with the following contents:
Then, in the directory, run the following commands:
Global installationBefore installing php-language-server, make sure your ~/.config/composer/composer.json includes the lines below. The settings apply to all globally installed Composer packages, so proceed with caution. If you do not want to edit your global Composer configuration, see the section for local installation above.
After editing your composer.json, you can install felixfbecker/php-language-server. The following instructions have been adapted from the installation section of php-language-server
Slightly altered from a guide found here . |
@LeviHarman wanna do a PR for that? |
@felixfbecker I'd love to! I'll do the PR tonight when I get home. Should be 5 hours |
There was a stable version of the library in question tagged a couple weeks ago: v2018.1.2 - is it possible to just update Happy to set up a PR if you'd prefer to go that direction instead. |
I wonder if they will cut releases for every change? The versioning scheme is weird, I don't understand the benefit of the 2018 prefix, semver would be much more helpful. |
Agreed, I'd have strongly preferred semver, but I'll take what I can get here. A post in their bug tracker suggests they'll pin it to phpstorm versions. I just did a bit of testing, and |
This comment has been minimized.
This comment has been minimized.
@antwal this is unrelated, please open a new issue. |
The last command should be altered to include the global vendor path: composer global run-script --working-dir=$HOME/.config/composer/vendor/felixfbecker/language-server parse-stubs |
More generally, use |
Following from #594 (comment)
There are potential dependency problems with the installation instructions:
I've learned that this can be resolved by running the following first:
If that completes successfully, then you can continue with the original command:
The installation instructions ought to document this problem and its solution/workaround.
#519 is a duplicate of this, but the title of that issue is extremely vague in search results, and the suggested solution (which appears to entail modifying a composer.json file) doesn't make any sense in the context of the installation instructions for this project (which do not provide a composer.json file to modify).
The text was updated successfully, but these errors were encountered: