Skip to content

Commit d1ea60c

Browse files
minor #61150 Remove legacy code paths that rely on feature checks (nicolas-grekas)
This PR was merged into the 8.0 branch. Discussion ---------- Remove legacy code paths that rely on feature checks | Q | A | ------------- | --- | Branch? | 8.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT This PR also bumps DBAL to ^4.3 and ORM to ^3.4 so that me can remove more code paths. Commits ------- c2106970820 Remove legacy code paths that rely on feature checks
2 parents 2bdc3f6 + ebb6f44 commit d1ea60c

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

Extension/Core/DataAccessor/PropertyPathAccessor.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,7 @@ private function getPropertyValue(object|array $data, PropertyPathInterface $pro
100100
return null;
101101
}
102102

103-
if (!$e instanceof UninitializedPropertyException
104-
// For versions without UninitializedPropertyException check the exception message
105-
&& (class_exists(UninitializedPropertyException::class) || !str_contains($e->getMessage(), 'You should initialize it'))
106-
) {
103+
if (!$e instanceof UninitializedPropertyException) {
107104
throw $e;
108105
}
109106

Extension/DataCollector/FormDataExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function extractSubmittedData(FormInterface $form): array
9898
while (null !== $cause) {
9999
if ($cause instanceof ConstraintViolationInterface) {
100100
$errorData['trace'][] = $cause;
101-
$cause = method_exists($cause, 'getCause') ? $cause->getCause() : null;
101+
$cause = $cause->getCause();
102102

103103
continue;
104104
}

Tests/Extension/Core/Type/DateTypeTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ public function testSubmitFromSingleTextDateTime()
118118

119119
public function testSubmitFromSingleTextDatePoint()
120120
{
121-
if (!class_exists(DatePoint::class)) {
122-
self::markTestSkipped('The DatePoint class is not available.');
123-
}
124-
125121
$form = $this->factory->create(static::TESTED_TYPE, null, [
126122
'html5' => false,
127123
'model_timezone' => 'UTC',

Tests/Extension/Core/Type/TimeTypeTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ public function testSubmitDateTime()
4848

4949
public function testSubmitDatePoint()
5050
{
51-
if (!class_exists(DatePoint::class)) {
52-
self::markTestSkipped('The DatePoint class is not available.');
53-
}
54-
5551
$form = $this->factory->create(static::TESTED_TYPE, null, [
5652
'model_timezone' => 'UTC',
5753
'view_timezone' => 'UTC',

0 commit comments

Comments
 (0)