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

LanguageServer script failing #795

Open
phatwhalemedia opened this issue Nov 2, 2020 · 6 comments
Open

LanguageServer script failing #795

phatwhalemedia opened this issue Nov 2, 2020 · 6 comments

Comments

@phatwhalemedia
Copy link

phatwhalemedia commented Nov 2, 2020

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

@pfernandez
Copy link

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

@hacktivista
Copy link

same err here 👎

@apfelchips
Copy link

apfelchips commented Nov 19, 2020

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

@AJenbo
Copy link

AJenbo commented Nov 24, 2020

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

CodyWilson added a commit to CodyWilson/php-language-server that referenced this issue Dec 7, 2020
phpstorm-stubs dev-master already had PHP8 features which are breaking
the parser per felixfbecker#795.
The simple solution for this is to force an older version of the stubs.
@CodyWilson
Copy link

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.

@Mte90
Copy link

Mte90 commented Jan 12, 2021

@felixfbecker any updates for this project?

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

7 participants