frankenphp
frankenphp copied to clipboard
PHP stan error while running parallel worker
What happened?
Setup
ā°ā$ which php
/Users/me/.local/bin/php
ā°ā$ which frankenphp 1 āµ
/usr/local/bin/frankenphp
ā°ā$ frankenphp --version
FrankenPHP 1.5.0 PHP 8.4.7 Caddy v2.10.0 h1:fonubS....
Script From https://frankenphp.dev/docs/known-issues/#composer-scripts-referencing-php
ā°ā$ cat /Users/me/.local/bin/php
#!/usr/bin/env bash
args=("$@")
index=0
for i in "$@"
do
if [ "$i" == "-d" ]; then
unset 'args[$index]'
unset 'args[$index+1]'
fi
index=$((index+1))
done
/usr/local/bin/frankenphp php-cli ${args[@]}
PHP Stan errors composer, phpunit, phpcs all others work just fine
ā°ā$ ./vendor/bin/phpstan analyse --memory-limit=2G
Note: Using configuration file /project/phpstan.neon.
349/349 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 100%
-- --------------------------------------------------------------------------------------
Error
-- --------------------------------------------------------------------------------------
Child process error (exit code 1):
Command "/project/php.ini" is not defined.
while running parallel worker
-- --------------------------------------------------------------------------------------
[ERROR] Found 1 error
ā ļø Result is incomplete because of severe errors. ā ļø
Fix these errors first and then re-run PHPStan
to get all reported errors.
Build Type
Standalone binary
Worker Mode
Yes
Operating System
macOS
CPU Architecture
x86_64
PHP configuration
-
Relevant log output
Iām not sure this is related to PHP or FrankenPHP. It looks like you have the following issue:
Command "/project/php.ini" is not defined.
You seem to be missing a php.ini file in your project directory; or are trying to execute the ini file. The error isn't clear.
Ah I am sorry I had left the php.ini placed in that folder, while I was debugging. Without any php.ini in that file, I have following.
I ll try with -vvv option on the phpstan and see what it is missing, cuz it doesn't work out of the box
ā°ā$ php ./vendor/bin/phpstan analyse --memory-limit=2G
349/349 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 100%
-- ----------------------------------------------------
Error
-- ----------------------------------------------------
Child process error (exit code 1):
Command "./vendor/bin/phpstan" is not defined.
while running parallel worker
-- ----------------------------------------------------
[ERROR] Found 1 error
ā ļø Result is incomplete because of severe errors. ā ļø
Fix these errors first and then re-run PHPStan
to get all reported errors.
Did you read the error message before replying?