Giter Club home page Giter Club logo

vscode-phpstan's People

Contributors

antoniopaisfernandes avatar binarious avatar calvinbaart avatar calvinfa avatar garbee avatar raul338 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

vscode-phpstan's Issues

Clear found problems after changing settings

Currently, when settings either phpstan.excludeFiles or phpstan.enabled are changed vscode-phpstan
doesn't re-evaluate list of found problems and doesn't clear the list when phpstan.enabled is set to false.

vscode-phpstan should at least remove found problems when phpstan.enabled = false in workspace settings.

Steps to reproduce:

  1. Open a php file where phpstan finds multiple problems
  2. Become annoyed because those are not real problems (phpstan doesn't recognize functions defined in same file)
  3. Open options and set phpstan.enabled = false
  4. Problem list not cleared
  5. Get even more annoyed

Allow custom php executable path

Hi!
I'm still forced to use php 5.6 at work, but I'm able to manually execute phpstan if I call it using my php7.1 executable as prefix to the phar path.

I mean something like

/usr/local/opt/[email protected]/bin/php /usr/local/bin/phpstan

Do you think it would be possible to add it to this extension?

Is this extension still working?

Hello

I've tried as many configuration possibilities I can but impossible to make things working.

I get the following error

Command 'PHPStan: Scan for Errors' resulted in an error (Running the contributed command: 'extension.scanForErrors' failed.)

And the console of the Developer Tools shows

Command 'PHPStan: Scan for Errors' resulted in an error (Running the contributed command: 'extension.scanForErrors' failed.)

Can you please give a few informations on how to configure vscode-phpstan?

Thanks

"spawn EACCES" error

After installing the plugin upon opening a php file I get the following errors in "Developer Tools"

phpstan

Please let me know how I can provide more info to debug the issue.

TypeError: Cannot read property 'fsPath' of undefined

I'm getting this exception on executing the command: "PHPScan: Scan for errors"
I'm using:
VS Code 1.24.1

I've install phpstan with that command line: composer global require phpstan/phpstan
I'm using default configuration of your module.

[2018-07-20 10:34:26.209] [exthost1] [error] TypeError: Cannot read property 'fsPath' of undefined
at PHPStan._command.vscode_1.commands.registerCommand (C:\Users\easypara.vscode\extensions\calsmurf2904.vscode-phpstan-0.1.8\out\phpstan.js:22:30)
at e._executeContributedCommand (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:697:706)
at e.$executeContributedCommand (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:698:212)
at e._doInvokeHandler (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:658:87)
at e._invokeHandler (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:657:779)
at e._receiveRequest (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:656:851)
at e._receiveOneMessage (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:656:620)
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:655:544
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:658:673
at c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:96:599
at e.fire (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:97:917)
at u (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:159:721)
at Socket. (c:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\node\extensionHostProcess.js:159:898)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at Pipe.onread (net.js:560:20) extension.scanForErrors

I can launch phpstan manually and it work without getting a fatal error:
image

phpstan blocked

Seems like phpstan entered an infinite loop. Where can I find its log in order to debug the situation?

Config for PHP binary path

This rather follows on from #9. (Not sure why the author self closed this, no explanation.)

It would be highly useful to be able to specify per-project the PHP binary path to use, particularly when working on systems with multiple PHP versions installed.

TypeError: Cannot read property 'fsPath' of undefined

Upon installing and having COMPOSER_HOME defined, I get the following error when running Scan for errors

[2018-06-30 11:59:22.597] [exthost1] [error] TypeError: Cannot read property 'fsPath' of undefined
	at PHPStan._command.vscode_1.commands.registerCommand (/home/raul/.vscode/extensions/calsmurf2904.vscode-phpstan-0.1.7/out/phpstan.js:22:30)
	at e._executeContributedCommand (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:674:613)
	at e.$executeContributedCommand (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:675:6)
	at e._doInvokeHandler (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:832)
	at e._invokeHandler (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:636:550)
	at e._receiveRequest (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:631)
	at e._receiveOneMessage (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:635:400)
	at /opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:634:315
	at /opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:637:395
	at /opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:95:432
	at e.fire (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:96:764)
	at Socket.<anonymous> (/opt/vscode/resources/app/out/vs/workbench/node/extensionHostProcess.js:154:338)
	at emitOne (events.js:96:13)
	at Socket.emit (events.js:191:7)
	at readableAddChunk (_stream_readable.js:178:18)
	at Socket.Readable.push (_stream_readable.js:136:10)
	at Pipe.onread (net.js:560:20) extension.scanForErrors

I'm using:

Versión: 1.24.1
Commit: 24f62626b222e9a8313213fb64b10d741a326288
Fecha: 2018-06-13T17:47:35.732Z
Shell: 1.7.12
Representador: 58.0.3029.110
Nodo 7.9.0
Arquitectura x64

phpstan.excludeFiles option does not exclude files

Files/folders added either to "files.exclude" and "phpstan.excludeFiles" should be excluded from phpstan checks as well, but it is not the case for me. The folders are already excluded in "files.exclude" successfully, but errors pop-up from the extension, even when the phpstan.excludeFiles option is set.

// Example workspace settings
{
	"folders": [
		{
			"path": "/Users/admin/Workspaces/myproject"
		}
	],
	"settings": {
		"phpstan.excludeFiles": [
			"mixedvendor",
			"mixedvendor/",
			"mixedvendor/*",
			"/mixedvendor",
			"/mixedvendor/",
			"/mixedvendor/*",
			"**/mixedvendor",
			"**/mixedvendor/",
			"**/mixedvendor/*",
		],
	},
}

This is happens MAC OSX

[phpstan] Uncaught Error: Call to private method Nette\Utils\ObjectMixin::hasProperty() from context 'Nette\Configurator' in C:\Users\cn\AppData\Roaming\Composer\vendor\nette\utils\src\Utils\SmartObject.php:32

[phpstan] Uncaught Error: Call to private method Nette\Utils\ObjectMixin::hasProperty() from context 'Nette\Configurator' in C:\Users\cn\AppData\Roaming\Composer\vendor\nette\utils\src\Utils\SmartObject.php:32

I do not have Nette installed. Trying to use with a Laravel project. Installed phpstan globally

Error markup appears, but does not disappear after fixing -- must reload VSCode

This is perfect for my workflow, but there is a blocking bug in my use of this.

When I introduce a problem in my code that PHPStan identifies, it marks up the error in the code nicely. But when I press ctrl-v to put it back, or fix it a different way, the error continues to be shown.

I can make it disappear by doing one of the following:

  1. Close and re-open VSCode. This will make the old error markup disappear.
  2. Introduce a different error somewhere else in the code. This will add new error markup and erase the old error markup. (But then the new error markup does not disappear when fixing it.)

I am running vscode-phpstan in VSCode on Ubuntu 16.04.

Compatibility with phpstan 0.11

Phpstan 0.11 has been released with BC breaks affecting this extension. The extension stopped working (no errors are shown) when I updated to 0.11 and continues to work after a downgrade.

This seems to be a problem at least:

CLI option --errorFormat superceded by --error-format

phpstan debug in console output

fix launch.json as followed:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
},
{
"name": "PHPStan",
"type": "php",
"request": "launch",
"program": "${file}",
"runtimeArgs": ["/u/php7/phpstan.phar","--no-progress", "--level=4", "--configuration=/u/php7/phpstan.neon", "analyse"],
"cwd": "${fileDirname}"
},
{
"name": "Syntax Check",
"request": "launch",
"type": "php",
"program": "${file}",
"runtimeArgs": ["-l"],
"cwd": "${workspaceFolder}"
}
]
}

PHPStan: process exited with error, see log

When installed in VS Code, the extension reports:

PHPStan: process exited with error, see log for details

However, I do not see any reference in the extension settings on how to locate the PHPStan log. Where is the referenced log located?

thank yoU!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.