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

[Bug Report] Windows compatibility #127

Open
robertmarney opened this issue Jul 18, 2022 · 2 comments
Open

[Bug Report] Windows compatibility #127

robertmarney opened this issue Jul 18, 2022 · 2 comments

Comments

@robertmarney
Copy link

robertmarney commented Jul 18, 2022

Versions

  • PHP version: v8.1
  • Laravel version: v9.20
  • Enlightn version: v2.1
  • Enlightn Pro version (if applicable): v2.2

Description

When trigger enlightn checks from Windows I am receiving an 'Unable to launch a new process' warning triggered at line 349 of symfony's Process.php

Steps to Reproduce

Run most checks, including all that use phpstan

e.g. :
php artisan enlightn Enlightn\Enlightn\Analyzers\Reliability\InvalidMethodCallAnalyzer -v

Expected behavior:

Enlightn runs

Actual behavior:

image

Additional Information

This code base allows running on Linux environments without issue. Via windows I am able to execute the project fully.

I am also able to run (via windows) phpstan directly.

@paras-malhotra paras-malhotra changed the title [Bug Report] [Bug Report] Windows compatibility Jul 19, 2022
@paras-malhotra
Copy link
Member

Enlightn is not fully compatible with Windows yet. Can you share the full exception using the --show-exceptions flag?

@robertmarney
Copy link
Author

Ahh, yes here is the stack

PS [REDACTED]> php artisan enlightn Enlightn\Enlightn\Analyzers\Reliability\InvalidMethodCallAnalyzer --show-exceptions

    ______      ___       __    __
   / ____/___  / (_)___ _/ /_  / /_____
  / __/ / __ |/ / / __  / __ |/ __/ __ |
 / /___/ / / / / / /_/ / / / / /_/ / / /
/_____/_/ /_/_/_/\__, /_/ /_/\__/_/ /_/
                /____/


Please wait while Enlightn scans your code base...

|------------------------------------------
| Running Reliability Checks
|------------------------------------------

Check 1/1: Your application does not contain invalid method calls. Exception
Unable to launch a new process.
#0 [REDACTED]vendor\symfony\process\Process.php(247): Symfony\Component\Process\Process->start(NULL, Array)
#1 [REDACTED]vendor\enlightn\enlightn\src\PHPStan.php(138): Symfony\Component\Process\Process->run()
#2 [REDACTED]vendor\enlightn\enlightn\src\PHPStan.php(118): Enlightn\Enlightn\PHPStan->runCommand(Array, false)
#3 [REDACTED]vendor\enlightn\enlightn\src\EnlightnServiceProvider.php(53): Enlightn\Enlightn\PHPStan->start(Array)
#4 [REDACTED]vendor\laravel\framework\src\Illuminate\Container\Container.php(1263): Enlightn\Enlightn\EnlightnServiceProvider->Enlightn\Enlightn\{closure}(Object(Enlightn\Enlightn\PHPStan), Object(Illuminate\Foundation\Ap
plication))
#5 [REDACTED]vendor\laravel\framework\src\Illuminate\Container\Container.php(1228): Illuminate\Container\Container->fireCallbackArray(Object(Enlightn\Enlightn\PHPStan), Array)
#6 [REDACTED]vendor\laravel\framework\src\Illuminate\Container\Container.php(1213): Illuminate\Container\Container->fireAfterResolvingCallbacks('Enlightn\\Enligh...', Object(Enlightn\Enlightn\PHPStan))
#7 [REDACTED]vendor\laravel\framework\src\Illuminate\Container\Container.php(776): Illuminate\Container\Container->fireResolvingCallbacks('Enlightn\\Enligh...', Object(Enlightn\Enlightn\PHPStan))
#8 [REDACTED]vendor\laravel\framework\src\Illuminate\Foundation\Application.php(855): Illuminate\Container\Container->resolve('Enlightn\\Enligh...', Array, true)
#9 [REDACTED]vendor\laravel\framework\src\Illuminate\Container\Container.php(692): Illuminate\Foundation\Application->resolve('Enlightn\\Enligh...', Array)
#10 [REDACTED]vendor\laravel\framework\src\Illuminate\Foundation\Application.php(840): Illuminate\Container\Container->make('Enlightn\\Enligh...', Array)
#30 [REDACTED]vendor\symfony\console\Application.php(299): Symfony\Component\Console\Application->doRunCommand(Object(Enlightn\Enlightn\Console\EnlightnCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(S
ymfony\Component\Console\Output\ConsoleOutput))
#31 [REDACTED]vendor\symfony\console\Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#32 [REDACTED]vendor\laravel\framework\src\Illuminate\Console\Application.php(102): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\Con
soleOutput))
#33 [REDACTED]vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(129): Illuminate\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\Cons
oleOutput))
#34 [REDACTED]artisan(37): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#35 {main}
Documentation URL: https://www.laravel-enlightn.com/docs/reliability/invalid-method-call-analyzer.html
PS [REDACTED]>

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

2 participants