You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
Yes, it's still reproducable
What version of Laravel Excel are you using?
3.1
What version of Laravel are you using?
11.0
What version of PHP are you using?
8.2.3
Describe your issue
I am encountering a compatibility issue with DefaultValueBinder::bindValue in Laravel Excel when exporting to an .xlsx file. The error message I receive is:
Declaration of Maatwebsite\Excel\DefaultValueBinder::bindValue(PhpOffice\PhpSpreadsheet\Cell\Cell$cell, $value) must be compatible with PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder::bindValue(PhpOffice\PhpSpreadsheet\Cell\Cell$cell, mixed $value): bool
Possible Solution
It seems that the method signature in Maatwebsite\Excel\DefaultValueBinder::bindValue should be updated to match the PhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder::bindValue method, with the mixed type hint for $value and a bool return type, as follows:
Install Laravel Excel with the latest version of PHPSpreadsheet and PHP 8.0+.
Attempt to export a file to an .xlsx format.
The above error is thrown due to the bindValue method signature mismatch.
What should be the expected behaviour?
The export should proceed without any compatibility issues.
However, the export fails with a Declaration compatibility error, as Maatwebsite\Excel\DefaultValueBinder::bindValue does not match the updated signature in PHPSpreadsheet’s DefaultValueBinder.
The text was updated successfully, but these errors were encountered:
Is the bug applicable and reproducable to the latest version of the package and hasn't it been reported before?
What version of Laravel Excel are you using?
3.1
What version of Laravel are you using?
11.0
What version of PHP are you using?
8.2.3
Describe your issue
I am encountering a compatibility issue with DefaultValueBinder::bindValue in Laravel Excel when exporting to an .xlsx file. The error message I receive is:
Possible Solution
It seems that the method signature in
Maatwebsite\Excel\DefaultValueBinder::bindValue
should be updated to match thePhpOffice\PhpSpreadsheet\Cell\DefaultValueBinder::bindValue
method, with themixed
type hint for$value
and abool
return type, as follows:How can the issue be reproduced?
bindValue
method signature mismatch.What should be the expected behaviour?
The export should proceed without any compatibility issues.
However, the export fails with a Declaration compatibility error, as
Maatwebsite\Excel\DefaultValueBinder::bindValue
does not match the updated signature in PHPSpreadsheet’sDefaultValueBinder
.The text was updated successfully, but these errors were encountered: