mirror of
https://github.com/Seldaek/monolog.git
synced 2025-10-22 00:56:08 +02:00
Switch to DateTimeImmutable everywhere
This commit is contained in:
@@ -48,7 +48,7 @@ class RotatingFileHandler extends StreamHandler
|
||||
{
|
||||
$this->filename = $filename;
|
||||
$this->maxFiles = (int) $maxFiles;
|
||||
$this->nextRotation = new \DateTime('tomorrow');
|
||||
$this->nextRotation = new \DateTimeImmutable('tomorrow');
|
||||
$this->filenameFormat = '{filename}-{date}';
|
||||
$this->dateFormat = 'Y-m-d';
|
||||
|
||||
@@ -112,7 +112,7 @@ class RotatingFileHandler extends StreamHandler
|
||||
{
|
||||
// update filename
|
||||
$this->url = $this->getTimedFilename();
|
||||
$this->nextRotation = new \DateTime('tomorrow');
|
||||
$this->nextRotation = new \DateTimeImmutable('tomorrow');
|
||||
|
||||
// skip GC of old logs if files are unlimited
|
||||
if (0 === $this->maxFiles) {
|
||||
|
Reference in New Issue
Block a user