Closed NoxInmortus closed 1 year ago
@NoxInmortus I cannot reproduce the issue, but based on the error message, it sounds like your system temp directory (sys_temp_dir
ini value) is misconfigured or unwrittable, resulting in tempnam()
returning false
.
Also cannot reproduce. Closing due to lack of feedback.
very weird, but I also get the same error
in my case it worked in docker, but after some changes and rebuilding the image, I cannot run it anymore:
# ./vendor/bin/phpcs
PHP Notice: tempnam(): file created in the system's temporary directory in /vendor/squizlabs/php_codesniffer/src/Reporter.php on line 159
PHP Fatal error: Uncaught ValueError: Path cannot be empty in /vendor/squizlabs/php_codesniffer/src/Reporter.php:160
Stack trace:
#0 /vendor/squizlabs/php_codesniffer/src/Reporter.php(160): file_put_contents()
#1 /vendor/squizlabs/php_codesniffer/src/Runner.php(356): PHP_CodeSniffer\Reporter->__construct()
#2 /vendor/squizlabs/php_codesniffer/src/Runner.php(116): PHP_CodeSniffer\Runner->run()
#3 /vendor/squizlabs/php_codesniffer/bin/phpcs(18): PHP_CodeSniffer\Runner->runPHPCS()
#4 /vendor/bin/phpcs(117): include('...')
#5 {main}
thrown in /vendor/squizlabs/php_codesniffer/src/Reporter.php on line 160
The issue was in temp env variable exported from host:
TMPDIR=/var/folders/v_/4d7tl7nj28q37zyztkwqw4dh0000gn/T/
After removing this var phpcs works again
@tosiara Thanks for adding that info. Hopefully it will help someone else running into this in the future.
Hello,
I just fetch PHPCS and PHPBCF phar files with curl.
Just tried to run it :
I did not found anything able to help me in wiki/issues. Any hint ?