Skip to content

Fixed reading env file #23

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 2 commits into
base: v2
Choose a base branch
from
Open

Fixed reading env file #23

wants to merge 2 commits into from

Conversation

rvola
Copy link

@rvola rvola commented Apr 16, 2025

This PR aims to fix an issue with the V2 configuration file, which prevents the correct use of the $config->env() method.

The expected behavior should be:

  1. Check if a value in a .env file exists and use that value.
  2. If the value doesn't exist in an env file, set $config->set() with the default value sent.

Todo: Don't forget to modify the documentation

rvola added 2 commits April 16, 2025 12:13
Removal of the \Env\env() method, which returns an empty value because the .env file is already loaded beforehand by the vlucas/phpdotenv package.
Moreover, the env() function from the oscarotero/env package only accepts a single parameter.
@rvola rvola marked this pull request as ready for review April 16, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant