Commit Graph

4673 Commits

Author SHA1 Message Date
oleibman 1f83ba8765 Merge pull request #4082 from PHPOffice/dependabot/composer/phpunit/phpunit-10.5.24
Bump phpunit/phpunit from 10.5.20 to 10.5.24
2024-07-01 13:12:19 +00:00
dependabot[bot] 7ce99c8834 Bump phpunit/phpunit from 10.5.20 to 10.5.24
Bumps [phpunit/phpunit](https://github.com/sebastianbergmann/phpunit) from 10.5.20 to 10.5.24.
- [Release notes](https://github.com/sebastianbergmann/phpunit/releases)
- [Changelog](https://github.com/sebastianbergmann/phpunit/blob/10.5.24/ChangeLog-10.5.md)
- [Commits](https://github.com/sebastianbergmann/phpunit/compare/10.5.20...10.5.24)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 11:52:56 +00:00
oleibman 14c3df0ebc Merge pull request #4076 from oleibman/pr1415
CSV Writer Allow Varying Number of Columns
2024-06-30 02:34:08 +00:00
oleibman e8bb091f3b Merge branch 'master' into pr1415 2024-06-29 19:32:02 -07:00
oleibman 1ef063381b Update CHANGELOG.md 2024-06-29 19:28:40 -07:00
oleibman aae4992dca Merge pull request #4074 from yfinkel/patch-1
Update JpGraphRendererBase.php - check existing of PlotLabel
2024-06-30 02:12:15 +00:00
Юрий Финкель 675efc1f79 getDataLabel() defends against empty labels 2024-06-28 11:01:58 +04:00
Юрий Финкель 3b37d3e300 getDataLabel() defends against empty labels 2024-06-28 10:58:03 +04:00
Юрий Финкель 766a73cf84 getDataLabel() defends against empty labels 2024-06-28 10:54:30 +04:00
Юрий Финкель f3693406ed getDataLabel defends against empty labels 2024-06-28 10:49:56 +04:00
Юрий Финкель ccee8690d1 getDataLabel defends against empty labels 2024-06-28 10:43:05 +04:00
oleibman 02479de01a CSV Writer Allow Varying Number of Columns
Supersedes PR #1415 by @AndrewMonty, which went stale in May 2020, and which is not directly usable due to changes between now and then. Fix #1414, which also went stale; I will remove the stale status and reopen the issue pending the merging of this PR.

Add an option to CSV Writer so that it writes the cells for a row only through the highest data column used in the row, rather than through the highest data column used in the worksheet.
2024-06-27 00:01:55 -07:00
Юрий Финкель 17fc6234e6 Update JpGraphRendererBase.php 2024-06-26 12:39:26 +04:00
Юрий Финкель 36f316856b Check existing of PlotLabel before using its method getDataValue()
I'v got that:

Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\FatalError: "Error: Uncaught Error: Call to a member function getDataValue() on bool in .../vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:337

I've found that it's necessary to check existing of PlotLabel before using its method getDataValue().
2024-06-26 10:59:17 +04:00
Юрий Финкель acd0e386e8 Update JpGraphRendererBase.php - check existing of PlotLabel
I've got
Uncaught PHP Exception Symfony\Component\ErrorHandler\Error\FatalError: "Error: Uncaught Error: Call to a member function getDataValue() on bool in .../vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:337

I found that it's necessary to check existing of PlotLabel before using its method getDataValue().
2024-06-26 10:35:25 +04:00
oleibman d767d4618a Merge pull request #4071 from oleibman/year1904
Make Base Date a Property of Spreadsheet
2024-06-26 05:00:26 +00:00
oleibman fe162bcf0e Update CHANGELOG.md 2024-06-25 21:58:10 -07:00
oleibman f181a4c66e Merge branch 'master' into year1904 2024-06-22 22:13:42 -07:00
oleibman 43589bc9b6 Make Base Date a Property of Spreadsheet
This change is extracted from PR #2787 by @MarkBaker. That change mostly deals with array functions, and that part will be superseded by PR #3962. However, this part of 2787 is not included in 3962.

Fix #1036 (closed as stale in 2019 and just reopened). Excel spreadsheets can have either of 2 base dates, 1900 or 1904, and the numeric value of any date cells will vary depending on which base date is in use. PhpSpreadsheet has, till now, handled that as a static property of Shared/Date. This does not work well if two spreadsheets with different base dates are open simultaneously. The code is changed to store the base date as a property of the spreadsheet when an Xls/Xlsx spreadsheet is loaded, and use that property when saving an Xls/Xlsx spreadsheet. Any call to `getCalculatedValue` or `getFormattedValue` will temporarily set the Shared/Date value to that of the spreadsheet, and restore it at completion. In order to avoid a BC break, the Xls and Xlsx readers will continue to populate the Shared/Date value as before.
2024-06-22 22:09:22 -07:00
oleibman cabd60ca09 Merge pull request #4060 from oleibman/stan9d
Better Definitions for Mixed Parameters and Values Part 3 of Many
2024-06-23 04:31:16 +00:00
oleibman 275b9480a3 Merge pull request #4069 from mogic-le/yield-docs
Documentation and example for rangeToArrayYieldRows()
2024-06-17 18:21:07 +00:00
Christian Weiske 1c931e2870 Documentation and example for rangeToArrayYieldRows()
Related: https://github.com/PHPOffice/PhpSpreadsheet/pull/3906
2024-06-17 11:29:36 +02:00
oleibman 60baa3a1b6 Merge pull request #4065 from oleibman/issue4004td
More RTL Support for Xlsx/Html Comments
2024-06-11 13:27:54 +00:00
oleibman 5c3b63068e Merge branch 'master' into issue4004td 2024-06-11 06:25:38 -07:00
oleibman a3c6f8f5c6 Update CHANGELOG.md 2024-06-11 06:24:33 -07:00
oleibman b57a549fab More RTL Support for Xlsx/Html Comments
Following up from PR #4006. There is an additional RTL property available. It controls the placement of bidirectional neutral characters (mainly punctuation), as opposed to strong (alphabetic characters) or weak (numeric characters), especially at the beginning or end of a line. The new Comment property textboxDirection will be used for that purpose.

In a discussion in issue #4004 following the implementation of the PR, the comment was mixed RTL and LTR, and this led to some formatting problems. The user was able to overcome these with the timely insertion of Unicode directional control characters, but it would be preferable to have it happen automatically, which this change will permit. However, the use of these control characters cannot be entirely done away with. In the new test case, if one of the all-English lines ended with, say, a colon, it would not display correctly; LRM (left-to-right mark) after the colon would be needed. Likewise, one or two of the comment lines with mixed RTL and LTR (discussed in the issue) is not formatted correctly, and might require LRO/PDF or equivalent.
2024-06-06 16:55:27 -07:00
oleibman 1c06890c7f Merge pull request #4064 from oleibman/issue4063
Handle Empty String in SharedStrings
2024-06-06 13:41:05 +00:00
oleibman 7c1ff62ed4 Update CHANGELOG.md 2024-06-06 06:38:50 -07:00
oleibman 5e26de63a9 Handle Empty String in SharedStrings
Fix #4063. Fix #1560. Fix #1293. PhpSpreadsheet is not accounting for an empty string in Xlsx sharedStrings.xml.The code which parses it in Reader/Xlsx looks for a `t` or `r` tag descending from `si`, but, in this case, the tag is coded as `<si/>`, with neither t nor r tag descending. An else clause is added to set the string to empty string in this case.

I was surprised that this had not turned up before, and a search through the archives found at least 2 earlier reports from 4 years ago. Those had been marked stale; the stale indicator is removed, and the issues are re-opened, to be closed when this PR is merged.
2024-06-06 06:17:02 -07:00
oleibman 85c1512b67 Better Definitions for Mixed Parameters and Values Part 3 of Many
Continuing work started with PR #4016 and PR #4026. Improve documentation within program by making explicit what types of values are allowed for variables described as "mixed". In order to avoid broken functionality, this is done mainly through doc-blocks. This will get us closer to Phpstan Level 9, but many changes will be needed before we can consider that.

This change has more executable code changes than its predecessor. I will wait longer than normal before merging it to allow for additional testing.
2024-06-04 06:47:51 -07:00
oleibman fc74f00795 Merge pull request #4059 from oleibman/run83
Run Tools Using Php8.3
2024-06-04 13:37:15 +00:00
oleibman 133e4fdab9 Scrutinizer Failed Building Php8.3 - Try 8.2 2024-06-03 08:04:46 -07:00
oleibman 68713ecabb Run Tools Using Php8.3
Php8.1 is approaching EOL. Change our tools to run under 8.3 instead. I do not anticipate any difficulty for phpstan, php-cs-fixer, phpcs, phpdoc-types, versions, or coverage. PhpDocumetor needs to run with an updated phar, and I'm not sure whether it will be run until a release happens. No idea how Scrutinizer will handle the change; I'll just have to try it and see.
2024-06-03 07:42:28 -07:00
oleibman 318a82e0f9 Merge pull request #4057 from oleibman/unitstan
Phpunit 10 and Phpstan 1.11
2024-06-03 13:28:08 +00:00
oleibman 192d4a3dd5 Resolve Phpstan missingType.generics
Doc-block changes only; no change to executable code.
2024-06-02 14:40:07 -07:00
oleibman 6be8be8c1b Update Phpunit Command in main.yml 2024-06-01 17:50:22 -07:00
oleibman 9b239ebdb0 Phpunit 10 and Phpstan 1.11
Dependabot suggested some changes this month which required an unusual effort to implement successfully. With the elimination of Php 8.0 as a supported environment, it became possible to use Phpunit 10 rather than 9. Among other considerations, the configuration file for Phpunit is changed. I preserved the Phpunit 9 version under a different name. Aside from the configuration change, several other changes needed to be made to accommodate the change:
- Fix #3993. A peculiar problem indeed. One of the reporters said it had something to do with mocking, but I couldn't duplicate it. But Phpunit 10 revealed the problem in one test (Reader/Xlsx/AutoFilterTest), and that was sufficient for me to apply the trivial source code change to Worksheet/Worksheet.
- Some extra stringency on data providers required extra work in Calculation/CalculationFunctionListTest.
- There was a misplaced label in Calculation/ParseFormulaTest. Likewise in the data member CellGetRangeBoundaries.
- More stringency required changes to data members Shared/Trend/ExponentialBestFit and Shared/Trend/LinearBestFit.
- Issue3982Test testLoadAllRows seemed to go into a memory-acquiring loop in 10 that was not evident in 9. This particular test uses a lot of memory by design, but was included only to establish a base level for the other tests in that member. I feel it is acceptable to skip it for 10.

Phpstan errors with a new release are not unusual. One of the problems this time around was, however, unusual - it is fixed when Phpstan runs under Php8.3, but not for earlier Php releases. Our tools currently use Php 8.1. It is on my to-do list to get Phpstan and other test tools running under 8.3 before 8.1 goes EOL. There are also some configuration file changes needed for Phpstan.

Php-cs-fixer has been taking an increasingly long time to run. They've added an experimental option to permit it to run its checks in parallel. I've changed its configuration to use that option.
2024-06-01 17:39:39 -07:00
oleibman 101f90310f Merge pull request #4054 from PHPOffice/dependabot/composer/dompdf/dompdf-3.0.0
Bump dompdf/dompdf from 2.0.8 to 3.0.0
2024-06-01 13:29:14 +00:00
oleibman 5c8f95cdd4 Merge pull request #4052 from PHPOffice/dependabot/composer/squizlabs/php_codesniffer-3.10.1
Bump squizlabs/php_codesniffer from 3.9.2 to 3.10.1
2024-06-01 13:28:37 +00:00
oleibman 8a22155e09 Merge pull request #4051 from PHPOffice/dependabot/composer/friendsofphp/php-cs-fixer-3.58.1
Bump friendsofphp/php-cs-fixer from 3.56.1 to 3.58.1
2024-06-01 13:28:22 +00:00
dependabot[bot] caa148ade8 Bump dompdf/dompdf from 2.0.8 to 3.0.0
Bumps [dompdf/dompdf](https://github.com/dompdf/dompdf) from 2.0.8 to 3.0.0.
- [Release notes](https://github.com/dompdf/dompdf/releases)
- [Commits](https://github.com/dompdf/dompdf/compare/v2.0.8...v3.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-01 11:10:05 +00:00
dependabot[bot] 5db40920cc Bump squizlabs/php_codesniffer from 3.9.2 to 3.10.1
Bumps [squizlabs/php_codesniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer) from 3.9.2 to 3.10.1.
- [Release notes](https://github.com/PHPCSStandards/PHP_CodeSniffer/releases)
- [Changelog](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/PHPCSStandards/PHP_CodeSniffer/compare/3.9.2...3.10.1)

---
updated-dependencies:
- dependency-name: squizlabs/php_codesniffer
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-01 11:09:56 +00:00
dependabot[bot] 2914239d9c Bump friendsofphp/php-cs-fixer from 3.56.1 to 3.58.1
Bumps [friendsofphp/php-cs-fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) from 3.56.1 to 3.58.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.56.1...v3.58.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-01 11:09:52 +00:00
oleibman 3360608cdd Merge pull request #4042 from oleibman/issue4039
Conditional Range Unions and Intersections
2024-06-01 01:07:59 +00:00
oleibman a6000b63e5 Update CHANGELOG.md 2024-05-31 18:04:55 -07:00
oleibman 1852923c62 Merge pull request #4050 from oleibman/issue4049
Conditional Color Scale Improvements
2024-05-31 15:53:34 +00:00
oleibman 15fb1b542a Merge branch 'master' into issue4049 2024-05-31 08:50:17 -07:00
oleibman 24e6f4d837 Update CHANGELOG.md 2024-05-31 08:48:34 -07:00
oleibman 626b08fcd3 Merge pull request #4026 from oleibman/stan9c
Better Definitions for Mixed Parameters and Values Part 2 of Many
2024-05-31 04:04:05 +00:00
oleibman d539dfa2d5 Merge pull request #4047 from oleibman/issue3557
Writer Mpdf and Tcpdf Borders on Merged Cells
2024-05-30 17:14:48 +00:00