Full code refactor to Symfony7.4 with FrankenPHP
Includes significant breaking changes. Default port and transportation changed to http via port 80 Names of environment variables have changed.
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App;
|
||||
|
||||
use DateTimeImmutable;
|
||||
use Psr\Clock\ClockInterface;
|
||||
use Symfony\Component\DependencyInjection\Attribute\AsAlias;
|
||||
|
||||
/* A new Clock should be made for each request,
|
||||
* because a Clock is a snapshot of when the request was made. */
|
||||
#[AsAlias(ClockInterface::class)]
|
||||
class Clock implements ClockInterface {
|
||||
private DateTimeImmutable $date;
|
||||
|
||||
public function now(): DateTimeImmutable {
|
||||
return new DateTimeImmutable();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user