You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in the docs, the ACF key can be read from an .env file, as long as the .env and composer.json files are in the same directory. However, I'm working on a project where .env and composer.json are in different directories. The composer.json file is in the root directory, and the .env file is in a subdirectory, like this:
When the loadDotEnv function checks for .env in the current working directory, it doesn't find the .env file in the subdirectory, and my ACF key isn't read.
if (file_exists(getcwd().DIRECTORY_SEPARATOR.'.env')) {
$dotenv = newDotenv(getcwd());
$dotenv->load();
}
}
I'd like to make it possible to specify the path that's passed to the Dotenv constructor on line 246. Does that sound like a feature you'd consider merging?
Thanks for all the hard work you've put into this plugin!
– James
The text was updated successfully, but these errors were encountered:
@atticus7 As this Composer plugin has not received an update for 5 years you should not depend on it. I am maintaining a package that gives you the same functionality as this one but also offering configurable .env file locations: https://github.com/ffraenz/private-composer-installer
Hey @PhilippBaschke!
As mentioned in the docs, the ACF key can be read from an
.env
file, as long as the.env
andcomposer.json
files are in the same directory. However, I'm working on a project where.env
andcomposer.json
are in different directories. Thecomposer.json
file is in the root directory, and the.env
file is in a subdirectory, like this:When the
loadDotEnv
function checks for.env
in the current working directory, it doesn't find the.env
file in the subdirectory, and my ACF key isn't read.acf-pro-installer/src/ACFProInstaller/Plugin.php
Lines 243 to 249 in 772cec9
I'd like to make it possible to specify the path that's passed to the
Dotenv
constructor on line 246. Does that sound like a feature you'd consider merging?Thanks for all the hard work you've put into this plugin!
– James
The text was updated successfully, but these errors were encountered: