kartik-v / yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)
http://demos.krajee.com/export
Other
165 stars 126 forks source link

ExportWriterPdf::save($pFilename) must be compatible with PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::save($pFilename): void #322

Closed karataserkan closed 4 years ago

karataserkan commented 4 years ago

Prerequisites

Steps to reproduce the issue

  1. open Download dropdown and click Pdf button

Expected behavior and actual behavior

When I follow those steps, I see a PHP Compile Error – yii\base\ErrorException Declaration of kartik\export\ExportWriterPdf::save($pFilename) must be compatible with PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::save($pFilename): void

I was expecting to download pdf file. PhpSpreadsheet uses void return and so ExportWriterPdf is not compatible with latest PhpSpreadsheet. https://github.com/PHPOffice/PhpSpreadsheet/commit/fcd9f10663c5be8e435fd0f92c077a8d8747ded1#diff-8b6c0c683d533f32b31ce28cee1bd3e6R229

https://github.com/PHPOffice/PhpSpreadsheet/commit/fcd9f10663c5be8e435fd0f92c077a8d8747ded1#diff-ac73033eeb17a3b443c4bf75a64d0e18R27

Environment

Browsers

Operating System

Libraries

Isolating the problem

favourkiiza commented 4 years ago

Experiencing the same issue

kartik-v commented 4 years ago

resolved via #323