Rétablir la compatibilité avec PHP 8.2
This commit is contained in:
parent
9a2b4068da
commit
63224d8b06
12 changed files with 16 additions and 16 deletions
|
|
@ -16,7 +16,7 @@ final class BackupService
|
|||
if (!is_dir($backupDir) && !mkdir($backupDir, 0775, true) && !is_dir($backupDir)) {
|
||||
throw new RuntimeException(t('service.backup.directory_failed'));
|
||||
}
|
||||
$stamp = new DateTimeImmutable('now', new DateTimeZone('Europe/Paris'))->format('Ymd-His');
|
||||
$stamp = (new DateTimeImmutable('now', new DateTimeZone('Europe/Paris')))->format('Ymd-His');
|
||||
$suffix = $reason === 'pre-restore' ? '-avant-restauration' : '';
|
||||
$target = $backupDir . '/globinours-' . $stamp . $suffix . '.zip';
|
||||
// Certains volumes synchronisés acceptent les ZIP mais SQLite ne peut pas
|
||||
|
|
@ -50,7 +50,7 @@ final class BackupService
|
|||
$manifest = [
|
||||
'application' => 'Globinours',
|
||||
'format_version' => self::FORMAT_VERSION,
|
||||
'created_at' => new DateTimeImmutable('now', new DateTimeZone('Europe/Paris'))->format(
|
||||
'created_at' => (new DateTimeImmutable('now', new DateTimeZone('Europe/Paris')))->format(
|
||||
DateTimeInterface::ATOM,
|
||||
),
|
||||
'reason' => $reason,
|
||||
|
|
@ -434,7 +434,7 @@ final class BackupService
|
|||
|
||||
private static function describe(string $path): array
|
||||
{
|
||||
$modified = new DateTimeImmutable('@' . (filemtime($path) ?: time()))->setTimezone(
|
||||
$modified = (new DateTimeImmutable('@' . (filemtime($path) ?: time())))->setTimezone(
|
||||
new DateTimeZone('Europe/Paris'),
|
||||
);
|
||||
return ['name' => basename($path), 'size' => filesize($path) ?: 0, 'date' => $modified->format('d/m/Y H:i:s')];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue