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

LanguageServer script failing

Open phatwhalemedia opened this issue 4 years ago • 6 comments

Guys/ladies, I'm having some trouble getting composer/language-server setup in Ubuntu Linux. This is the latest error in my quest to finish this apparently insurmountably difficult task. Granted I'm new to composer, so this is all still a bit confusing.

After running

composer run-script --working-dir=vendor/felixfbecker/language-server parse-stubs

The script fails on line

Parsing file:///home/phatwhalemedia/.config/composer/vendor/jetbrains/phpstorm-stubs/http/http.php

Giving this error

Script LanguageServer\ComposerScripts::parseStubs handling the parse-stubs event terminated with an exception

  [RuntimeException]                         
  A type is missing before a type separator

If there's any further info required, please let me know.

I've been following the steps from the following link: #611

phatwhalemedia avatar Nov 02 '20 22:11 phatwhalemedia

Same. My "workaround" was to simply remove ~/.config/composer/vendor/jetbrains/phpstorm-stubs/http/http.php for the time being.

pfernandez avatar Nov 14 '20 02:11 pfernandez

same err here :-1:

3ynm avatar Nov 19 '20 04:11 3ynm

You can use the bundled language server from the vscode extension https://marketplace.visualstudio.com/items?itemName=felixfbecker.php-intellisense --> download extension --> rename to .zip --> /extension/vendor/felixfbecker/language-server/bin

apfelchips avatar Nov 19 '20 08:11 apfelchips

Also fails on vendor/jetbrains/phpstorm-stubs/standard/standard_8.php

AJenbo avatar Nov 24 '20 09:11 AJenbo

I submitted a simple pull request to fix this.

The simple solution until that's merged is to setup your composer.json like so:

{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/CodyWilson/php-language-server"
        }
    ],
    "require": {
        "felixfbecker/language-server": "dev-master"
    }
}

Alternatively you could fork it yourself and do that change, and set the version control to point to your fork.

CodyWilson avatar Dec 07 '20 15:12 CodyWilson

@felixfbecker any updates for this project?

Mte90 avatar Jan 12 '21 15:01 Mte90