Looted
Looted

Reputation: 343

Symfony2 environmental variables

I'm trying to use environemntal variables as parameters in Symfony2. However when I run composer update I get:

 [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]  
 You have requested a non-existent parameter "compass.bin".

The variables "SYMFONY__COMPASS__BIN" is set both in shell and in apache vhost. Any idea what could cause this?

Update

Seems the issue is Elastic Beanstalk specific - not only compass.bin, but all the other env variables are not visible (despite being set in the container and visible via ssh).

Upvotes: 2

Views: 644

Answers (1)

Looted
Looted

Reputation: 343

I did manage to overcome the issue by disabling the composer install hook. It doesn't run when vendor folder is present (I found this tip here: http://ifdattic.com/how-to-deploy-symfony-application-to-aws-elasticbeanstalk/). Then I simply added my own command to .ebextensions, which ran composer install with the environment variables.

Upvotes: 1

Related Questions