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

Environments #445

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

Environments #445

wants to merge 2 commits into from

Conversation

rustamwin
Copy link
Member

Q A
Is bugfix? ✔️/❌
New feature? ✔️/❌
Breaks BC? ✔️/❌
Fixed issues comma-separated list of tickets # fixed by the PR, if any

@rustamwin rustamwin requested a review from a team March 14, 2022 17:06
@rustamwin rustamwin added the status:code review The pull request needs review. label Mar 14, 2022
return \filter_var(self::$values[$name] ?? null, FILTER_VALIDATE_INT, FILTER_NULL_ON_FAILURE) ?? $default;
}

public static function load(): void
Copy link
Member

Choose a reason for hiding this comment

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

Maybe move this method to separate class? In most cases this method will be unnecessary in IDE autocompletion on Env::.

@rustamwin
Copy link
Member Author

We need to discuss whether environment variables should be cached.

@samdark
Copy link
Member

samdark commented Mar 30, 2022

What's the purpose of caching them?

@BoShurik
Copy link

The advantage of the env variables that they can be changed on the fly. Without that you may use simple php array to store such variables

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review. status:under discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants