Comments (16)
Do you have PHP 7 installed and in your PATH?
from vscode-php-intellisense.
Oh... I have PHP 5.3.8.
Does it depend on PHP 7?
Also, I don't have it in the PATH env. variable.
Can I instead have it in a workspace setting (I had some bad experiences with the PATH variable reaching max length in the past and it would be nice to avoid adding it there)?
from vscode-php-intellisense.
New info:
By adding the PHP 5.3.8 path in my user's PATH env. variable caused this error:
The PHP Language Client server crashed 5 times in the last 3 minutes. The server will not be restarted.
And this 5 times in the output:
Connection to server got closed. Server will restart.
I guess my PHP version is not supported. :(
from vscode-php-intellisense.
The language server (basically a process that runs in the background and provides completion etc) uses latest PHP features of PHP 7. You can still develop your app in whatever version you need, but the language server currently needs PHP 7 installed in your PATH.
from vscode-php-intellisense.
OK.
Thanks! :)
from vscode-php-intellisense.
I have a suggestion on this:
I think it would be very good if you provided a VSCode setting for the path of PHP 7.
The PATH environment variable tends to clutter with paths and reach its max length very often. :(
I would like to use a portable version of PHP 7, if that was possible, and only define the path from inside the VSCode. :)
I see other extensions do this:
"php.validate.executablePath": "C:\Program Files\php-7.0.11\php.exe",
That's just a suggestion. :)
from vscode-php-intellisense.
See #11, should be easy to implement, PR welcome
from vscode-php-intellisense.
OK.
This is my first time trying to do anything serious with Node but I will give it a shot.
Any idea why I get this error when I run the build task? :
Error: Cannot find module 'c:\Users\user\Desktop\php-intel\node_modules\vscode\bin\compile'
I guess, that without solving this I cannot do anything... :(
I did a :
npm install vscode
...but the generated folder only contains install
and test
, no compile
. :(
from vscode-php-intellisense.
I now see the main page of the project :
composer install
npm install
npm run compile
code .
Let me try with this one...
from vscode-php-intellisense.
OK.
I have followed the steps but I used a small variation because I have a tendency of not installing things but have them portable:
php composer.phar install <- Here I did it differently - hopefully it's the same...
npm install
npm run compile
It seems that it compiled the extension and it works, but I got this error :
12 error Windows_NT 10.0.14393
13 error argv "C:\\Program Files\\node-v4.6.0\\node.exe" "C:\\Program Files\\node-v4.6.0\\node_modules\\npm\\bin\\npm-cli.js" "run" "compile"
14 error node v4.6.0
15 error npm v2.15.9
16 error code ELIFECYCLE
17 error [email protected] compile: `node ./node_modules/vscode/bin/compile -p ./`
17 error Exit status 2
18 error Failed at the [email protected] compile script 'node ./node_modules/vscode/bin/compile -p ./'.
18 error This is most likely a problem with the php-intellisense package,
18 error not with npm itself.
18 error Tell the author that this fails on your system:
18 error node ./node_modules/vscode/bin/compile -p ./
18 error You can get information on how to open an issue for this project with:
18 error npm bugs php-intellisense
18 error Or if that isn't available, you can get their info via:
18 error
18 error npm owner ls php-intellisense
18 error There is likely additional logging output above.
Donno if you have seen this before...
from vscode-php-intellisense.
Is there no other error output? It apparently did not compile the extension. Do you have an out
dir created? Do you have node in your path? Also, try a newer Node / NPM version.
from vscode-php-intellisense.
These are the only lines that start with error
, :(
But it does generate the out
folder and the extension files and the test folder with its contents.
The extension seems to work as well when debugging.
So, not sure what this is... :^)
Anyway.
Maybe it's something small.
Maybe something I did previously is not be very correct.
But the extension seems to work so far when debugging, so I can probably try adding that setting (if I discover how to access its value). :)
from vscode-php-intellisense.
if I discover how to access its value
Found it! :)
from vscode-php-intellisense.
OK.
I have created a Pull Request! :)
That was a very interesting experience for me!
First time writing NodeJS code, first time writing TypeScript, first time working on a VSCode extension (debugging is cool!), first time working with Composer, second time touching NPM and node.exe.
You may find the changes bigger than expected.
If you don't like them, I have no problem if you turn them down. ;)
from vscode-php-intellisense.
Some possible improvements:
The variables php7Found
and errorList
might not be needed.
I have imported fs
thinking I should check if the file (php.exe) exists on the given paths, but I haven't used it.
And also the linter doesn't seem to like my coding style... :(
from vscode-php-intellisense.
I have tried to make the linter happy by fixing many issues, but it still nags for some reason.
Not sure what it wants anymore... :(
#18
Other than that the fix seem working and the code seems clean to me.
from vscode-php-intellisense.
Related Issues (20)
- Extension issue
- Extension issue
- Extension issue
- Keeps popping up with a Warning saying that the extension is not working properly. So I disabled it.
- php intellisense not found in vscode HOT 4
- Extension issue - PHP IntelliSense ver 2.3.14
- Extension issue
- function names inserted as GlobalFunctionName
- Extension issue
- Dependency Dashboard
- Extension issue
- Deprecation notice on start-up
- Go to definition not working on use statements HOT 1
- phpcs: Unable to locate phpcs. Command failed: "C:/Servers/php8" --version '"C:/Servers/php8"' is not recognized as an internal or external command, operable program or batch file.
- Extension issue
- This plugin shows an error when using PHP mixed with HTML
- Is this dead? HOT 2
- Deprecation warning via Github Copilot
- PHP + HTML indentation pattern
- Go To Definition fails with Definition not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-php-intellisense.