Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.env.local not respected on install #1596

Closed
riconeitzel opened this issue Jan 13, 2021 · 2 comments
Closed

.env.local not respected on install #1596

riconeitzel opened this issue Jan 13, 2021 · 2 comments
Labels

Comments

@riconeitzel
Copy link
Contributor

riconeitzel commented Jan 13, 2021

Description
I tried to install shopware via composer with shopware/production 6.3.4.1 and created an .env.local file with required information to run bin/console system:setup

Installation failed due to missing _ENV variables.

In EnvVarProcessor.php line 171:
                                              
  Environment variable not found: "APP_URL".  
                                       

I renamed the file to .env and it worked.

Possible Solution
Verify the presence of .env.{APP_ENV} and .env.local before running the installation.

@AndreasA
Copy link
Contributor

Personally I think the issue is actually the template as if you check here https://github.com/shopware/production/blob/6.3/public/index.php

and the same goes for the corresponding console file, they use (new Dotenv(true))->load($envFile); intead of the new (new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); or (new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env'); (this one defintily exists in 4.4, the other one migh be new in 5.x)

If you have to use it, you could change the corresponding methods yourself in those files.

However, the issue is that the newer Symfony.env loading standard will not work correctly with their storefront and admin build scripts and probably also not with the install command and install web page which is probably why it is not used yet.

@MarcelSchmaeing
Copy link
Contributor

Hello,

Within our company roadmap and work capacity, we try to address each bug or improvement request but admit that not each one will be resolved. To continue our culture of honesty and openness, we are closing this issue to focus on our roadmap on behalf of all Shopware users.

If you feel like this issue is still impacting you, please create a new issue and let us know.
Thank you again for your valuable feedback.

@MarcelSchmaeing MarcelSchmaeing closed this as not planned Won't fix, can't repro, duplicate, stale Aug 20, 2024
@github-actions github-actions bot added the Bug label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants