InvalidConfigurationException with new schema validation

6 months ago

prog
Backer | 1
+
0
-

This is how I configure app with environment vars:

parameters:
    db:
        dsn: ::getenv('APP_DB_DSN')
        user: ::getenv('APP_DB_USER')
        ...

database:
    default:
        dsn: %db.dsn%
        user: %db.user%
        ...

Since new schema validation I am getting Nette\DI\InvalidConfigurationException

The option 'database › default › dsn' expects to be string or Nette\Schema\DynamicParameter, object Nette\DI\Definitions\Statement given.

Any ideas how to solve this use case?

Last edited by prog (2019-04-10 12:41)