edbizarro / gitlab-ci-pipeline-php

:coffee: Docker images for test PHP applications with Gitlab CI (or any other CI platform!)
https://hub.docker.com/r/edbizarro/gitlab-ci-pipeline-php
MIT License
528 stars 167 forks source link

PHP temp directory (/tmp) does not exist or is not writable to Composer #72

Closed jansgescheit closed 4 years ago

jansgescheit commented 4 years ago

Composer Error Messsage and failing pipelines on my ci`s

Error since Oct 19, 2019 4:10am GMT+0200, maybe the latest image release is broken?

PHP temp directory (/tmp) does not exist or is not writable to Composer. Set sys_temp_dir in your php.ini

Pipeline log

> phpcs -p --standard=PSR2 app

Warning: file_put_contents(): Filename cannot be empty in /builds/project/vendor/squizlabs/php_codesniffer/src/Reporter.php on line 159

Call Stack:
    0.0001     469760   1. {main}() /builds/project/vendor/squizlabs/php_codesniffer/bin/phpcs:0
    0.0152    3260096   2. PHP_CodeSniffer\Runner->runPHPCS() /builds/project/vendor/squizlabs/php_codesniffer/bin/phpcs:18
    0.0493    6285080   3. PHP_CodeSniffer\Runner->run() /builds/project/vendor/squizlabs/php_codesniffer/src/Runner.php:114
    0.0498    6331296   4. PHP_CodeSniffer\Reporter->__construct() /builds/project/vendor/squizlabs/php_codesniffer/src/Runner.php:352
    0.0504    6364144   5. file_put_contents() /builds/project/vendor/squizlabs/php_codesniffer/src/Reporter.php:159

Fatal error: Uncaught PHP_CodeSniffer\Exceptions\RuntimeException: file_put_contents(): Filename cannot be empty in /builds/project/vendor/squizlabs/php_codesniffer/src/Reporter.php on line 302 in /builds/project/vendor/squizlabs/php_codesniffer/src/Runner.php on line 606

PHP_CodeSniffer\Exceptions\RuntimeException: file_put_contents(): Filename cannot be empty in /builds/project/vendor/squizlabs/php_codesniffer/src/Reporter.php on line 302 in /builds/project/vendor/squizlabs/php_codesniffer/src/Runner.php on line 606

Call Stack:
    0.0001     469760   1. {main}() /builds/project/vendor/squizlabs/php_codesniffer/bin/phpcs:0
    0.0152    3260096   2. PHP_CodeSniffer\Runner->runPHPCS() /builds/project/vendor/squizlabs/php_codesniffer/bin/phpcs:18
    0.0493    6285080   3. PHP_CodeSniffer\Runner->run() /builds/project/vendor/squizlabs/php_codesniffer/src/Runner.php:114
    0.0799    6845512   4. PHP_CodeSniffer\Runner->processFile() /builds/project/vendor/squizlabs/php_codesniffer/src/Runner.php:434
    0.0971    7460832   5. PHP_CodeSniffer\Reporter->cacheFileReport() /builds/project/vendor/squizlabs/php_codesniffer/src/Runner.php:656
    0.0971    7461368   6. file_put_contents() /builds/project/vendor/squizlabs/php_codesniffer/src/Reporter.php:302
    0.0971    7462368   7. PHP_CodeSniffer\Runner->handleErrors() /builds/project/vendor/squizlabs/php_codesniffer/src/Reporter.php:302

Script phpcs -p --standard=PSR2 app handling the lint:cs event returned with error code 255

Environment

edbizarro commented 4 years ago

Fixed!

jansgescheit commented 4 years ago

Works, thank you!