File tree Expand file tree Collapse file tree 1 file changed +4
-25
lines changed Expand file tree Collapse file tree 1 file changed +4
-25
lines changed Original file line number Diff line number Diff line change @@ -488,33 +488,12 @@ This example shows how to configure the database connection using an env var:
488
488
The next step is to define the value of those env vars in your shell, your web
489
489
server, etc. This is explained in the following sections, but to protect your
490
490
application from undefined env vars, you can give them a default value using the
491
- ``parameters `` key :
491
+ ``.env `` file :
492
492
493
- .. configuration-block ::
494
-
495
- .. code-block :: yaml
496
-
497
- # config/services.yaml
498
- parameters :
499
- env(DATABASE_URL) : ' sqlite:///%kernel.project_dir%/var/data.db'
500
-
501
- .. code-block :: xml
502
-
503
- <!-- config/services.xml -->
504
- <?xml version =" 1.0" encoding =" UTF-8" ?>
505
- <container xmlns =" http://symfony.com/schema/dic/services"
506
- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
507
- xsi : schemaLocation =" http://symfony.com/schema/dic/services https://symfony.com/schema/dic/services/services-1.0.xsd" >
508
-
509
- <parameters >
510
- <parameter key =" env(DATABASE_URL)" >sqlite:///%kernel.project_dir%/var/data.db</parameter >
511
- </parameters >
512
- </container >
513
-
514
- .. code-block :: php
493
+ .. code-block :: bash
515
494
516
- // config/services.php
517
- $container->setParameter('env( DATABASE_URL)', ' sqlite:///%kernel.project_dir%/var/data.db');
495
+ # .env
496
+ DATABASE_URL= sqlite:///%kernel.project_dir%/var/data.db
518
497
519
498
.. seealso ::
520
499
You can’t perform that action at this time.
0 commit comments