Skip to content

Commit 2adb543

Browse files
committed
add support to php 7.4
1 parent 31f0cff commit 2adb543

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ The memory usage is optimized in this project by retrieving small chunks of resu
1111
This project is using some of Laravel-Excel design principles because it is both a solid work and a reference, and by doing that, it also reduces the learning curve and adoption to this library.
1212

1313
# Requirements
14-
* PHP >= 8.0
14+
* PHP >= 7.4
1515
* Laravel >= 6.x
1616

1717
# Installation

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616
],
1717
"require": {
18-
"php": ">=8.0"
18+
"php": ">=7.4"
1919
},
2020
"require-dev": {
2121
"phpunit/phpunit": "^9.5",

src/Services/Writer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ private function iterateRows(object $exportable,
102102
* @param mixed $row
103103
* @return array
104104
*/
105-
private function normalizeRow(mixed $row): array
105+
private function normalizeRow($row): array
106106
{
107107
if ($row instanceof Model) {
108108
$row = ModelHelper::toArrayValues($row);
@@ -137,7 +137,7 @@ private function applyFormatting(array $row,
137137
/**
138138
* @throws InvalidCellValueException
139139
*/
140-
private function formatCellValue(mixed $value,
140+
private function formatCellValue($value,
141141
array $formats,
142142
int $rowIndex,
143143
int $columnIndex): string

tests/Services/ExportableServiceTest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,12 @@ private function getExportMock(string $abstractClass, int $limit = 5)
170170
{
171171
$mock = $this->getMockForAbstractClass(
172172
$abstractClass,
173-
mockedMethods: ['limit']
173+
[],
174+
'',
175+
true,
176+
true,
177+
true,
178+
['limit']
174179
);
175180

176181
$mock->method('limit')

0 commit comments

Comments
 (0)