Closed apss-pohl closed 1 week ago
What logging did you add exactly? So what values is it logging? The line number you shared is the line of minified code in the bundle so I don't really know what should be on that line. A screenshot of the logging code might be a bit nicer if that's possible.
I did the log in the minified code, maybe this picture might help you to find it?
I think that's the output of the PHPStan process being parsed, which is expected to be JSON. If that's for some reason invalid then something must have gone wrong. You can check it pretty easily by running PHPStan by itself on the commandline with the args that are listed there. Then you can see what it outputs and whether it's an error.
I just figured it: "--error-format=table" together with "--debug" is causing it. Sorry, my bad!
I was trying to somehow understand why phpstan doesn't recognize the classes when pulled in as a global.
php storm seems to be capable but vscode not, even tho the highlighting seems to know everything. In this example i would expect a complaint that there is only one param:
It is working if i annotate:
But the real project is huge and i cant annotate in every file.
Ahh good to know you figured out the issue. I'll close this issue for now to signal you figured it out :)
Regarding PHPStan not detecting the import. That might be related to the global not being included or something. But not too sure, the global-patten isn't one I use that often.
I get constant crashes. Problem is this:
SyntaxError: Unexpected token '/', "/mnt/share"... is not valid JSON
I added a console.log to "/home/sven/.vscode/extensions/sanderronde.phpstan-vscode-3.1.12/out/server.js:76:1909" Find the ouptu below.