phpstan.el
phpstan.el copied to clipboard
Fix a target path for docker execution
About
-
phpstan-analyze-this-file
andphpstan-analyze-file
are not working when usingdocker
Reproduction
- Open
test-docker.php
in this repository -
M-x phpstan-analyze-this-file
Output of current codes
-*- mode: compilation; default-directory: "/tmp/phpstan.el/" -*-
Compilation started at Wed Dec 13 08:14:16
docker run --rm -v /tmp/phpstan.el/\:/app ghcr.io/phpstan/phpstan analyze --error-format\=raw --no-progress --no-interaction -c /app/tests/phpstan-docker.neon --memory-limit 4G -l 7 -- /tmp/phpstan.el/test-docker.php
Path /tmp/phpstan.el/test-docker.php does not exist
Compilation exited abnormally with code 1 at Wed Dec 13 08:14:17, duration 0.48 s
-
/tmp/phpstan.el/test-docker.php
is wrong path-
/app
is missing
-
Output of fixed codes
-*- mode: compilation; default-directory: "/tmp/phpstan.el/" -*-
Compilation started at Wed Dec 13 08:15:27
docker run --rm -v /tmp/phpstan.el/\:/app ghcr.io/phpstan/phpstan analyze --error-format\=raw --no-progress --no-interaction -c /app/tests/phpstan-docker.neon --memory-limit 4G -l 7 -- /app/test-docker.php
/app/test-docker.php:4:Function f not found.
/app/test-docker.php:7:Constant Fooo not found.
Compilation exited abnormally with code 1 at Wed Dec 13 08:15:28, duration 1.05 s