-
-
Notifications
You must be signed in to change notification settings - Fork 286
Syntax JsonException issue #640
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
Comments
I have the same problem. Library version | 2.8.0 |
Quick solution: in 'remove' => [
...
\NunoMaduro\PhpInsights\Domain\Insights\SyntaxCheck::class,
], But I think it's not perfect |
Getting this error as well @kleninmaxim suggestion works for now. |
Didn't solve the issue for me. Library version | 2.8.0 |
having the same problem (well in line 57 now) on v2.10.0 the problem in my case is that
on php >= 8.3.0 it could help to pass $process->getOutput() through json_validate |
i'm experiencing the same. It worked before, but not after moving from homestead to herd for windows (beta). |
This issue makes the library completely unusable, and am surprised this hasn't been escalated to resolve =\ Having the same issue with 2.11.0, PHP 8.2.16, also related to Herd - looks like a permissions issue? I got the actual error (rather than the useless "JsonError" response), and saw this:
The workaround above helped (also not particularly interested in syntax checks by the library), but this may not be a solution for some. |
Just want to inform that is happening to me as well, the workaround mentioned above works, but I believe it is removing part of the functionality of the library, which isn't ideal. Using version 2.12 of the library, Laravel 11, and PHP 8.3.11, on a Windows 10 desktop. |
File:
vendor/nunomaduro/phpinsights/src/Domain/Insights/SyntaxCheck.php
Error:
71/74 [==========================>-] 95% < 1 sec
JsonException (4)
Syntax error
Error occurs on line 56.
$output = json_decode($process->getOutput(), true, 512, JSON_THROW_ON_ERROR);
Fix:
The error is removed if you remove the JSON_THROW_ON_ERROR flag.
Exception trace:
Process data
The text was updated successfully, but these errors were encountered: