324 Commits

Author SHA1 Message Date
oleibman 329a1b4730 Merge branch 'master' into stan82 2026-09-01 22:39:41 -07:00
oleibman 9e11effcad Update Phpstan
Also address problems reported in PR #4974 when Phpstan was run with an earlier Php version than our CI uses.
2026-09-01 22:24:34 -07:00
dependabot[bot] 51cef407dd Bump friendsofphp/php-cs-fixer from 3.95.17 to 3.95.23
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.95.17 to 3.95.23.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.95.17...v3.95.23)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-version: 3.95.23
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-09-01 11:02:40 +00:00
oleibman 585d3c0ce4 Merge branch 'master' into stancomments 2026-08-09 02:42:11 -07:00
oleibman b9f6ba4667 2.2.7 Reported Internal Error on Win11 - Upgrade to 2.2.8 2026-08-09 02:25:59 -07:00
dependabot[bot] 688c44f4db Bump squizlabs/php_codesniffer from 3.13.5 to 3.13.6
Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.13.5 to 3.13.6.
- [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases)
- [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/4.x/CHANGELOG-3.x.md)
- [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.13.5...3.13.6)

---
updated-dependencies:
- dependency-name: squizlabs/php_codesniffer
  dependency-version: 3.13.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-08 08:27:06 +00:00
oleibman 4bf2f8f326 Merge branch 'master' into stancomments 2026-08-03 00:45:46 -07:00
oleibman 40911aa104 Update Phpstan and Tcpdf
Many problems with Dependabot this month. Phpstan introduced a lot of new "errors". These are now fixed or annotated. I combined this with a change to require comments for `phpstan-ignore`. These won't always be useful, but I think requiring them makes sense.

Tcpdf is more of a non-update. Our composer.json specified `^6.5`. For some reason, Dependabot decided it was okay to change that to `^6.5||^7.0`, which seems presumptuous. (One of the triggers was probably the elimination of Php8.1, since the new product requires 8.2+.) Tcpdf is nominally deprecated, replaced by tc-lib-pdf. Tcpdf 7 passes control to the new product. However, the upgrade is not straightforward. The user needs to supply font files which were formerly distributed with the product, and a code change to define a (shudder) global constant is required. Consequently, Dependabot's upgrade failed its unit tests. While I may evaluate what might be needed at some point in the future, for now I am just updating composer.json to reject Tcpdf 7+.
2026-08-01 22:06:38 -07:00
dependabot[bot] a27503b72d Bump friendsofphp/php-cs-fixer from 3.95.11 to 3.95.17
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.95.11 to 3.95.17.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.95.11...v3.95.17)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-version: 3.95.17
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-08-01 11:02:39 +00:00
dependabot[bot] bcf1998d9a Bump dompdf/dompdf from 3.1.5 to 3.1.6
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 3.1.5 to 3.1.6.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v3.1.5...v3.1.6)

---
updated-dependencies:
- dependency-name: dompdf/dompdf
  dependency-version: 3.1.6
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-26 15:59:24 +00:00
oleibman 4e28940dd7 Merge branch 'master' into nophp81 2026-07-02 17:47:57 -07:00
oleibman 9533f5903f Update Phpstan 2026-07-01 12:33:46 -07:00
dependabot[bot] 0532808c46 Bump friendsofphp/php-cs-fixer from 3.95.4 to 3.95.11
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.95.4 to 3.95.11.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.95.4...v3.95.11)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-version: 3.95.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-01 11:02:49 +00:00
oleibman 1388efb080 Drop Support for Php 8.1
This PR will be merged at the end of this month. As the README says, we maintain support for Php Versions for six months beyond their end of life. That time has now arrived for 8.1.
2026-06-08 09:15:57 -07:00
oleibman 1571b81ab8 Update Phpstan 2026-06-06 23:14:42 -07:00
dependabot[bot] aea5b934fe Bump friendsofphp/php-cs-fixer from 3.95.3 to 3.95.4
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.95.3 to 3.95.4.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.95.3...v3.95.4)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-version: 3.95.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-07 02:55:01 +00:00
oleibman ad2285dac7 Merge pull request #4892 from oleibman/stanchanges
Phpstan Changes
2026-06-01 13:53:56 +00:00
oleibman 14a641f924 Phpstan Changes
A large volume of changes due to "sealed" arrays. Some are sensible; some are very confusing and are handled with `ignore` annotations.

Modules in src with changed code (as opposed to doc-blocks or annotations) are:

- DateTimeExcelDays
- Reader/Xlsx
- Reader/Xlsx/AutoFilter
- Reader/Xlsx/Chart
- Reader/Xlsx/ConditionalStyles
- Reader/Xlsx/TableReader
2026-06-01 01:14:59 -07:00
dependabot[bot] 24f8d4983e Bump setasign/fpdi from 2.6.6 to 2.6.7
Bumps [setasign/fpdi](https://github.com/Setasign/FPDI) from 2.6.6 to 2.6.7.
- [Release notes](https://github.com/Setasign/FPDI/releases)
- [Commits](https://github.com/Setasign/FPDI/compare/v2.6.6...v2.6.7)

---
updated-dependencies:
- dependency-name: setasign/fpdi
  dependency-version: 2.6.7
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-19 21:11:18 +00:00
oleibman 5c8c20686f Combine Dependabot Changes
Someting seemed to be wrong with push setup. We'll see if it's fixed.
2026-05-01 19:17:45 -07:00
oleibman 4a476071b3 Merge pull request #4850 from oleibman/updatestan
Update PhpStan
2026-04-05 07:15:00 +00:00
oleibman 7e9c3814c4 Update PhpStan
Too many errors when Dependabot tried. These seem mostly to involve `implode`, whose use is often embedded in other function calls. For that reason, these changes include a higher proportion than usual of `// @phpstan-ignore-line`.
2026-04-03 13:00:27 -07:00
oleibman 36013a3db5 Merge pull request #4849 from PHPOffice/dependabot/composer/tecnickcom/tcpdf-6.11.2
Bump tecnickcom/tcpdf from 6.11.0 to 6.11.2
2026-04-01 13:35:13 +00:00
oleibman 274676f1bb Merge pull request #4848 from PHPOffice/dependabot/composer/dompdf/dompdf-3.1.5
Bump dompdf/dompdf from 3.1.4 to 3.1.5
2026-04-01 13:34:53 +00:00
dependabot[bot] f7de90492b Bump tecnickcom/tcpdf from 6.11.0 to 6.11.2
Bumps [tecnickcom/tcpdf](https://github.com/tecnickcom/TCPDF) from 6.11.0 to 6.11.2.
- [Changelog](https://github.com/tecnickcom/TCPDF/blob/main/CHANGELOG.TXT)
- [Commits](https://github.com/tecnickcom/TCPDF/compare/6.11.0...6.11.2)

---
updated-dependencies:
- dependency-name: tecnickcom/tcpdf
  dependency-version: 6.11.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 12:44:53 +00:00
dependabot[bot] 6c0e818845 Bump dompdf/dompdf from 3.1.4 to 3.1.5
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v3.1.4...v3.1.5)

---
updated-dependencies:
- dependency-name: dompdf/dompdf
  dependency-version: 3.1.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 12:44:50 +00:00
dependabot[bot] 989a4d25a5 Bump mpdf/mpdf from 8.2.7 to 8.3.1
Bumps [mpdf/mpdf](https://github.com/mpdf/mpdf) from 8.2.7 to 8.3.1.
- [Release notes](https://github.com/mpdf/mpdf/releases)
- [Changelog](https://github.com/mpdf/mpdf/blob/development/CHANGELOG.md)
- [Commits](https://github.com/mpdf/mpdf/compare/v8.2.7...v8.3.1)

---
updated-dependencies:
- dependency-name: mpdf/mpdf
  dependency-version: 8.3.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-01 12:44:42 +00:00
dependabot[bot] afd7019a60 Bump tecnickcom/tcpdf from 6.10.1 to 6.11.0
Bumps [tecnickcom/tcpdf](https://github.com/tecnickcom/TCPDF) from 6.10.1 to 6.11.0.
- [Changelog](https://github.com/tecnickcom/TCPDF/blob/main/CHANGELOG.TXT)
- [Commits](https://github.com/tecnickcom/TCPDF/compare/6.10.1...6.11.0)

---
updated-dependencies:
- dependency-name: tecnickcom/tcpdf
  dependency-version: 6.11.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-01 11:02:15 +00:00
oleibman 8dd433eb2b Prepare Changelog for New Release
Dependabot day is tomorrow, so get a jump on that by upgrading composer.lock.

Phpstan newly flagged a method in Writer/Xls/Worksheet which is not used internally, and seems impossible to be used by user programs. Deprecate it and some associates. No code changes.
2026-02-28 11:45:12 -08:00
oleibman 3e15179c53 Merge pull request #4796 from PHPOffice/dependabot/composer/phpstan/phpstan-phpunit-2.0.12
Bump phpstan/phpstan-phpunit from 2.0.11 to 2.0.12
2026-02-01 16:26:39 +00:00
oleibman daca2fc7ff Merge pull request #4795 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.93.1
Bump friendsofphp/php-cs-fixer from 3.92.3 to 3.93.1
2026-02-01 16:20:37 +00:00
dependabot[bot] 97e91caf30 Bump phpstan/phpstan-phpunit from 2.0.11 to 2.0.12
Bumps [phpstan/phpstan-phpunit](https://github.com/phpstan/phpstan-phpunit) from 2.0.11 to 2.0.12.
- [Release notes](https://github.com/phpstan/phpstan-phpunit/releases)
- [Commits](https://github.com/phpstan/phpstan-phpunit/compare/2.0.11...2.0.12)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-phpunit
  dependency-version: 2.0.12
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 11:01:15 +00:00
dependabot[bot] b4f503896a Bump friendsofphp/php-cs-fixer from 3.92.3 to 3.93.1
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.92.3 to 3.93.1.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.92.3...v3.93.1)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-version: 3.93.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 11:01:09 +00:00
dependabot[bot] 4af74bc217 Bump phpstan/phpstan from 2.1.33 to 2.1.38
---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-version: 2.1.38
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-01 11:01:00 +00:00
dependabot[bot] 344899f50a Bump symfony/process from 6.4.26 to 6.4.33
Bumps [symfony/process](https://github.com/symfony/process) from 6.4.26 to 6.4.33.
- [Release notes](https://github.com/symfony/process/releases)
- [Changelog](https://github.com/symfony/process/blob/8.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/process/compare/v6.4.26...v6.4.33)

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

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 22:07:12 +00:00
dependabot[bot] 662e0a943a Bump phpunit/phpunit from 10.5.60 to 10.5.62
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.60 to 10.5.62.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.5.62/ChangeLog-10.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.5.60...10.5.62)

---
updated-dependencies:
- dependency-name: phpunit/phpunit
  dependency-version: 10.5.62
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-28 01:32:46 +00:00
oleibman 2bb1c9df3c Dependencies
A dependency checker found the following minor problems:
- `TIMEVALUE` uses the wrong case for `DateTime`.
- The `filter` extension is used but is not declared as a dependency.
- The `exif` extension is used but is not declared as a dependency.

Php tolerates the first, but the solution is so trivial that it might as well be applied.

You have to go out of your way to not include `filter` - is it almost always builtin. Nevertheless, it shouldn't hurt to explicitly declare it.

`exif` is used in only one place, and, if it's not available there, we fall back to `GD`, which *is* a dependency. Getting rid of the `exif` portion should be harmless.
2025-12-27 16:15:30 -08:00
oleibman 31174c1c90 Set All Locale Variables at Once in a Threadsafe Manner
Fix #954, which went stale 6 years ago and which I have now reopened. The `setLocale` method in `Calculation` and `Settings` does not affect the 3 localizable properties in `StringHelper` - `currencyCode`, `decimalSeparator`, and `thousandsSeparator`. One way to work around this problem is to set those properties separately; this is probably how most people handle it. Another way is to call Php's own `setlocale` function; this does not require any foreknowledge of what the values need to be, but it comes with baggage (data is maintained at process level rather than thread level), so its use is discouraged.

This PR adds a new `setLocale` method to `StringHelper`. It sets the 3 properties and the `Calculation` language all at once. It depends on the `Intl` extension, which is a recommendation but not a formal requirement for PhpSpreadsheet; the method will return `false` if `Intl` is not available or it thinks the supplied locale is not valid.
2025-12-25 19:24:44 -08:00
oleibman 84747121a1 Changes to WEBSERVICE
This PR started because the documentation on how to configure an Http client was out of date. However, as I investigated further, I found problems. GuzzleHttp, a client mentioned in the documentation, for example - it probably works fine when executed from a browser, but it does not work for `https:` requests from the Windows command line. See https://github.com/guzzle/guzzle/issues/2601, where a user notes that Guzzle's own program to demonstrate how to use it doesn't work, a result that I can confirm is still true. A linked explanation says that the solution is to explicitly specify a path to a CA bundle. For starters, this is impractical from our perspective. One possible solution is to change a php.ini option which is not needed for any other purpose, and which probably needs to change frequently - a burden on users who follow that route. An alternative solution is to use a method `request` to specify the path to the certificate store; this also will need to change from time to time, and, worse, the only method defined in ClientInterface is `sendRequest`, so using this solution isn't client-agnostic, which is a stated goal of https://github.com/PHPOffice/PhpSpreadsheet/commit/7cb4884b96174eb611621635e6fb603ef54178f7. Additionally, it is not clear why an external interface is needed rather than a call to file_get_contents, used elsewhere in PhpSpreadsheet, and not requiring a path to a certificate store.

I also believe that automatically evaluating WEBSERVICE for any arbitrary argument is not a good idea. I am adding a domain whitelist which the user must populate. For domains not in the whitelist, the calculation will revert to `oldCalculatedValue`, which is good enough for pass-through purposes, which probably encompasses most cases. That is how Excel behaves by default - it disables WEBSERVICE calls when it opens a spreadsheet which contains them. For cases where the user adds a new WEBSERVICE call, there is a choice of whitelisting the domain, or getting the result in some other way and using `setCalculatedValue` to store it.

Finally, when a WEBSERVICE call *is* evaluated, it will now accept a cell-address argument rather than just a literal string as is now the case.
2025-12-19 10:12:50 -08:00
oleibman a8b86e38bb Update Mpdf
Fully 8.5 compliant version was just released.
2025-12-03 10:34:35 -08:00
oleibman 66422b11b4 Formal Support for Php8.5
Ran into a surprising hitch when Php8.5 failed unit tests despite nightly succeeding. Duplicated problem locally, and fixed it with a Phpunit upgrade. Hopefully that will work on Github as well.
2025-11-21 16:19:08 -08:00
oleibman e88eaa6d95 Upgrade Phpstan
Too many new errors when Dependabot tried to upgrade.
2025-11-01 07:12:39 -07:00
oleibman 4db18eadd4 Merge pull request #4698 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.89.1
Bump friendsofphp/php-cs-fixer from 3.88.2 to 3.89.1
2025-11-01 11:35:56 +00:00
dependabot[bot] 4dfe452214 Bump dompdf/dompdf from 3.1.2 to 3.1.4
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 3.1.2 to 3.1.4.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: dompdf/dompdf
  dependency-version: 3.1.4
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 11:01:14 +00:00
dependabot[bot] 03d4751586 Bump friendsofphp/php-cs-fixer from 3.88.2 to 3.89.1
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.88.2 to 3.89.1.
- [Release notes](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases)
- [Changelog](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/compare/v3.88.2...v3.89.1)

---
updated-dependencies:
- dependency-name: friendsofphp/php-cs-fixer
  dependency-version: 3.89.1
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-01 11:01:05 +00:00
oleibman f5257038aa Prepare for Release 5.2.0 2025-10-26 08:38:27 -07:00
oleibman 17e486f75a Upgrade Mitoteam for Php8.5 master 2025-10-16 08:14:29 -07:00
oleibman 0c459cbd5d Merge pull request #4674 from oleibman/stan20251001
Phpstan Update
2025-10-01 16:12:04 +00:00
oleibman 14ad63c56a Phpstan Update 2025-10-01 09:08:10 -07:00
oleibman 228bbed026 Merge pull request #4671 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.88.2
Bump friendsofphp/php-cs-fixer from 3.85.1 to 3.88.2
2025-10-01 14:49:23 +00:00