Skip to content

Replace dotenv with a built-in solution #352

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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Replace dotenv with a built-in solution #352

wants to merge 4 commits into from

Conversation

vjik
Copy link
Member

@vjik vjik commented May 2, 2025

Q A
Is bugfix?
New feature? ✔️
Breaks BC? ✔️

@@ -1,2 +1,2 @@
YII_ENV=dev
YII_ENV=development
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd leave it as dev.

'params' => [
'environments/prod/params.php',
'environments/test/params.php',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should match
image

@BoShurik
Copy link

BoShurik commented May 5, 2025

Can't find a way where .env files are used. Are they only for example?

Copy link
Member

@xepozz xepozz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, I don't like it.
Keeping env parser in each project doesn't seems as a good idea

public static function prepare(): void
{
self::setEnvironment();
self::setBoolean('YII_C3', false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MetaStorm could be useful here :)

@vjik vjik added the status:under development Someone is working on a pull request. label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:under development Someone is working on a pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants