Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 39e9f7b

Browse filesBrowse files
committed
[FrameworkBundle] Add --resolve-env-vars option to lint:container command
1 parent 542891f commit 39e9f7b
Copy full SHA for 39e9f7b

File tree

2 files changed

+4
-1
lines changed
Filter options

2 files changed

+4
-1
lines changed

‎src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ CHANGELOG
55
---
66

77
* Add support for setting `headers` with `Symfony\Bundle\FrameworkBundle\Controller\TemplateController`
8+
* Add `--resolve-env-vars` option to `lint:container` command
89
* Derivate `kernel.secret` from the decryption secret when its env var is not defined
910
* Make the `config/` directory optional in `MicroKernelTrait`, add support for service arguments in the
1011
invokable Kernel class, and register `FrameworkBundle` by default when the `bundles.php` file is missing

‎src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Symfony\Component\Console\Command\Command;
1818
use Symfony\Component\Console\Exception\RuntimeException;
1919
use Symfony\Component\Console\Input\InputInterface;
20+
use Symfony\Component\Console\Input\InputOption;
2021
use Symfony\Component\Console\Output\OutputInterface;
2122
use Symfony\Component\Console\Style\SymfonyStyle;
2223
use Symfony\Component\DependencyInjection\Compiler\CheckAliasValidityPass;
@@ -39,6 +40,7 @@ protected function configure(): void
3940
{
4041
$this
4142
->setHelp('This command parses service definitions and ensures that injected values match the type declarations of each services\' class.')
43+
->addOption('resolve-env-vars', null, InputOption::VALUE_NONE, 'When define, command will try to resolve all env variables')
4244
;
4345
}
4446

@@ -58,7 +60,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5860
$container->setParameter('container.build_time', time());
5961

6062
try {
61-
$container->compile();
63+
$container->compile((bool)$input->getOption('resolve-env-vars'));
6264
} catch (InvalidArgumentException $e) {
6365
$errorIo->error($e->getMessage());
6466

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.