Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed: https://github.com/kartik-v/yii2-export/issues/378 #380

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ahmadfadlydziljalal
Copy link

@ahmadfadlydziljalal ahmadfadlydziljalal commented Mar 19, 2024

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.
#378

fixed:  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

Test in PHP 8,1
@remitache
Copy link

Thanks for the fix. Any chance this can be merged and released ?

@chriscpty
Copy link

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

@HenryVolkmer
Copy link

@kartik-v from my point of view, you can merge this.
This PR ensures correct signature of parent class (Mpdf).

@kartik-v
Copy link
Owner

kartik-v commented Nov 9, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants