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

ADD: Local environment in application.php #679

Closed
DSGND opened this issue Jun 12, 2023 · 1 comment
Closed

ADD: Local environment in application.php #679

DSGND opened this issue Jun 12, 2023 · 1 comment

Comments

@DSGND
Copy link
Contributor

DSGND commented Jun 12, 2023

Summary

CURRENTLY:

  • It misses the local environment here:
    if (!env('WP_ENVIRONMENT_TYPE') && in_array(WP_ENV, ['production', 'staging', 'development'])) {
  • So when set ENV=local in .env, wp_get_environment_type() return production
  • .env.local is not used

TO DO:

if (!env('WP_ENVIRONMENT_TYPE') && in_array(WP_ENV, ['production', 'staging', 'development', 'local'])) {
    Config::define('WP_ENVIRONMENT_TYPE', WP_ENV);
}

Additional context

No response

@DSGND
Copy link
Contributor Author

DSGND commented Jun 21, 2023

The enhancement is merged :

if (!env('WP_ENVIRONMENT_TYPE') && in_array(WP_ENV, ['production', 'staging', 'development', 'local'])) {

The issue can be closed.

@DSGND DSGND closed this as completed Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant