SpartnerNL / Laravel-Excel

🚀 Supercharged Excel exports and imports in Laravel
https://laravel-excel.com
MIT License
12.29k stars 1.92k forks source link

[Bug]: Symfony FatalError in the declaration of bindValue() #4237

Closed damms005 closed 2 days ago

damms005 commented 2 days ago

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.59

What version of Laravel are you using?

latest

What version of PHP are you using?

8.3.11

Describe your issue

When generating helpers using php artisan ide-helper:generate --helpers command, I get error:

Symfony\Component\ErrorHandler\Error\FatalError

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

How can the issue be reproduced?

Run any code that causes the DefaultValueBinder's bindValue() method to be called, or in my case run the php artisan ide-helper:generate --helpers command from Barry's IDE helper package

What should be the expected behaviour?

The signature of the bindValue() must be compatible with PhpOffice's

patrickbrouwers commented 2 days ago

https://github.com/SpartnerNL/Laravel-Excel/pull/4234#issuecomment-2466763530