Skip to content

Commit

Permalink
[FrameworkBundle] Don't reference SYMFONY_IDE env var in non-debug mode
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Nov 9, 2023
1 parent f7042aa commit e88be13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function getConfigTreeBuilder(): TreeBuilder
->info('Set true to enable support for xsendfile in binary file responses.')
->defaultFalse()
->end()
->scalarNode('ide')->defaultValue('%env(default::SYMFONY_IDE)%')->end()
->scalarNode('ide')->defaultValue($this->debug ? '%env(default::SYMFONY_IDE)%' : null)->end()
->booleanNode('test')->end()
->scalarNode('default_locale')->defaultValue('en')->end()
->booleanNode('set_locale_from_accept_language')
Expand Down
2 changes: 1 addition & 1 deletion Tests/Functional/ConfigDebugCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public function testParametersValuesAreFullyResolved(bool $debug)
$this->assertStringContainsString('locale: en', $tester->getDisplay());
$this->assertStringContainsString('secret: test', $tester->getDisplay());
$this->assertStringContainsString('cookie_httponly: true', $tester->getDisplay());
$this->assertStringContainsString('ide: '.($_ENV['SYMFONY_IDE'] ?? $_SERVER['SYMFONY_IDE'] ?? 'null'), $tester->getDisplay());
$this->assertStringContainsString('ide: '.$debug ? ($_ENV['SYMFONY_IDE'] ?? $_SERVER['SYMFONY_IDE'] ?? 'null') : 'null', $tester->getDisplay());
}

/**
Expand Down

0 comments on commit e88be13

Please sign in to comment.