php-language-server icon indicating copy to clipboard operation
php-language-server copied to clipboard

Include local and global installation instructions in README.md.

Open LeviHarman opened this issue 7 years ago • 6 comments
trafficstars

This pull request alters the installation section of the readme to include the installation instructions found at emacs-lsp/lsp-php

I found that guide helpful. Hopefully it helps others.

LeviHarman avatar Apr 26 '18 23:04 LeviHarman

Codecov Report

Merging #639 into master will not change coverage. The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #639   +/-   ##
=========================================
  Coverage     81.52%   81.52%           
  Complexity      912      912           
=========================================
  Files            62       62           
  Lines          2078     2078           
=========================================
  Hits           1694     1694           
  Misses          384      384

codecov[bot] avatar Apr 26 '18 23:04 codecov[bot]

Side question, what is the use case for installing globally?

felixfbecker avatar May 01 '18 00:05 felixfbecker

I haven't done it myself. I included it because it was in emacs-lsp/lsp-php readme. I'll ask the creator of the README and see why he included it.

LeviHarman avatar May 01 '18 14:05 LeviHarman

Would appreciate this getting merged too as current instructions in the readme did not work for me and I wasn't sure why as I don't know composer.

I got this error with default instructions:

% composer require felixfbecker/language-server
Using version ^5.4 for felixfbecker/language-server
./composer.json has been created
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 v5.4.2 requires jetbrains/phpstorm-stubs dev-master -> satisfiable by jetbrains/phpstorm-stubs[dev-master] but these conflict with your requirements or minimum-stability.
    - felixfbecker/language-server v5.4.1 requires jetbrains/phpstorm-stubs dev-master -> satisfiable by jetbrains/phpstorm-stubs[dev-master] but these conflict with your requirements or minimum-stability.
    - felixfbecker/language-server v5.4.0 requires jetbrains/phpstorm-stubs dev-master -> satisfiable by jetbrains/phpstorm-stubs[dev-master] but these conflict with your requirements or minimum-stability.
    - Installation request for felixfbecker/language-server ^5.4 -> satisfiable by felixfbecker/language-server[v5.4.0, v5.4.1, v5.4.2].


Installation failed, deleting ./composer.json.

rchl avatar Sep 29 '18 14:09 rchl

Well, to be fair these instructions didn't help either. Still getting same error.

But personally I think installing globally makes sense as this is the kind of package that IMO should be installed globally in user's directory rather than in specific project as it is generally consumed by text editors.

rchl avatar Sep 29 '18 14:09 rchl

I have found #611 and managed to fix my issue.

Problem for me was that I already had ~/.composer directory so running composer global require felixfbecker/language-server used composer.json from that directory instead of global one from ~/.config/composer/composer.json.

EDIT: But then after deleting ~/.composer, running composer global require felixfbecker/language-server still didn't user configuration file from ~/.config/composer/composer.json so I had to actually put these configuration options in ~/.composer/composer.json.

rchl avatar Sep 29 '18 14:09 rchl