Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6962da9

Browse files
tuqqunicolas-grekas
authored andcommitted
[FrameworkBundle] Remove env var table from AboutCommand
1 parent e0f6cdb commit 6962da9

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/AboutCommand.php

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
8989
['Xdebug', \extension_loaded('xdebug') ? 'true' : 'false'],
9090
];
9191

92-
if ($dotenv = self::getDotenvVars()) {
93-
$rows = array_merge($rows, [
94-
new TableSeparator(),
95-
['<info>Environment (.env)</>'],
96-
new TableSeparator(),
97-
], array_map(function ($value, $name) {
98-
return [$name, $value];
99-
}, $dotenv, array_keys($dotenv)));
100-
}
101-
10292
$io->table([], $rows);
10393

10494
return 0;
@@ -129,16 +119,4 @@ private static function isExpired(string $date): bool
129119

130120
return false !== $date && new \DateTime() > $date->modify('last day of this month 23:59:59');
131121
}
132-
133-
private static function getDotenvVars(): array
134-
{
135-
$vars = [];
136-
foreach (explode(',', $_SERVER['SYMFONY_DOTENV_VARS'] ?? $_ENV['SYMFONY_DOTENV_VARS'] ?? '') as $name) {
137-
if ('' !== $name && isset($_ENV[$name])) {
138-
$vars[$name] = $_ENV[$name];
139-
}
140-
}
141-
142-
return $vars;
143-
}
144122
}

0 commit comments

Comments
 (0)