fixed: https://github.com/kartik-v/yii2-export/issues/378
Scope
This pull request includes a
- [x ] Bug fix
- [ ] New feature
- [ ] Translation
PHP Compile Error – yii\base\ErrorException Declaration of kartik\export\ExportWriterPdf::createExternalWriterInstance($config = []) must be compatible with PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::createExternalWriterInstance(array $config): Mpdf\Mpdf
Related Issues
If this is related to an existing ticket, include a link to it as well. https://github.com/kartik-v/yii2-export/issues/378
Thanks for the fix. Any chance this can be merged and released ?
if this can't be merged for some reason, another solution that doesn't involve code changes would be to update the composer.json to read "phpoffice/phpspreadsheet": "^1.0" rather than "phpoffice/phpspreadsheet": ">=1.0", forcing composer to choose a 1.* version of phpspreadsheet
@kartik-v from my point of view, you can merge this. This PR ensures correct signature of parent class (Mpdf).
Thanks this will work in latest PHP releases probably > 8 - will need to update the BC breaking dependencies for older PHP versions. Will check a bit on this and probaby create a BC breaking version supporting only newer PHP releases.
Any chance this can be merged and released?
@gshap1995 a 2.0.0 version with breaking changes (including this) is already planned, but might still take a bit: https://github.com/kartik-v/yii2-export/pull/381#issuecomment-2608692933