I added this to my .env:
PHOTOS_DIR=%kernel.project_dir%/var/photos
Of course, when I try to retrieve the value of $_ENV['PHOTOS_DIR'], I get the raw string %kernel.project_dir%/var/photos.
But how can I get the value processed by the Symfony config processor, e.g. /my/project/var/photos?
EDIT:
I'm aware that it is simply possible to add this in services.yaml:
parameters:
photos_dir: '%kernel.project_dir%/var/photos'
But I would like to keep important config data in the .env file.