Commit Graph

5814 Commits

Author SHA1 Message Date
oleibman 4fc82f4784 Merge pull request #4663 from oleibman/tweakcoveralls
Tweak Coveralls
2025-09-25 16:20:10 +00:00
oleibman 8e9fe8b5f7 Tweak Coveralls
Coveralls recommends using an "official integration" of their product with Github. Also, allow the upload to fail without causing the whole coverage step to fail - there have been some recent problems which they are still working on. I may allow the step to fail once they are done with their changes.
2025-09-25 08:57:42 -07:00
oleibman e3cac6f1ff Merge pull request #4659 from oleibman/dompdf311
Update to Php8.5-compatible Dompdf
2025-09-22 02:21:58 +00:00
oleibman 93e715f743 Update to Php8.5-compatible Dompdf 2025-09-21 19:00:51 -07:00
oleibman 3c645277b5 Merge pull request #4653 from oleibman/extintl
Document NumberFormat Wizard Dependency on Intl Extension
2025-09-21 02:59:41 +00:00
oleibman b982ef9a70 Merge pull request #4648 from oleibman/issue4647
Drowning in Warning Messages with Corrupt Xls File
2025-09-21 02:49:06 +00:00
oleibman ac700e6450 Merge branch 'master' into issue4647 2025-09-20 19:46:09 -07:00
oleibman 296ef96015 Update CHANGELOG.md 2025-09-20 19:45:18 -07:00
oleibman 684c677937 Document NumberFormat Wizard Dependency on Intl Extension
Intl is only a "suggested" extension. A lot of the NumberFormat Wizard code depends on it. That's insufficient reason to make it required, but the suggestion text now mentions this dependency explicitly. Also clean up the Wizard documentation to reflect some changes since PhpSpreadsheet 1.28.
2025-09-17 23:04:31 -07:00
oleibman 21ef57e46d Merge pull request #4650 from oleibman/phpunitupdate
Update Phpunit
2025-09-17 18:24:31 +00:00
oleibman 6f43a3d102 Update Phpunit
Testing is becoming too messy otherwise as Php8.5 approaches.
2025-09-17 10:53:28 -07:00
oleibman 9c8f83fcbf Merge pull request #4649 from oleibman/mpdford
Temporary Workaround for Mpdf Php8.5 Deprecation
2025-09-17 17:01:56 +00:00
oleibman a76c9b82cd Upgrade Mitoteam to Beta Version
I had been trapping its errors in test bootstrap, but that no longer seems to work.
2025-09-17 09:42:23 -07:00
oleibman e73fc333af Temporary Workaround for Mpdf Php8.5 Deprecation 2025-09-17 07:53:53 -07:00
oleibman c8a1a5fd11 Merge pull request #4645 from oleibman/issue4584
Wrapped Cells and Default Row Height
2025-09-17 06:51:49 +00:00
oleibman fff2373b39 Merge branch 'master' into issue4584 2025-09-16 23:48:50 -07:00
oleibman ecc6f2f404 Update CHANGELOG.md 2025-09-16 23:47:55 -07:00
oleibman f467ac59fb Merge pull request #4596 from oleibman/intersect
Some Additional Support for Intersection and Union
2025-09-17 00:57:00 +00:00
oleibman 4fe13f06eb Update CHANGELOG.md 2025-09-16 17:54:10 -07:00
oleibman 26dfae12e8 Merge branch 'master' into intersect 2025-09-16 17:50:18 -07:00
oleibman d3da9ebdab Typo in Comment 2025-09-16 16:53:00 -07:00
oleibman 99f59c5e4c Drowning in Warning Messages with Corrupt Xls File
Fix #4647. Xls file is corrupt - PhpSpreadsheet tries to extract a substring using array notation, but the index is out of bounds. Php treats this as a warning situation, so continues to process, leading to an onslaught of warning messages. We could change to use the `substr` function rather than array notation, but that seems inappropriate - it would be better to throw an exception and have the user fix the file. In the file posted with the issue, opening it with Excel, and responding yes when it asks if it's okay to clean up the corruption, yields a usable file. Unfortunately, that file weighs in at 28MB, much too large for our test suite. So, no new unit tests accompany this change, but it has been tested.

Tests are added to `getUint2d`, which seems to be the source of the problem in the sample file, and, for good measure, `getInt2d` and `getInt4d`. There may be other sources of similar corruption, but we'll stick with what's in front of our nose.
2025-09-16 16:20:30 -07:00
oleibman 2f1092cadc Merge pull request #4646 from oleibman/iocoverage
Minor Improvements to Reader/Writer Coverage
2025-09-16 20:28:02 +00:00
oleibman 9bb090d64e Found an Untested String Increment Operator 2025-09-16 13:00:09 -07:00
oleibman acba6d1f4a Additional Test 2025-09-16 11:22:05 -07:00
oleibman 07150fc530 Didn't Like My Approach In 2 Places 2025-09-16 10:35:32 -07:00
oleibman 8e4ebd97e1 Final Tweak (I Think) 2025-09-15 21:29:46 -07:00
oleibman f3e2eba517 Additional Coverage 2025-09-15 19:48:43 -07:00
oleibman abf357ea90 1904 Calendar 2025-09-14 08:08:46 -07:00
oleibman 31d1cd7e17 Minor Tweaks 2025-09-14 01:20:24 -07:00
oleibman 9df8ceb5c0 Minor Improvements to Reader/Writer Coverage 2025-09-14 00:18:08 -07:00
oleibman 996de17311 Merge pull request #4640 from oleibman/lessprecise
Option To Display Numbers With Less Precision
2025-09-13 14:59:05 +00:00
oleibman f8fc6b5ea9 Update CHANGELOG.md 2025-09-13 07:56:18 -07:00
oleibman 38cf7ed656 Merge branch 'master' into lessprecise 2025-09-13 07:36:24 -07:00
oleibman dc25bc1ac4 Coverage Tweaks 2025-09-12 00:41:14 -07:00
oleibman 5179fff699 Merge pull request #4639 from oleibman/wakeup
Deprecate Worksheet::getHashInt and Spreadsheet::getId
2025-09-12 05:07:18 +00:00
oleibman 77eaac2e79 Merge branch 'master' into wakeup 2025-09-11 21:21:49 -07:00
oleibman c07675a59c Merge pull request #4641 from oleibman/issue4638
Proper Output for BASE Function
2025-09-12 03:29:16 +00:00
oleibman dc11b8cccd Update CHANGELOG.md 2025-09-11 20:26:30 -07:00
oleibman 2d9375f847 Wrapped Cells and Default Row Height
Fix #4584. As discussed there, MS has implemented this situation in a way that I frankly do not understand. Marking a row with a wrapped cell to *not* use the default row height seems to affect every other populated row. Very odd. Nevertheless, adding a new `customFormat` boolean property to RowDimension seems to be a way to resolve this problem. Note that the Xml generated by Excel already outputs a `customFormat` attribute when a style is applied to a row. This PR just adds that property for when it is needed for rowHeight. It need not, and should not, be set by the application when a style is applied to the row; PhpSpreadsheet will take care of that on its own.

Although the problem was raised for Xlsx format (I think), I investigated other relevant output formats as well. Html tends to do its own cell wrapping. I think the results after this change match the results before.

Xls already handled the output side of this situation without difficulty. A change was needed on the input side, and is included as part of this PR.

Ods did not handle default row height at all. As with other style properties, it is difficult to handle this on the input side, and this PR does nothing to improve that situation. However, we are, at least, able to provide some relief on the output side. Not complete relief - in order to apply the default size to unpopulated rows, we'd need to at least populate them with the `table:number-rows-repeated` attribute, and that has often been a source of problems, so I'm not willing to go there yet. This PR just ensures that all populated rows will have the correct height.
2025-09-11 20:13:21 -07:00
oleibman 9b28b9e9c1 Merge pull request #4644 from oleibman/phpstan2123
Upgrade Phpstan
2025-09-12 03:08:23 +00:00
oleibman 4b8f4e8d66 Upgrade Phpstan
A lot of changes since its last update, including one that I requested.
2025-09-11 20:02:57 -07:00
oleibman e49d7a9d94 Small Improvement 2025-09-10 10:16:28 -07:00
oleibman 43754a130e Bug in Uncovered Code in XMLWriter
Add test, fix bug.
2025-09-10 08:19:57 -07:00
oleibman f19a73fdd6 Proper Output for BASE Function
Fix #4638. Microsoft does not document BASE as being introduced in Excel 2010 or later, but apparently it was.
2025-09-10 07:34:50 -07:00
oleibman 6b505d2d83 Coverage Tweak 2025-09-10 07:23:28 -07:00
oleibman ebdbdd41ba Option To Display Numbers With Less Precision
Fix #4626. Previous changes had increased the precision of floating point numbers when cast to string, making for greater accuracy after save and load operations, without affecting the values displayed by Excel. Although the results of the cast are now more accurate computationally, they can appear unexpected to humans. A new boolean parameter `lessFloatPrecision` (defaulting to false) is added to `StringHelper::convertToString`, to `NumberFormat::toFormattedString` and `NumberFormat\Formatter::toFormattedString`, and to the entire `Worksheet::toArray` family of functions. When the new parameter is set to true, the result can be less surprising to humans. It should not, however, be used in subsequent computations.

In the case of the NumberFormat functions, the new parameter will be considered only when the NumberFormat for the cell in question is `General` or equivalent. Setting an actual numeric format for the cell is probably a better solution than using the new parameter.
2025-09-10 00:32:26 -07:00
oleibman 00191100ba Deprecate Worksheet::getHashInt and Spreadsheet::getId
Php8.5 *may* deprecate the use of `__wakeup` (it is planned, but not yet implemented, and it is convtroversial). We use it only twice. In the first instance, it just throws an exception to prevent a security exploit. This can be trivially replaced with `__unserialize`.

The other instance is merely to initialize a Worksheet instance variable. Converting this use to `__unserialize` is *not* trivial (one of the reasons for the controversy). However, I see no useful purpose for that variable. Since it has no use, there is no real need for `__wakeup`, so we will just remove the routine altogether, and deprecate the variable's getter (there is no setter).

A similar instance variable in Spreadsheet also serves no useful purpose, so we will deprecate its getter as well (again no setter).
2025-09-10 00:27:22 -07:00
oleibman 109b2b282b Merge pull request #4633 from oleibman/issue4629
Conditional Formatting in extLst
2025-09-07 07:40:06 +00:00
oleibman 3ace47ad4d Merge branch 'master' into issue4629 2025-09-07 00:37:14 -07:00