- Issue created by @datawench
- π§πͺBelgium dieterholvoet Brussels
At the moment this module doesn't have any config and I feel like this use case might be a bit too niche to justify introducing config. Why don't you create a custom module with a service provider where you set the
dotenv.project_dir
container parameter to a different value? - Status changed to Needs review
4 months ago 9:53pm 12 July 2024 - π§πͺBelgium dieterholvoet Brussels
Or even easier, canβt you set the parameter in the services.yml file? If the service provider overrides that value, we could add a check to make sure to only set a project path if there isnβt any yet.
- πΊπΈUnited States datawench
Hm. I wouldn't have thought it was that niche? I should think it's pretty common to have .env inside webroot, due to the variety of hosting setups.
But I can certainly create a service provider, as you suggest. If you provided a check as you describe, that would be great.
- π§πͺBelgium dieterholvoet Brussels
Looking at the source of the
dotenv:dump
command, it seems likeproject_dir
should always be the Composer root of the project. Since we're already usingDrupalFinder
in thedotenv:init
command, I decided to use this here as well to automatically determine theproject_dir
. Could you check if the changes in this MR fix the issue for you?I also made it so
dotenv.project_dir
can be set inservices.yml
, but this shouldn't be needed for you anymore. Settingdotenv_path
in composer.json also shouldn't be needed anymore. - π§πͺBelgium dieterholvoet Brussels
@datawench any chance you could check if the provided solution fixes the issue for you?
-
DieterHolvoet β
committed 0b314ec2 on 1.2.x
Issue #3461046 by DieterHolvoet, datawench: Allow specifying the...
-
DieterHolvoet β
committed 0b314ec2 on 1.2.x
- Status changed to Fixed
3 months ago 8:41am 9 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.