Skip to content

Commit ae746d0

Browse files
committed
Merge branch 'master' into 2.0-Development
# Conflicts: # phpstan-baseline.neon # src/PhpSpreadsheet/Shared/StringHelper.php
2 parents fd4e256 + 99ce5c2 commit ae746d0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+1865
-582
lines changed

CHANGELOG.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,30 @@ and this project adheres to [Semantic Versioning](https://semver.org).
99

1010
### Added
1111

12+
- Nothing
13+
14+
### Changed
15+
16+
- Nothing
17+
18+
### Deprecated
19+
20+
- Nothing
21+
22+
### Removed
23+
24+
- Nothing
25+
26+
### Fixed
27+
28+
- Nothing
29+
30+
## 1.24.0 - 2022-07-09
31+
32+
Note that this will be the last 1.x branch release before the 2.x release. We will maintain both branches in parallel for a time; but users are requested to update to version 2.0 once that is fully available.
33+
34+
### Added
35+
1236
- Added `removeComment()` method for Worksheet [PR #2875](https://github.com/PHPOffice/PhpSpreadsheet/pull/2875/files)
1337
- Add point size option for scatter charts [Issue #2298](https://github.com/PHPOffice/PhpSpreadsheet/issues/2298) [PR #2801](https://github.com/PHPOffice/PhpSpreadsheet/pull/2801)
1438
- Basic support for Xlsx reading/writing Chart Sheets [PR #2830](https://github.com/PHPOffice/PhpSpreadsheet/pull/2830)
@@ -26,7 +50,8 @@ and this project adheres to [Semantic Versioning](https://semver.org).
2650

2751
### Changed
2852

29-
- Better enforcement of value modification to match specified datatype when using setValueExplicit()
53+
- Modify `rangeBoundaries()`, `rangeDimension()` and `getRangeBoundaries()` Coordinate methods to work with row/column ranges as well as with cell ranges and cells [PR #2926](https://github.com/PHPOffice/PhpSpreadsheet/pull/2926)
54+
- Better enforcement of value modification to match specified datatype when using `setValueExplicit()`
3055
- Relax validation of merge cells to allow merge for a single cell reference [Issue #2776](https://github.com/PHPOffice/PhpSpreadsheet/issues/2776)
3156
- Memory and speed improvements, particularly for the Cell Collection, and the Writers.
3257

@@ -49,7 +74,11 @@ and this project adheres to [Semantic Versioning](https://semver.org).
4974
- Time interval formatting [Issue #2768](https://github.com/PHPOffice/PhpSpreadsheet/issues/2768) [PR #2772](https://github.com/PHPOffice/PhpSpreadsheet/pull/2772)
5075
- Copy from Xls(x) to Html/Pdf loses drawings [PR #2788](https://github.com/PHPOffice/PhpSpreadsheet/pull/2788)
5176
- Html Reader converting cell containing 0 to null string [Issue #2810](https://github.com/PHPOffice/PhpSpreadsheet/issues/2810) [PR #2813](https://github.com/PHPOffice/PhpSpreadsheet/pull/2813)
52-
- Many fixes for Charts, especially, but not limited to, Scatter, Bubble, and Surface charts. [Issue #2762](https://github.com/PHPOffice/PhpSpreadsheet/issues/2762) [Issue #2299](https://github.com/PHPOffice/PhpSpreadsheet/issues/2299) [Issue #2700](https://github.com/PHPOffice/PhpSpreadsheet/issues/2700) [Issue #2817](https://github.com/PHPOffice/PhpSpreadsheet/issues/2817) [Issue #2763](https://github.com/PHPOffice/PhpSpreadsheet/issues/2763) [Issue #2219](https://github.com/PHPOffice/PhpSpreadsheet/issues/2219) [Issue #2863](https://github.com/PHPOffice/PhpSpreadsheet/issues/2863) [PR #2828](https://github.com/PHPOffice/PhpSpreadsheet/pull/2828) [PR #2841](https://github.com/PHPOffice/PhpSpreadsheet/pull/2841) [PR #2846](https://github.com/PHPOffice/PhpSpreadsheet/pull/2846) [PR #2852](https://github.com/PHPOffice/PhpSpreadsheet/pull/2852) [PR #2856](https://github.com/PHPOffice/PhpSpreadsheet/pull/2856) [PR #2865](https://github.com/PHPOffice/PhpSpreadsheet/pull/2865) [PR #2872](https://github.com/PHPOffice/PhpSpreadsheet/pull/2872) [PR #2879](https://github.com/PHPOffice/PhpSpreadsheet/pull/2879) [PR #2898](https://github.com/PHPOffice/PhpSpreadsheet/pull/2898) [PR #2906](https://github.com/PHPOffice/PhpSpreadsheet/pull/2906)
77+
- Many fixes for Charts, especially, but not limited to, Scatter, Bubble, and Surface charts. [Issue #2762](https://github.com/PHPOffice/PhpSpreadsheet/issues/2762) [Issue #2299](https://github.com/PHPOffice/PhpSpreadsheet/issues/2299) [Issue #2700](https://github.com/PHPOffice/PhpSpreadsheet/issues/2700) [Issue #2817](https://github.com/PHPOffice/PhpSpreadsheet/issues/2817) [Issue #2763](https://github.com/PHPOffice/PhpSpreadsheet/issues/2763) [Issue #2219](https://github.com/PHPOffice/PhpSpreadsheet/issues/2219) [Issue #2863](https://github.com/PHPOffice/PhpSpreadsheet/issues/2863) [PR #2828](https://github.com/PHPOffice/PhpSpreadsheet/pull/2828) [PR #2841](https://github.com/PHPOffice/PhpSpreadsheet/pull/2841) [PR #2846](https://github.com/PHPOffice/PhpSpreadsheet/pull/2846) [PR #2852](https://github.com/PHPOffice/PhpSpreadsheet/pull/2852) [PR #2856](https://github.com/PHPOffice/PhpSpreadsheet/pull/2856) [PR #2865](https://github.com/PHPOffice/PhpSpreadsheet/pull/2865) [PR #2872](https://github.com/PHPOffice/PhpSpreadsheet/pull/2872) [PR #2879](https://github.com/PHPOffice/PhpSpreadsheet/pull/2879) [PR #2898](https://github.com/PHPOffice/PhpSpreadsheet/pull/2898) [PR #2906](https://github.com/PHPOffice/PhpSpreadsheet/pull/2906) [PR #2922](https://github.com/PHPOffice/PhpSpreadsheet/pull/2922) [PR #2923](https://github.com/PHPOffice/PhpSpreadsheet/pull/2923)
78+
- Adjust both coordinates for two-cell anchors when rows/columns are added/deleted. [Issue #2908](https://github.com/PHPOffice/PhpSpreadsheet/issues/2908) [PR #2909](https://github.com/PHPOffice/PhpSpreadsheet/pull/2909)
79+
- Keep calculated string results below 32K. [PR #2921](https://github.com/PHPOffice/PhpSpreadsheet/pull/2921)
80+
- Filter out illegal Unicode char values FFFE/FFFF. [Issue #2897](https://github.com/PHPOffice/PhpSpreadsheet/issues/2897) [PR #2910](https://github.com/PHPOffice/PhpSpreadsheet/pull/2910)
81+
- Better handling of REF errors and propagation of all errors in Calculation engine. [PR #2902](https://github.com/PHPOffice/PhpSpreadsheet/pull/2902)
5382
- Calculating Engine regexp for Column/Row references when there are multiple quoted worksheet references in the formula [Issue #2874](https://github.com/PHPOffice/PhpSpreadsheet/issues/2874) [PR #2899](https://github.com/PHPOffice/PhpSpreadsheet/pull/2899)
5483

5584
## 1.23.0 - 2022-04-24

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,38 @@ to ensure that the correct dependencies are retrieved to match your deployment e
4949

5050
See [CLI vs Application run-time](https://php.watch/articles/composer-platform-check) for more details.
5151

52+
### Additional Installation Options
53+
54+
If you want to write to PDF, or to include Charts when you write to HTML or PDF, then you will need to install additional libraries:
55+
56+
#### PDF
57+
58+
For PDF Generation, you can install any of the following, and then configure PhpSpreadsheet to indicate which library you are going to use:
59+
- mpdf/mpdf
60+
- dompdf/dompdf
61+
- tecnickcom/tcpdf
62+
63+
and configure PhpSpreadsheet using:
64+
65+
```php
66+
// Dompdf, Mpdf or Tcpdf (as appropriate)
67+
$className = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Dompdf::class;
68+
IOFactory::registerWriter('Pdf', $className);
69+
```
70+
or the appropriate PDF Writer wrapper for the library that you have chosen to install.
71+
72+
#### Chart Export
73+
74+
For Chart export, we support, which you will also need to install yourself
75+
- jpgraph/jpgraph
76+
77+
and then configure PhpSpreadsheet using:
78+
```php
79+
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
80+
```
81+
82+
You can `composer/require` the github version of jpgraph, but this was abandoned at version 4.0; or manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/)
83+
5284
## Documentation
5385

5486
Read more about it, including install instructions, in the [official documentation](https://phpspreadsheet.readthedocs.io). Or check out the [API documentation](https://phpoffice.github.io/PhpSpreadsheet).

phpstan-baseline.neon

Lines changed: 17 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,23 @@ parameters:
3131
path: src/PhpSpreadsheet/Calculation/Calculation.php
3232

3333
-
34-
message: "#^Cannot use array destructuring on array\\<string\\>\\|string\\.$#"
35-
count: 6
34+
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_translateFormulaToEnglish\\(\\) has no return type specified\\.$#"
35+
count: 1
36+
path: src/PhpSpreadsheet/Calculation/Calculation.php
37+
38+
-
39+
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_translateFormulaToEnglish\\(\\) has parameter \\$formula with no type specified\\.$#"
40+
count: 1
41+
path: src/PhpSpreadsheet/Calculation/Calculation.php
42+
43+
-
44+
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_translateFormulaToLocale\\(\\) has no return type specified\\.$#"
45+
count: 1
46+
path: src/PhpSpreadsheet/Calculation/Calculation.php
47+
48+
-
49+
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Calculation\\:\\:_translateFormulaToLocale\\(\\) has parameter \\$formula with no type specified\\.$#"
50+
count: 1
3651
path: src/PhpSpreadsheet/Calculation/Calculation.php
3752

3853
-
@@ -1075,11 +1090,6 @@ parameters:
10751090
count: 2
10761091
path: src/PhpSpreadsheet/Chart/DataSeries.php
10771092

1078-
-
1079-
message: "#^Cannot use array destructuring on array\\<string\\>\\|string\\.$#"
1080-
count: 1
1081-
path: src/PhpSpreadsheet/Chart/DataSeriesValues.php
1082-
10831093
-
10841094
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Legend\\:\\:\\$layout \\(PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\) does not accept PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Layout\\|null\\.$#"
10851095
count: 1
@@ -2700,36 +2710,6 @@ parameters:
27002710
count: 1
27012711
path: src/PhpSpreadsheet/Shared/OLERead.php
27022712

2703-
-
2704-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:formatNumber\\(\\) should return string but returns array\\|string\\.$#"
2705-
count: 1
2706-
path: src/PhpSpreadsheet/Shared/StringHelper.php
2707-
2708-
-
2709-
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:sanitizeUTF8\\(\\) should return string but returns string\\|false\\.$#"
2710-
count: 1
2711-
path: src/PhpSpreadsheet/Shared/StringHelper.php
2712-
2713-
-
2714-
message: "#^Parameter \\#1 \\$string of function strlen expects string, float given\\.$#"
2715-
count: 1
2716-
path: src/PhpSpreadsheet/Shared/StringHelper.php
2717-
2718-
-
2719-
message: "#^Parameter \\#3 \\$subject of function str_replace expects array\\|string, float given\\.$#"
2720-
count: 1
2721-
path: src/PhpSpreadsheet/Shared/StringHelper.php
2722-
2723-
-
2724-
message: "#^Static property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:\\$decimalSeparator \\(string\\) in isset\\(\\) is not nullable\\.$#"
2725-
count: 1
2726-
path: src/PhpSpreadsheet/Shared/StringHelper.php
2727-
2728-
-
2729-
message: "#^Static property PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:\\$thousandsSeparator \\(string\\) in isset\\(\\) is not nullable\\.$#"
2730-
count: 1
2731-
path: src/PhpSpreadsheet/Shared/StringHelper.php
2732-
27332713
-
27342714
message: "#^Static method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\TimeZone\\:\\:validateTimeZone\\(\\) is unused\\.$#"
27352715
count: 1
@@ -3635,11 +3615,6 @@ parameters:
36353615
count: 1
36363616
path: src/PhpSpreadsheet/Writer/Html.php
36373617

3638-
-
3639-
message: "#^Ternary operator condition is always true\\.$#"
3640-
count: 1
3641-
path: src/PhpSpreadsheet/Writer/Html.php
3642-
36433618
-
36443619
message: "#^Negated boolean expression is always false\\.$#"
36453620
count: 1
@@ -3990,61 +3965,6 @@ parameters:
39903965
count: 1
39913966
path: src/PhpSpreadsheet/Writer/Xlsx.php
39923967

3993-
-
3994-
message: "#^Parameter \\#1 \\$plotSeriesValues of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeBubbles\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\|null, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\DataSeriesValues\\|false given\\.$#"
3995-
count: 1
3996-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
3997-
3998-
-
3999-
message: "#^Parameter \\#1 \\$rawTextData of method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\XMLWriter\\:\\:writeRawData\\(\\) expects array\\<string\\>\\|string\\|null, int given\\.$#"
4000-
count: 1
4001-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4002-
4003-
-
4004-
message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, float given\\.$#"
4005-
count: 6
4006-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4007-
4008-
-
4009-
message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, float\\|int given\\.$#"
4010-
count: 4
4011-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4012-
4013-
-
4014-
message: "#^Parameter \\#2 \\$value of method XMLWriter\\:\\:writeAttribute\\(\\) expects string, int given\\.$#"
4015-
count: 41
4016-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4017-
4018-
-
4019-
message: "#^Parameter \\#6 \\$yAxis of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeCategoryAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\|null given\\.$#"
4020-
count: 1
4021-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4022-
4023-
-
4024-
message: "#^Parameter \\#7 \\$xAxis of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\Axis\\|null given\\.$#"
4025-
count: 2
4026-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4027-
4028-
-
4029-
message: "#^Parameter \\#8 \\$majorGridlines of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\|null given\\.$#"
4030-
count: 2
4031-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4032-
4033-
-
4034-
message: "#^Parameter \\#9 \\$minorGridlines of method PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:writeValueAxis\\(\\) expects PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines, PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\GridLines\\|null given\\.$#"
4035-
count: 2
4036-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4037-
4038-
-
4039-
message: "#^Property PhpOffice\\\\PhpSpreadsheet\\\\Writer\\\\Xlsx\\\\Chart\\:\\:\\$calculateCellValues has no type specified\\.$#"
4040-
count: 1
4041-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4042-
4043-
-
4044-
message: "#^Strict comparison using \\=\\=\\= between PhpOffice\\\\PhpSpreadsheet\\\\Chart\\\\PlotArea and null will always evaluate to false\\.$#"
4045-
count: 1
4046-
path: src/PhpSpreadsheet/Writer/Xlsx/Chart.php
4047-
40483968
-
40493969
message: "#^Parameter \\#1 \\$string of function substr expects string, int given\\.$#"
40503970
count: 1

0 commit comments

Comments
 (0)