Commit 38834b7
committed
minor #15611 [DependencyInjection] Improve url env var processor with type cast (noniagriconomie)
This PR was merged into the 4.4 branch.
Discussion
----------
[DependencyInjection] Improve url env var processor with type cast
Hi
I've tried on my symfony app v4.4, the `env(url:FOO)` env processor reading the doc at https://symfony.com/doc/4.4/configuration/env_var_processors.html
---
Without the changes proposed in this PR, I got:
- with definition like this in an `app.yaml` file
- `service.port: '%env(key:port:url:SERVICE_DSN)%'`
- the error
- `Invalid type for path "service.port". Expected one of "bool", "int", "float", "string", but got one of "bool", "int", "float", "string", "array".`
but it works only like this:
- `service.port: '%env(int:key:port:url:SERVICE_DSN)%'`
- same with `string:` for example a `key:user` or a `key:pass` fields from the url processor
---
Thus I am proposing this PR to correct the usage of this processor
If I am doing something wrong/incorrect, please answer what/why and feel free to close this PR!
Thank you :)
--------
Symfony 4.4.29
PHP 7.4.22
Commits
-------
b396b02 Improve url env var processor with type cast1 file changed
+9
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
553 | | - | |
554 | | - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
| |||
566 | 566 | | |
567 | 567 | | |
568 | 568 | | |
569 | | - | |
570 | | - | |
| 569 | + | |
| 570 | + | |
571 | 571 | | |
572 | 572 | | |
573 | 573 | | |
| |||
581 | 581 | | |
582 | 582 | | |
583 | 583 | | |
584 | | - | |
585 | | - | |
| 584 | + | |
| 585 | + | |
586 | 586 | | |
587 | 587 | | |
588 | | - | |
589 | | - | |
| 588 | + | |
| 589 | + | |
590 | 590 | | |
591 | 591 | | |
592 | 592 | | |
| |||
0 commit comments