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 c918c82

Browse filesBrowse files
committed
feature #42580 [Console][FrameworkBundle] Add DotenvDebugCommand (chr-hertel)
This PR was merged into the 5.4 branch. Discussion ---------- [Console][FrameworkBundle] Add DotenvDebugCommand | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | Tickets | Fix #41958 | License | MIT | Doc PR | symfony/symfony-docs#15734 ![Bildschirmfoto von 2021-08-15 13-57-48](https://user-images.githubusercontent.com/2852185/129477842-06f0c680-b311-4411-8734-57579adeadeb.png) - [x] Command Implementation - [x] Tests - [x] Docs Commits ------- 5b2ecee05b Add DotenvDebugCommand
2 parents bcc8aea + 2954889 commit c918c82
Copy full SHA for c918c82

File tree

Expand file treeCollapse file tree

2 files changed

+13
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+13
-0
lines changed

‎DependencyInjection/FrameworkExtension.php

Copy file name to clipboardExpand all lines: DependencyInjection/FrameworkExtension.php
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
use Symfony\Component\DependencyInjection\Parameter;
5959
use Symfony\Component\DependencyInjection\Reference;
6060
use Symfony\Component\DependencyInjection\ServiceLocator;
61+
use Symfony\Component\Dotenv\Command\DebugCommand;
6162
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
6263
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
6364
use Symfony\Component\ExpressionLanguage\ExpressionLanguage;
@@ -252,6 +253,10 @@ public function load(array $configs, ContainerBuilder $container)
252253
if (!class_exists(BaseYamlLintCommand::class)) {
253254
$container->removeDefinition('console.command.yaml_lint');
254255
}
256+
257+
if (!class_exists(DebugCommand::class)) {
258+
$container->removeDefinition('console.command.dotenv_debug');
259+
}
255260
}
256261

257262
// Load Cache configuration first as it is used by other components

‎Resources/config/console.php

Copy file name to clipboardExpand all lines: Resources/config/console.php
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
use Symfony\Bundle\FrameworkBundle\Command\YamlLintCommand;
4040
use Symfony\Bundle\FrameworkBundle\EventListener\SuggestMissingPackageSubscriber;
4141
use Symfony\Component\Console\EventListener\ErrorListener;
42+
use Symfony\Component\Dotenv\Command\DebugCommand as DotenvDebugCommand;
4243
use Symfony\Component\Messenger\Command\ConsumeMessagesCommand;
4344
use Symfony\Component\Messenger\Command\DebugCommand;
4445
use Symfony\Component\Messenger\Command\FailedMessagesRemoveCommand;
@@ -129,6 +130,13 @@
129130
])
130131
->tag('console.command')
131132

133+
->set('console.command.dotenv_debug', DotenvDebugCommand::class)
134+
->args([
135+
param('kernel.environment'),
136+
param('kernel.project_dir'),
137+
])
138+
->tag('console.command')
139+
132140
->set('console.command.event_dispatcher_debug', EventDispatcherDebugCommand::class)
133141
->args([
134142
tagged_locator('event_dispatcher.dispatcher', 'name'),

0 commit comments

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