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

Wrong configuration detection when using environment variables #219

Closed
Kocicak opened this issue Mar 14, 2019 · 0 comments
Closed

Wrong configuration detection when using environment variables #219

Kocicak opened this issue Mar 14, 2019 · 0 comments

Comments

@Kocicak
Copy link

@Kocicak Kocicak commented Mar 14, 2019

Version: v3.0.0 v3.0.0-alpha v3.0.0-RC1 v2.4.8 v2.4.7 v2.4.6 v2.4.5 v2.4.4 v2.4.3 v2.4.2 v2.4.1 v2.4.0

Bug Description

When using PhpLiteral for all database configuration directives, all of them are skipped and service is not initialized.

Steps To Reproduce

bootstrap.php:

$configurator->addDynamicParameters([
    'env' => getenv()
]);

database.neon config:

database:
    dsn: %env.MYSQL_DSN%
    user: %env.MYSQL_USER%
    password: %env.MYSQL_PASSWORD%

Expected Behavior

Database gets initialized and service registered

Possible Solution

reverting comit cadc1a6#diff-2fcee4c8b8de0b3276a0db928f59d69e fixes this. Problem is that not a single configuration value is scalar. maybe change that is_scalar() condition? Add || $v instanceof PhpLiteral ?

dg added a commit that referenced this issue Mar 17, 2019
…tions" [Closes #219]

This reverts commit cadc1a6.
@dg dg closed this in 82e040d Mar 17, 2019
dg added a commit that referenced this issue Mar 26, 2019
…tions" [Closes #219]

This reverts commit cadc1a6.
dg added a commit that referenced this issue Mar 26, 2019
dg added a commit that referenced this issue Nov 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.