8000 minor #52737 Remove obsolete PHP version checks (derrabus) · symfonyaml/symfony@04e6833 · GitHub
[go: up one dir, main page]

Skip to content

Commit 04e6833

Browse files
committed
minor symfony#52737 Remove obsolete PHP version checks (derrabus)
This PR was merged into the 7.0 branch. Discussion ---------- Remove obsolete PHP version checks | Q | A | ------------- | --- | Branch? | 7.0 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT Continuation of symfony#52735 on the 7.0 branch. Commits ------- 9699973 Remove obsolete PHP version checks
2 parents 37926c8 + 9699973 commit 04e6833

File tree

3 files changed

+2
-12
lines changed

3 files changed

+2
-12
lines changed

src/Symfony/Component/Clock/DatePoint.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,6 @@ public function __construct(string $datetime = 'now', \DateTimeZone $timezone =
4545
$now = $now->setTimezone($timezone);
4646
}
4747

48-
if (\PHP_VERSION_ID < 80200) {
49-
$now = (array) $now;
50-
$this->date = $now['date'];
51-
$this->timezone_type = $now['timezone_type'];
52-
$this->timezone = $now['timezone'];
53-
$this->__wakeup();
54-
55-
return;
56-
}
57-
5848
$this->__unserialize((array) $now);
5949
}
6050

src/Symfony/Component/HttpKernel/Controller/ControllerResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private function checkController(Request $request, callable $controller): callab
242242

243243
if (str_contains($name, '{closure}')) {
244244
$name = $class = \Closure::class;
245-
} elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
245+
} elseif ($class = $r->getClosureCalledClass()) {
246246
$class = $class->name;
247247
$name = $class.'::'.$name;
248248
}

src/Symfony/Component/Workflow/DataCollector/WorkflowDataCollector.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ private function summarizeListener(callable $callable, string $eventName = null,
173173
$r = new \ReflectionFunction($callable);
174174
if (str_contains($r->name, '{closure}')) {
175175
$title = (string) $r;
176-
} elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
176+
} elseif ($class = $r->getClosureCalledClass()) {
177177
$title = $class->name.'::'.$r->name.'()';
178178
} else {
179179
$title = $r->name;

0 commit comments

Comments
 (0)
0