I am trying to run PHP CS on a simple laravel app. It fails with following message when it tries to install composer scripts
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 32 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Rule2Literals.php on line 48
My pipeline conf
options:
docker: true
size: 2x
pipelines:
default:
- step:
environment:
COMPOSER_MEMORY_LIMIT: 3G
script:
- php -r "echo ini_get('memory_limit').PHP_EOL;"
- composer install --no-scripts
#- mkdir ./test-reports
#- touch ./test-reports/phpcs.xml
#- vendor/bin/phpcs --report=junit --report-file=./test-reports/phpcs.xml app
- vendor/bin/phpmd app xml codesize,unusedcode,naming,cleancode,design,unusedcode --report-file=./test-reports/phpmd.xml
- vendor/bin/phpunit --log-junit ./test-reports/junit.xml
@undPohlen Was able to solve the problem using Multi stage build
https://dev.to/nsaqib/setting-up-bitbucket-pipelines-for-laravel-4c39
Thanks!
I also got it working with `COMPOSER_MEMORY_LIMIT=-1 composer install`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.