Skip to content

Commit 66bb33a

Browse files
Merge branch '3.4' into 4.4
* 3.4: Fix exception messages containing exception messages
2 parents 2ea9e80 + 45a69c2 commit 66bb33a

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Templating/Loader/TemplateLocator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public function locate($template, $currentPath = null, $first = true)
8282
try {
8383
return $this->cacheHits[$key] = $this->locator->locate($template->getPath(), $currentPath);
8484
} catch (\InvalidArgumentException $e) {
85-
throw new \InvalidArgumentException(sprintf('Unable to find template "%s" : "%s".', $template, $e->getMessage()), 0, $e);
85+
throw new \InvalidArgumentException(sprintf('Unable to find template "%s": ', $template).$e->getMessage(), 0, $e);
8686
}
8787
}
8888
}

Tests/Functional/CachePoolsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testRedisCachePools()
4545
}
4646
$this->markTestSkipped($e->getMessage());
4747
} catch (InvalidArgumentException $e) {
48-
if (0 !== strpos($e->getMessage(), 'Redis connection failed')) {
48+
if (0 !== strpos($e->getMessage(), 'Redis connection ')) {
4949
throw $e;
5050
}
5151
$this->markTestSkipped($e->getMessage());

Tests/Functional/DebugAutowiringCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ public function testNotConfusedByClassAliases()
107107

108108
$tester = new ApplicationTester($application);
109109
$tester->run(['command' => 'debug:autowiring', 'search' => 'ClassAlias']);
110-
$this->assertStringContainsString('Symfony\Bundle\FrameworkBundle\Tests\Fixtures\ClassAliasExampleClass (public)', $tester->getDisplay());
110+
$this->assertStringContainsString('Symfony\Bundle\FrameworkBundle\Tests\Fixtures\ClassAliasExampleClass', $tester->getDisplay());
111111
}
112112
}

0 commit comments

Comments
 (0)