Remove tests that include tcPDF and DomPDF libraries when running against PHP8, because neither library is yet PHP8-ready

This commit is contained in:
MarkBaker
2020-10-09 14:31:16 +02:00
parent 87a909aaf8
commit ee13533db3
4 changed files with 40 additions and 17 deletions
+6 -4
View File
@@ -12,10 +12,12 @@ $spreadsheet = $reader->load(__DIR__ . '/../templates/26template.xlsx');
// at this point, we could do some manipulations with the template, but we skip this step
$helper->write($spreadsheet, __FILE__, ['Xlsx', 'Xls', 'Html']);
// Export to PDF (.pdf)
$helper->log('Write to PDF format');
IOFactory::registerWriter('Pdf', \PhpOffice\PhpSpreadsheet\Writer\Pdf\Dompdf::class);
$helper->write($spreadsheet, __FILE__, ['Pdf']);
if (\PHP_VERSION_ID < 80000) {
// Export to PDF (.pdf)
$helper->log('Write to PDF format');
IOFactory::registerWriter('Pdf', \PhpOffice\PhpSpreadsheet\Writer\Pdf\Dompdf::class);
$helper->write($spreadsheet, __FILE__, ['Pdf']);
}
// Remove first two rows with field headers before exporting to CSV
$helper->log('Removing first two heading rows for CSV export');