8000 Remove obsolete PHP version checks by derrabus · Pull Request #52737 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Remove obsolete PHP version checks #52737

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Remove obsolete PHP version checks
  • Loading branch information
derrabus committed Nov 25, 2023
commit 9699973103dd89549719e3567d902939f7466cd6
10 changes: 0 additions & 10 deletions src/Symfony/Component/Clock/DatePoint.php
8000
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,6 @@ public function __construct(string $datetime = 'now', \DateTimeZone $timezone =
$now = $now->setTimezone($timezone);
}

if (\PHP_VERSION_ID < 80200) {
$now = (array) $now;
$this->date = $now['date'];
$this->timezone_type = $now['timezone_type'];
$this->timezone = $now['timezone'];
$this->__wakeup();

return;
}

$this->__unserialize((array) $now);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ private function checkController(Request $request, callable $controller): callab

if (str_contains($name, '{closure}')) {
$name = $class = \Closure::class;
} elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
} elseif ($class = $r->getClosureCalledClass()) {
$class = $class->name;
$name = $class.'::'.$name;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private function summarizeListener(callable $callable, string $eventName = null,
$r = new \ReflectionFunction($callable);
if (str_contains($r->name, '{closure}')) {
$title = (string) $r;
} elseif ($class = \PHP_VERSION_ID >= 80111 ? $r->getClosureCalledClass() : $r->getClosureScopeClass()) {
} elseif ($class = $r->getClosureCalledClass()) {
$title = $class->name.'::'.$r->name.'()';
} else {
$title = $r->name;
Expand Down
0