php-excel-templator
php-excel-templator copied to clipboard
PhpSpreadsheet introduced a breaking change in 1.13.0
They've changed the signature of public function insertNewBefore($pBefore, $pNumCols, $pNumRows, Worksheet $pSheet)
by adding return type hint of void
.
This projects should add a version restriction for the library:
"require": {
"phpoffice/phpspreadsheet": ">=1.4 <1.13"
}
Meanwhile problem can be solved by composer require phpoffice/phpspreadsheet:1.12.*
in one's own project which will override the broken version.
Hi. I updated the phpspreadsheet to latest (1.13). Nothing broke. Is it really breaks down?
The return type void
can't break it because the method did not return anything before.
You probably have notices disabled in your error reporting.
Your class extends the class from phpoffice/phpspreadsheet which has a return type hint, so your class should have it too - so the method signature would be the same.
Anyway, 1.0.11 fixes it.