Releases: nimmneun/onesheet
1.3.0
Minimum required PHP version is now 7.1, since removal deprecations were no longer compatible with older versions.
What's Changed
- Implicitly marking parameter $style as nullable is deprecated by @serval2412 in #74
- Misc/update readme raise php unit version and fix tests by @nimmneun in #75
New Contributors
- @serval2412 made their first contribution in #74
Full Changelog: 1.2.6...1.3.0
1.2.6
Fix issue with MS Access
Fixes issue where MS Access cannot find sheets to be used as data source.
Fix remaining PHP 8.1 deprecations
Ensure no null values are passed to strlen (#66) * Ensure no null values are passed to strlen * Ensure no null values are passed to strlen, also updated README exmaple
Fix PHP 8.1 deprecations
PHP 8.1 introduced several deprecation notices. This leads to invalid/broken xlsx files in environments with error_reporting set to E_NOTICE and lower (typical dev/staging/ci envs).
Fixes multi sheet tab grouping issue
Fix PHP version constraint
Fix PHP version constraint in composer.json
Introduce multi-sheet writing and naming
While it goes against the package name, I finally decided to add the option to write multiple sheets and name them via Writer::switchSheet('FancySheetName')
.
It has been requested a few times and I might actually use it myself in a current project ... so - here we go.
Check the updated example at to bottom of the README.md for usage examples.
This should not be a breaking change and PHP 5.4 compatibility is still ensured.
readme fix
Just added missing line break in readme
Housekeeping 2020
Nothing major - updated Travis + Scrutinizer to use PHP 7.3 and fixed some docblocks + spelling of an internal method.
Tests with PHP 8.0 beta3 are looking fine. So PHP 8 has been added as max version in composer.json.
Interestingly PHP 8 is about 10-15% slower than PHP 7.3 and 7.4 when benchmarking the code ... especially when using Generators.
Also ... the memory consumption of arrays has increased again with PHP 8. It seems there is a memory leak in PHP 8.0.0 beta3(?) and it appears to be mb_substr()
.
$data = [];
for ($i = 1; $i <= 100000; $i++) {
$value = 'blablablablablabl';
// $data[] = $value;
// $data[] = substr($value, 0, 10);
$data[] = mb_substr($value, 0, 10);
}
var_dump(memory_get_peak_usage(1) / 2**20);
exit;
/**
* PHP 7.4.10: plain 14 mb
* PHP 7.4.10: substr 14 mb
* PHP 7.4.10: mb_substr 14 mb
* PHP 8.0.0 b3: plain 14 mb
* PHP 8.0.0 b3: substr 14 mb
* PHP 8.0.0 b3: mb_substr 32 mb
*/