Commit Graph

6465 Commits

Author SHA1 Message Date
oleibman bccdf28672 Merge pull request #4933 from oleibman/stan20260701
Update Phpstan
2026-07-01 19:38:32 +00:00
oleibman 9533f5903f Update Phpstan 2026-07-01 12:33:46 -07:00
oleibman af9601ebdb Merge pull request #4932 from PHPOffice/dependabot/composer/composer/pcre-3.4.0
Bump composer/pcre from 3.3.2 to 3.4.0
2026-07-01 14:49:34 +00:00
oleibman 634f1f2a6c Merge pull request #4930 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.95.11
Bump friendsofphp/php-cs-fixer from 3.95.4 to 3.95.11
2026-07-01 14:49:13 +00:00
dependabot[bot] 1fc375baf5 Bump composer/pcre from 3.3.2 to 3.4.0
Bumps [composer/pcre](https://github.com/composer/pcre) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/composer/pcre/releases)
- [Commits](https://github.com/composer/pcre/compare/3.3.2...3.4.0)

---
updated-dependencies:
- dependency-name: composer/pcre
  dependency-version: 3.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-01 11:02:56 +00: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 d8c6890861 Merge pull request #4926 from oleibman/issue4917
Very Minor Changes to Worksheet, Reader/Xlsx, and Worksheet/AutoFilter
2026-06-29 03:44:56 +00:00
oleibman 5b57325f8c Update CHANGELOG.md 2026-06-28 20:41:07 -07:00
oleibman be06eebc2f Merge pull request #4925 from oleibman/issue943
Consistent HighestRow/Column After Row/Column Delete
2026-06-29 03:33:55 +00:00
oleibman 13edf0d8a2 More AutoFilter Tweaks 2026-06-25 17:08:15 -07:00
oleibman 7f331bca4c Clean Up Some Other Phpstan Annotations
Mostly remove `phpstan-ignore-line` in a number of places. Very minor code changes to Worksheet/AutoFilter and Reader/Xlsx.
2026-06-25 13:54:00 -07:00
oleibman a5e7ea2fb0 Minor Changes to Worksheet
Fix #4917.
2026-06-25 10:59:31 -07:00
oleibman 8fd7c56ef0 Consistent HighestRow/Column After Row/Column Delete
Fix #943, which went stale a long time ago, and is now reopened. I believe that the specific problem in that issue was actually mostly resolved some time ago. However, `highestRow/Column` produces questionable results when the delete range overlaps the highest row/column. That is fixed by this PR.

In addition, `removeRow/Column` allow the specification of a non-negative value for `numberOfRows/Columns`. But the expected results in those cases are not defined, and the actual results probably do not meet user expectations. I believe that very few, if any, users are taking advantage of this "feature", but we may as well straighten it out. For 0 rows/columns, I think it makes perfect sense to do nothing. As for negative - if `removeRow(5, 2)` says to remove 2 rows *starting* with 5, I think `removeRow(5, -2)` ought to remove (up to) 2 rows *ending* with 5. The undefined behaviors are changed to act as described in this paragraph.
2026-06-24 08:41:09 -07:00
oleibman e0b1e17f7a Merge pull request #4924 from PHPOffice/dependabot/github_actions/actions/cache-6
Bump actions/cache from 5 to 6
2026-06-24 15:30:08 +00:00
dependabot[bot] 5d5f140f2f Bump actions/cache from 5 to 6
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-24 11:05:27 +00:00
oleibman a8aeaaefed Merge pull request #4919 from oleibman/nogetfilter
Readers Should Directly Access readFilter
2026-06-21 04:01:01 +00:00
oleibman 81379f430c Update CHANGELOG.md 2026-06-20 20:57:17 -07:00
oleibman feb3b2e472 Merge pull request #4915 from oleibman/charttweaks
Avoid Hard-Coding Some Chart Xml Attributes
2026-06-21 03:26:36 +00:00
oleibman 4d185b711b Merge pull request #4914 from oleibman/misleading
Permit Ignoring 'Misleading Format' Tag
2026-06-21 03:26:12 +00:00
oleibman de44f19c83 Merge pull request #4921 from PHPOffice/dependabot/github_actions/actions/checkout-7
Bump actions/checkout from 6 to 7
2026-06-21 03:25:41 +00:00
dependabot[bot] 46a6fc1670 Bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-19 11:05:46 +00:00
oleibman 0e81e6a4ce Merge branch 'master' into nogetfilter 2026-06-18 11:38:52 -07:00
oleibman b65aecdcec Readers Should Directly Access readFilter
A number of interesting performance ideas have been submitted by @kemo. PR #4833 optimizes Xls Reader in a number of different ways. One of those, slightly modified, is to use the protected `readFilter` property which is available to all classes which inherit from `BaseReader` (which all our supported readers do), rather than call the `getReadFilter` method to obtain it (often in a loop). That applies to all readers, not just Xls, and is such a good idea that I am fast-tracking it ahead of 4833. Gnumeric, Ods, Xls, Xlsx, and Xml will all receive small performance boosts from it. Csv already does this, so no change is needed there. Html and Slk do not appear to do any filtering; possibly work for another day.
2026-06-18 10:04:39 -07:00
oleibman 907facc3f7 Merge pull request #4916 from oleibman/noutility
Delete Unused Test File
2026-06-18 04:12:44 +00:00
oleibman e623d5411b WIP Why Is This File Needed? 2026-06-17 20:56:44 -07:00
oleibman 94abde43f8 Slightly More Coverage 2026-06-17 15:07:20 -07:00
oleibman 1f4a5bdff2 More Data in Parameters, Less in Static Variables 2026-06-17 11:55:01 -07:00
oleibman 7d0f2ad706 Avoid Hard-Coding Some Chart Xml Attributes
Writer/Xlsx/Chart hard-codes a lot of output values. While nobody has reported a problem involving these, it makes sense to me to copy those values over from what Xlsx/Reader/Chart read, rather than hard-coding them. This involves adding some new properties to Chart and Layout, all, naturally, initialized to the values that we have been hard-coding.
- Chart\date1904
- Chart\lang
- Chart\pageMargins
- Chart\pageSetup
- Layout\bodyPr

With one exception, I have not investigated any of the new properties in depth. That may come in time. The one I did look at is `date1904`. Chances are that it should match the equivalent spreadsheet setting, but it won't matter if there are no dates on your chart, and it often won't matter even if you do. It may well matter if you are using a `date axis`. While looking into that, it became apparent that some Shared Date conversions need to be a bit more flexible, specifying an optional `calendar` parameter rather than relying on the Spreadsheet `calendar` (which is not accessible while processing the chart) or the Shared\Date `calendar` (which is accessible).
2026-06-16 20:08:46 -07:00
oleibman 1876d6062f Permit Ignoring 'Misleading Format' Tag
Building on PR #3508 and PR #4393, which allowed ignoring 5 different cell 'errors'. Adding this new one should have been dead easy, but MS, in its own inscrutable way, decided to complicate this by making the xml attribute require its very own namespace, unlike any of its relatives.

There are supposed to be several ways to activate this tag. One is to enter a date in cell A1, then in cell B1 enter the formula `=A1`, and set B1's numeric format to `General`.
2026-06-16 19:45:13 -07:00
oleibman 96fbeaac0a Merge pull request #4913 from oleibman/changelog20260612
Update Changelog
2026-06-13 03:54:40 +00:00
oleibman 99b0d93026 Update Changelog 2026-06-12 20:38:46 -07:00
oleibman 8aadd70f9a Merge pull request #4912 from oleibman/issue434
Tighten Up Writer Html Logic
2026-06-13 03:37:04 +00:00
oleibman c5e0e261d5 Merge pull request #4911 from oleibman/issue413
Chart DataTable
2026-06-13 03:36:44 +00:00
oleibman 961346a5d7 Merge pull request #4910 from oleibman/issue411
Allow Use of Multiple Ranges When Setting Style
2026-06-13 03:36:23 +00:00
oleibman 7a4574dcd1 Merge pull request #4909 from oleibman/issue863
Navigate Cell as Cursor
2026-06-13 03:35:59 +00:00
oleibman 355013c981 Merge pull request #4908 from oleibman/issue661
No lumOff for Radar Charts
2026-06-13 03:35:32 +00:00
oleibman db8917cd4b Tighten Up Writer Html Logic
Fix #434, which went stale in 2018 and is now reopened. User reported a fatal error in Writer/Html. Regrettably, there is no example code/spreadsheet to illustrate the error. However, the area of code where the error happened is identified. Studying that, it was clear that the error could be avoided through the use of the nullsafe operator `?->` without any performance hit, while making the resulting code a little clearer.
2026-06-11 06:54:43 -07:00
oleibman dbea64cb03 Chart DataTable
Fix #413, which went stale in 2018 and is now reopened. A DataTable can be used on a chart in place of a Legend (or in addition to one, but it doesn't really make sense to have both). The fix was substantially developed by @topaDev before the issue went stale. This PR provides basic support for reading and writing DataTables on charts. The new sample on this PR shows them in action. They have obscure features which are not implemented (e.g. `glow`); those will have to wait for another day.
2026-06-11 06:43:42 -07:00
oleibman a028eea314 Allow Use of Multiple Ranges When Setting Style
Fix #411, which went stale in 2018 and is now reopened. You can get a style for a set of cells which uses multiple ranges, e.g. `A1:B2,C5:H10`, but we throw an exception if you try to change the style. I don't know how useful that is, but it's been requested and it's pretty easy to implement with recursion.

The comma in the ranges represents the `union` operator. `getStyle` is very permissive - it will allow almost anything to be specified. However, attempts to use a space as the `intersection` operator, or, indeed, many other nonsense strings, will still be permitted for `getStyle` but will continue to throw an Exception if an attempt is made to alter the style.
2026-06-11 06:30:20 -07:00
oleibman 46f4b8995a Additional Methods and Tests 2026-06-10 13:30:10 -07:00
oleibman b65783bdeb Navigate Cell as Cursor
Fix #863, which went stale in 2019 and is now reopened. Add methods to `Cell` which operate in a cursor-like manner, allowing you to change to cells on the right, left, down, or up.
2026-06-09 17:02:05 -07:00
oleibman 6a0d4ff527 No lumOff for Radar Charts
Fix #661 (marked stale in 2018, but now reopened). That issue was already mostly resolved by many changes to Xlsx Chart Writer logic some time ago. However, a new problem popped up. PR #2950 added `brightness` logic to Xlsx Reader and Writer. That was done primarily for the benefit of scatter charts. Xlsx Writer writes two brightness properties `lumMod` and `lumOff`. These values are complete complementary (if you know one, you know the other), so I am not sure why both are needed, but my scatter chart testing indicated that they were. It turns out that Radar charts can also set brightness, but, if the writer specifies both `lumMod` and `lumOff`, the resulting chart is slightly off. There may be more to this, but that's all I can deal with for now - I suppress writing `lumOff` if we're writing a radar chart. If there are other problems in this area, I will wait for them to be reported. None of the existing radar chart samples used the brightness properties; however, the example attached to 661 did. It is added as a new Sample, and tests are added.
2026-06-09 12:26:11 -07:00
oleibman fd5f72edd7 Merge pull request #4906 from oleibman/strikesubsup
Minor Coverage Improvement Reader/Xlsx
2026-06-08 03:21:59 +00:00
oleibman 1f7dd42482 Minor Coverage Improvement Reader/Xlsx 2026-06-07 20:03:44 -07:00
oleibman 4f920ccc57 Merge pull request #4830 from kemo/perf/xlsx-xmlreader-streaming
Restructure Xlsx Reader Parser Allowing Experimental Streaming Mode
2026-06-07 14:42:58 +00:00
oleibman a4346ec600 Update CHANGELOG.md 2026-06-07 07:39:05 -07:00
oleibman 45f6b78792 Merge branch 'master' into perf/xlsx-xmlreader-streaming 2026-06-07 07:10:21 -07:00
oleibman 54e28ff8ca Merge pull request #4827 from kemo/perf/csv-streaming-encoding
Experimental Stream encoding conversion in CSV reader to reduce peak memory
2026-06-07 14:01:26 +00:00
oleibman fd773844c2 Merge branch 'master' into perf/csv-streaming-encoding 2026-06-07 06:57:32 -07:00
oleibman e7067ecf9a Merge pull request #4905 from oleibman/stan20260606
Update Phpstan
2026-06-07 06:32:03 +00:00