Skip to content

Commit 3c62a34

Browse files
committed
Merge branch '7.3' into 7.4
* 7.3: fix test Restore Relay 8.5 test account for PHP_ZTS being a boolean value on PHP 8.4+ [Intl] Update data to ICU 78.1 [Notifier][Smsbox] Add tests for `Mode` enum [DependencyInjection] Remove unused variable [Console] Fix exception message when abbreviation matches multiple hidden commands [FrameworkBundle] Fix TypeError when traversing scalar values in debug:config [DependencyInjection] Fix loop corruption in CheckTypeDeclarationsPass [Security] Fix UserBadge validation bypass via identifier normalizer [DependencyInjection] Fix invalid PHP syntax for nullable TypedReference in PhpDumper Fix typo in comment [Translation][Routing] Fix typos [Config] Fix nullable EnumNode with BackedEnum [String] Fix normalization in trimPrefix/trimSuffix
2 parents 4623bcd + c455f54 commit 3c62a34

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Command/ConfigDebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ private function getConfigForPath(array $config, string $path, string $alias): m
161161
$steps = explode('.', $path);
162162

163163
foreach ($steps as $step) {
164-
if (!\array_key_exists($step, $config)) {
164+
if (!\is_array($config) || !\array_key_exists($step, $config)) {
165165
throw new LogicException(\sprintf('Unable to find configuration for "%s.%s".', $alias, $path));
166166
}
167167

Tests/Functional/ConfigDebugCommandTest.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,16 @@ public static function provideCompletionSuggestions(): \Generator
233233
yield 'option --format, debug' => [true, ['--format', ''], ['yaml', 'json']];
234234
}
235235

236+
public function testDumpPathDeepIntoScalar()
237+
{
238+
$tester = $this->createCommandTester(true);
239+
240+
$tester->execute(['name' => 'framework', 'path' => 'secret.foo']);
241+
242+
$this->assertSame(1, $tester->getStatusCode());
243+
$this->assertStringContainsString('Unable to find configuration for "framework.secret.foo"', $tester->getDisplay());
244+
}
245+
236246
private function createCommandTester(bool $debug): CommandTester
237247
{
238248
$command = $this->createApplication($debug)->find('debug:config');

0 commit comments

Comments
 (0)