Skip to content

Commit 0aa7da6

Browse files
committed
Merge branch '4.4' into 5.0
* 4.4: [Phpunit] Fix running skipped tests expecting only deprecations Fix merge [Config] dont catch instances of Error [HttpClient] fix HttpClientDataCollector when handling canceled responses [DependencyInjection] #35505 Fix typo in test name [Yaml][Inline] Fail properly on empty object tag and empty const tag Check non-null type for numeric type Check value isset to avoid PHP notice bug symfony#28179 [DomCrawler] Skip disabled fields processing in Form
2 parents 7640c67 + d3ffacb commit 0aa7da6

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

Resource/ClassExistenceResource.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,8 @@ public function isFresh(int $timestamp): bool
9494
}
9595
} catch (\Throwable $e) {
9696
$exists[1] = $e->getMessage();
97+
98+
throw $e;
9799
} finally {
98100
self::$autoloadedClass = $autoloadedClass;
99101
if (!--self::$autoloadLevel) {

Tests/Fixtures/ParseError.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Symfony\Component\Config\Tests\Fixtures;
4+
5+
class ParseError
6+
{
7+
// missing closing bracket

Tests/Resource/ClassExistenceResourceTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Symfony\Component\Config\Resource\ClassExistenceResource;
1616
use Symfony\Component\Config\Tests\Fixtures\BadFileName;
1717
use Symfony\Component\Config\Tests\Fixtures\BadParent;
18+
use Symfony\Component\Config\Tests\Fixtures\ParseError;
1819
use Symfony\Component\Config\Tests\Fixtures\Resource\ConditionalClass;
1920

2021
class ClassExistenceResourceTest extends TestCase
@@ -115,4 +116,12 @@ public function testConditionalClass()
115116

116117
$this->assertFalse($res->isFresh(0));
117118
}
119+
120+
public function testParseError()
121+
{
122+
$this->expectException('ParseError');
123+
124+
$res = new ClassExistenceResource(ParseError::class, false);
125+
$res->isFresh(0);
126+
}
118127
}

0 commit comments

Comments
 (0)