Commit Graph

6177 Commits

Author SHA1 Message Date
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
oleibman 65b54ae336 Merge pull request #4794 from PHPOffice/dependabot/composer/phpstan/phpstan-2.1.38
Bump phpstan/phpstan from 2.1.33 to 2.1.38
2026-02-01 15:52:44 +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
oleibman c1eb8e90d7 Merge pull request #4789 from oleibman/pdfhdrtlr
Headers and Footers in Pdf
2026-01-31 20:16:22 +00:00
oleibman 6bbeb49026 Update CHANGELOG.md 2026-01-31 12:12:38 -08:00
oleibman 987489f508 Merge pull request #4792 from PHPOffice/dependabot/composer/symfony/process-6.4.33
Bump symfony/process from 6.4.26 to 6.4.33
2026-01-28 22:54:07 +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
oleibman 1bb962c76b Merge branch 'master' into pdfhdrtlr 2026-01-27 18:17:04 -08:00
oleibman 12095e5f49 Merge pull request #4790 from PHPOffice/dependabot/composer/phpunit/phpunit-10.5.62
Bump phpunit/phpunit from 10.5.60 to 10.5.62
2026-01-28 02:11:14 +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 15fbc9a9d9 Headers and Footers in Pdf
Fix #3159, at least as far as we can. Requester would probably prefer that we automatically translate the PhpSpreadsheet header and footer information to forms that the Pdf vendors can handle. That seems like it would be very difficult. On the other hand, we can add some new properties to the Pdf writers to make it *relatively* easy for the user to define their own headers and footers for the writers.

Mpdf, as mentioned in the issue, can already handle this in conjunction with the `editHtmlCallback` property. This is demonstraded in Sample21c, which is now renamed to something more descriptive, `Mpdf_Custom_Headers`. That is the only change needed for Mpdf.

Tcpdf, which currently automatically prevents any footers or headers, needs some new properties to allow them. Even with the new properties, a user would need to extend both PhpSpreadsheet's Tcpdf Writer, and the vendor's own class (extending that class is actually the vendor's recommendation). A new sample `Tcpdf_Custom_Headers` demonstrates how this would be done.

Dompdf has 2 ways to add headers and footers. One is pretty good at styling, but doesn't offer much flexibility for dynamic properties other than the current page number; it can't handle different odd/even/first headers, nor the number of pages in the document. The second makes the dynamic properties possible, but seems difficult to style. Two new samples `Dompdf_Custom_Headers` (using `editHtmlCallback`) and `Dompdf_Canvas_Headers` (using a new protected method `callPageScript`) illustrate the use of each.

None of the samples demonstrates the full capabilities of what can go into a header or footer. I consider that out of scope; enabling the ability is one thing, perfecting it is quite another.
2026-01-26 21:08:46 -08:00
oleibman 12861f44e2 Merge pull request #4787 from oleibman/issue1810
Option To Use OldCalculatedValue in ToArray and its Relatives
2026-01-24 03:59:49 +00:00
oleibman c735e2fc82 Use Cell Value if OldCalculatedValue is Null 2026-01-23 18:15:41 -08:00
oleibman 7aef8b24cc Option To Use OldCalculatedValue in ToArray and its Relatives
Fix #1810, just before it turns 6 years old. Reporter thinks it can save time. Easy to implement, especially with the advent of named parameters which were not available when issue was opened.
2026-01-23 14:56:16 -08:00
oleibman 7758d917ba Merge pull request #4657 from oleibman/issue4656
Handling Unions as Function Arguments
2026-01-22 00:01:43 +00:00
oleibman 51d72ad1e9 Merge branch 'master' into issue4656 2026-01-21 13:20:03 -08:00
oleibman 3852e81bb5 Update CHANGELOG.md 2026-01-21 12:45:09 -08:00
oleibman 293de4dfbc Merge pull request #4783 from oleibman/dataformula
Writer Html Optionally Save Formulas as Data Attributes
2026-01-21 20:30:15 +00:00
oleibman e4e3bb0c4f Add data-checkbox Attribute 2026-01-21 12:03:38 -08:00
oleibman 0d0729911a Merge pull request #4785 from oleibman/issue3982
Restore Test Disabled Due to Phpunit 10 Bug
2026-01-21 09:07:57 +00:00
oleibman e8033b8453 Restore Test Disabled Due to Phpunit 10 Bug
Issue3982Test mysteriously ran into memory problems when we migrated from Phpunit 9 to 10. It wasn't all that critical a test, so it has been disabled ever since. I finally had some time to research, and the problem is unquestionably with Phpunit's `assertCount` test - it doesn't like something about our array. However, we can easily redo that test by using Php's native `count` function, and testing that result with `assertSame`. I have not yet succeeded at simplifying the test to a state where I am willing to report the bug, but I'll keep trying. In the meantime, the test is recoded, and can now be run successfully. No source code changes.
2026-01-20 17:58:51 -08:00
oleibman f8ce6a9a83 Support for Defined Names 2026-01-20 12:19:23 -08:00
oleibman 96131856c3 Writer Html Optionally Save Formulas as Data Attributes
This will improve round-tripping from Xlsx to Html and back again. The calculated result will still be what is displayed when viewing the result in a browser, but, using the new option, the original formula can be reconstructed when PhpSpreadsheet reads the Html file. The ability to recognize this situation is automatically enabled in Html Reader, however, to avoid BC issues, it needs to be explicitly enabled for Html Writer. A new boolean property `dataFormula` and setter are added to Writer; it will default to current behavior `false` for now, but my plan is to change the default in the next breaking release. I cannot think of a decent use case for a getter, so have not added one.
2026-01-19 17:03:11 -08:00
oleibman 3590000687 Merge branch 'master' into issue4656 2026-01-19 12:42:24 -08:00
oleibman 7f284c7d93 Deprecate FormulaParser, FormulaToken
Unused in this project. I checked to see if they might be of use for this PR. They aren't.
2026-01-19 12:38:56 -08:00
oleibman 4b0bdd6cfd Merge pull request #4781 from oleibman/checkbox
Add Checkbox Style (Xlsx and Html only)
2026-01-19 06:54:08 +00:00
oleibman f2a5ad26a7 Merge branch 'master' into checkbox 2026-01-18 19:20:12 -08:00
oleibman bdb950205c Update CHANGELOG.md 2026-01-18 19:18:58 -08:00
oleibman b837dbb55c More Tests 2026-01-18 18:31:08 -08:00
oleibman f91fcf82c4 Merge pull request #4780 from xannyprox/master
Optimize formula detection in DefaultValueBinder by reusing Calculati…
2026-01-18 20:54:44 +00:00
oleibman e1a72c1631 Remove Redundant Tests 2026-01-18 12:25:17 -08:00
oleibman db8f3d2669 Extra Testing 2026-01-18 02:53:03 -08:00
oleibman a71ae2a736 Consolidate Some Tests 2026-01-18 02:32:55 -08:00
oleibman 3b02929010 Restore Inappropriately Deleted Test 2026-01-18 02:13:58 -08:00
oleibman ba3b2938cb Coverage Tweak 2026-01-17 21:06:25 -08:00
oleibman f2588c1e05 Support Html After All
Use Unicode characters U+2610 (Ballot Box) and U+2611 (Ballot Box with Check).
2026-01-17 20:27:24 -08:00
oleibman dc6b1e9ed2 Update Changelog 2026-01-16 20:16:24 -08:00
oleibman 860f2c6637 Restore Tests Whose Absence Led to Omitted Coverage 2026-01-16 18:21:57 -08:00
oleibman 0d72d12044 Add Checkbox Style (Xlsx only)
Fix #4280, an issue with many problems; this is the last one (PR #4281 and PR #4677 dealt with other aspects of the problem). New releases of Excel allow representing TRUE/FALSE as a checked/unchecked checkbox. This requires a change to Styles, as expected. But Excel has implemented it in such a manner that changes are also required to Content_Types and workbook.xml.rels; and a new xml file propertyFeatureBag is also required. Seems like a lot of work for such a small change. A new property is added to Style, but only Xlsx Reader and Writer support it; no other format does.
2026-01-16 12:48:04 -08:00
xannyprox 820640d516 Merge branch 'master' of https://github.com/xannyprox/PhpSpreadsheet 2026-01-16 21:02:48 +03:00
xannyprox 8b010e4dcd php-cs-fixer Fixes Applied 2026-01-16 21:02:44 +03:00
Xanny 2b5e6bd14d Merge branch 'master' into master 2026-01-16 20:32:38 +03:00
xannyprox 2c4faa535d [Perf] Optimize DefaultValueBinder formula detection with dedicated CalculationParserOnly singleton 2026-01-16 20:25:11 +03:00
oleibman e2ead071da Merge pull request #4779 from oleibman/lineending2
Writer/Html Option to Set Line Ending
2026-01-16 06:40:58 +00:00
oleibman 050743f179 Eliminate Redundant Line 2026-01-15 22:37:44 -08:00
oleibman 501f4fe6ee Test CellRanges with Union 2026-01-15 12:19:25 -08:00
oleibman 52938a2eb5 Coverage Tweak 2026-01-15 02:10:47 -08:00