fix php 8.1 deprecations (#3648)

* show session maxlifetime in doctor
* rephrase compatibility in release notes
* bump version
This commit is contained in:
Kevin Papst
2022-11-24 13:12:18 +01:00
committed by GitHub
parent 2aa5eccc7c
commit 94a6b99c57
20 changed files with 125 additions and 57 deletions

View File

@@ -28,4 +28,27 @@ class InvoiceDocumentTest extends TestCase
self::assertEquals('default.html.twig', $sut->getName());
self::assertIsInt($sut->getLastChange());
}
public function testThrowsOnDeletedFile()
{
$catchedException = false;
$dir = realpath(__DIR__ . '/../../templates/invoice/renderer');
$file = tempnam($dir, 'invoice-renderer');
if ($file !== false) {
touch($file);
$sut = new InvoiceDocument(new \SplFileInfo($file));
unlink($file);
try {
// names are cached by SplFileInfo, so we need to trigger a function that does access the file
$sut->getLastChange();
} catch (\Exception $exception) {
$catchedException = true;
}
}
self::assertTrue($catchedException, 'Invoice document did not throw exception');
}
}