Commit Graph

5030 Commits

Author SHA1 Message Date
oleibman 4b568b47b4 Handle Case Where Both Format and Value Contain Quotation Mark 2024-11-26 15:20:32 -08:00
Everton Barbosa 3eee74950f Ignore cell formatting when the format is a single @
This commit fix two issues that happened when the a cell was formatted as text
* When the cell contains a number prefixed with dollar sign, this number is getting replaced with 0. The replacement happens due to the preg_replace function.
* When the cell contains quotes, the quote would be removed.
2024-11-26 17:20:47 -03:00
oleibman fd562affef Merge pull request #4238 from Blacknife/fix-conditional-formatting-a-cell-documentation
fix `Conditional formatting a cell` documentation
2024-11-23 15:29:26 +00:00
Blacknife 1fe3626dac fix Conditional formatting a cell documentation 2024-11-23 11:12:34 +03:00
oleibman f37b119298 Merge pull request #4237 from oleibman/chglog20241122
Prepare Change Log for Next Release
2024-11-22 08:30:57 +00:00
oleibman a4071d8f56 Prepare Change Log for Next Release 2024-11-22 00:27:15 -08:00
oleibman fb74dcdfa5 Merge pull request #4233 from oleibman/nodtdload
Ignore Settings::libXmlLoaderOptions
3.5.0
2024-11-22 06:41:00 +00:00
oleibman 343d26a75c Update CHANGELOG.md 2024-11-21 22:28:35 -08:00
oleibman dde197dea7 Merge branch 'master' into nodtdload 2024-11-18 23:46:23 -08:00
oleibman 4d902d1ca4 Update CHANGELOG.md 2024-11-18 23:45:04 -08:00
oleibman 9ab866f409 Ignore Settings::libXmlLoaderOptions
Having addressed several security advisories, one evident *theoretical* problem remains. This is an attempt to future-proof our code against similar vulnerabilities. It all begins with our implementation of libXmlLoaderOptions, which uses as a default LIBXML_DTDLOAD. This unfortunate choice opens us to XXE problems, many recently solved. I do not believe that there is a legitimate use case for allowing this, and will therefore ignore and deprecate that option.

Although this might seem to be a breaking change, it is not. The setting is used only after the Xml has been subject to a security scan, and the security scan throws an exception if it detects the use of `<!DOCTYPE` within the Xml. Therefore, the setting will be effective only on Xml which does not contain that tag, and will consequently have no effect on most Xml. The only exception would be Xml which has been crafted to avoid detection by the security scanner in a manner which has not been disclosed to us. Although we hope that we've now blocked all such avenues, this provides additional protection just in case.

With this change in place, we could relax certain restrictions, e.g. the use of EBCDIC or even UTF-7. For now, these will remain in place. I will need to be convinced that there is a legitimate use case for easing the restrictions before doing so. We might even consider the elimination of the Security Scanner altogether. However, it does allow for early detection, and, in any case, provides a method to correct Xml which most Xml readers would fail but which Excel accepts.

My plan is to merge this within the next few days, and tag a new release immediately after. It will also be backported to all active branches.
2024-11-18 22:28:35 -08:00
oleibman c01b94b242 Merge pull request #4232 from oleibman/upgrdunit
Upgrade PhpUnit
2024-11-14 22:47:38 +00:00
oleibman 9398f74187 Upgrade PhpUnit
To a version that knows Php8.4 deprecates E_STRICT.
2024-11-14 14:42:10 -08:00
oleibman 33d466e206 Merge pull request #4230 from oleibman/stan20241111
Catch Phpstan Up
2024-11-14 01:35:52 +00:00
oleibman 2cbf08cacd Merge pull request #4207 from oleibman/sheetindex
Change Hash Code for Worksheet
2024-11-13 23:40:32 +00:00
oleibman 889bdeb465 Update CHANGELOG.md 2024-11-13 15:37:55 -08:00
oleibman a8553cad0f Merge branch 'master' into sheetindex 2024-11-13 14:10:41 -08:00
oleibman 1419febbba Catch Phpstan Up
Its last few updates have been irksome. I need to eliminate more of the new problems with annotations rather than code because I can't figure out what it's objecting to. Nevertheless, it provides a very valuable service, so ...

Its latest release is flagging calling abs with a string, even when the string is defined as numeric-string in a doc block. Php generally allows it, though not with strict types. Changed to add 0 in those situations.
2024-11-12 06:53:22 -08:00
oleibman e92a4ff1d8 Merge pull request #4205 from sergiy-petrov/sergiy-petrov-patch-4
Test against php 8.4
2024-11-12 14:31:39 +00:00
oleibman 15f6dd74cc Merge branch 'master' into sergiy-petrov-patch-4 2024-11-12 06:28:36 -08:00
oleibman dbc2e2433a Merge pull request #4224 from m7913d/fix_s_tag
Add support for <s> tag when converting HTML to RichText
2024-11-10 23:44:11 +00:00
oleibman e78e7ea9a7 Update CHANGELOG.md 2024-11-10 15:41:01 -08:00
oleibman 0cf7292ecf Merge branch 'master' into fix_s_tag 2024-11-10 15:22:46 -08:00
oleibman 3e52499a40 Merge pull request #4221 from m7913d/fix_versions_ForbiddenThisUseContexts
Fix incorrect versions error (ForbiddenThisUseContexts)
2024-11-10 19:13:44 +00:00
oleibman 98b5500480 Merge pull request #4228 from oleibman/contrib
Update "Contributing" Notes and One Github Action
2024-11-10 19:00:38 +00:00
oleibman 1983af6597 Merge branch 'master' into contrib 2024-11-10 10:58:26 -08:00
oleibman 830baa14b2 Update "Contributing" Notes and One Github Action
Replace one deprecated action, and update "How to release".
2024-11-10 10:55:42 -08:00
oleibman a8ff421c98 Merge pull request #4222 from m7913d/pr_improve_contributing_guidelines
Improve contributing guidelines for composer newbies
2024-11-10 18:34:11 +00:00
m7913d 1ec119a2bc Fix composer check on Windows 2024-11-10 13:23:49 +01:00
m7913d de6bcaae66 Assert font of parsed HTML is not null 2024-11-10 13:04:32 +01:00
oleibman 4ec8fa7af7 Merge pull request #4226 from oleibman/chg350start
Start Changelog for 3.5.0
2024-11-10 11:57:04 +00:00
oleibman d1c1316517 Start Changelog for 3.5.0 2024-11-10 03:54:01 -08:00
oleibman eec07c20b5 Omitted a Line from Changelog 3.4.0 2024-11-10 02:10:41 -08:00
oleibman 31e2522110 Merge pull request #4225 from oleibman/change340
Update Changelog for New Release
2024-11-10 09:58:47 +00:00
oleibman f10c3cb69b Update Changelog for New Release 2024-11-10 01:54:48 -08:00
oleibman c04a9389d3 Merge commit from fork
* Security Patch

* Throw Exception for EBCDIC Encoding

* Mixed UTF-8 and UTF-16

Further mischief. I don't know if the examples truly are valid Xml, but PhpSpreadsheet is letting them sneak through.
2024-11-10 01:07:59 -08:00
m7913d 9d7fe28b04 Update CHANGELOG.md 2024-11-09 18:37:26 +01:00
m7913d c1c12720a4 Add support for <s> tag when converting HTML to RichText
Fixes #4223
2024-11-09 18:36:46 +01:00
m7913d 26e59cdfc2 Fix incorrect versions error (ForbiddenThisUseContexts)
PHPCompatibility erroneously flags the use of $this in enumerations.
Commit 5e248cf moved disabling of this error check to .github/workflows/main.yml
Hence, `composer versions` and `composer check` should also exclude this check.
2024-11-09 16:50:14 +01:00
m7913d 72d5fdcdbe Improve contributing guidelines for composer newbies
To allow running `composer versions`, it is necessary to call `composer install` to install the (development) dependencies of this project. This may not be obvious to contributors unfamiliar with `composer'.
2024-11-09 15:36:57 +01:00
oleibman b99d061726 Clean Up Some Tests 2024-11-07 21:47:56 -08:00
oleibman 7c973ab085 Merge pull request #4216 from PHPOffice/dependabot/composer/symfony/process-6.4.14
Bump symfony/process from 6.4.8 to 6.4.14
2024-11-06 21:44:23 +00:00
dependabot[bot] d780b1b1de Bump symfony/process from 6.4.8 to 6.4.14
Bumps [symfony/process](https://github.com/symfony/process) from 6.4.8 to 6.4.14.
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/7.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/process/compare/v6.4.8...v6.4.14)

---
updated-dependencies:
- dependency-name: symfony/process
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-06 18:24:02 +00:00
oleibman 2670e0a972 Merge pull request #4214 from oleibman/issue4213
Changes to ROUNDDOWN/ROUNDUP/TRUNC
2024-11-06 14:02:03 +00:00
oleibman bd1b1e5237 Merge branch 'master' into issue4213 2024-11-06 05:48:06 -08:00
oleibman d01efac277 Update CHANGELOG.md 2024-11-06 05:46:58 -08:00
oleibman 915bfc55cd Merge pull request #4212 from oleibman/issue4200
Write ignoredErrors Tag Before Drawings
2024-11-05 05:53:38 +00:00
oleibman aba2385561 Merge branch 'master' into issue4200 2024-11-04 21:51:26 -08:00
oleibman ee7cc8f0a0 Update CHANGELOG.md 2024-11-04 21:50:27 -08:00
oleibman a18abb3e0f Changes to ROUNDDOWN/ROUNDUP/TRUNC
Fix #4213. Early versions of Php 8.4 caused problems for some Excel functions, among them ROUNDDOWN and ROUNDUP. New code was added which seemed to work for 8.4 and all prior releases (back to 7.4). However, as the issue shows, there is a problem with the new logic that had not been a problem for prior releases (PhpSpreadsheet 1.29.1 with Php 8.3 or earlier).

As it happens, some time after 8.4 broke the existing functionality, new features were added to it which enabled much cleaner logic. The code will now take this cleaner path when available, and revert to the older logic when not. This appears to work for all relevant Php releases, at least till the next non-match between PhpSpreadsheet and Excel is reported.

And, having made the change to ROUNDDOWN, it occurred to me that ROUNDDOWN always returns the same result as TRUNC (they differ only in number of required arguments). So I changed TRUNC to call ROUNDDOWN, and that didn't break anything. So I will keep that change. This probably means I should change Calculation so that ROUNDDOWN is called automatically, and deprecate TRUNC. That can happen at a later time.
2024-11-04 19:23:53 -08:00