Skip to content

Commit a26a58d

Browse files
committed
Merge branch 'master' into 2.0-Development
# Conflicts: # phpstan-baseline.neon # src/PhpSpreadsheet/Cell/Cell.php
2 parents a002288 + d7da206 commit a26a58d

Some content is hidden

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

52 files changed

+2334
-1137
lines changed

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,23 @@ and this project adheres to [Semantic Versioning](https://semver.org).
1010
### Added
1111

1212
- Implementation of the new `TEXTBEFORE()`, `TEXTAFTER()` and `TEXTSPLIT()` Excel Functions
13+
- Implementation of the `ARRAYTOTEXT()` Excel Function
14+
- Support for [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) implementation of
15+
JpGraph library to render charts added.
16+
- Charts: Add Gradients, Transparency, Hidden Axes, Rounded Corners, Trendlines.
1317

1418
### Changed
1519

1620
- Nothing
1721

1822
### Deprecated
1923

20-
- Nothing
24+
- Axis getLineProperty deprecated in favor of getLineColorProperty.
25+
- Moved majorGridlines and minorGridlines from Chart to Axis. Setting either in Chart constructor or through Chart methods, or getting either using Chart methods is deprecated.
26+
- Chart::EXCEL_COLOR_TYPE_* copied from Properties to ChartColor; use in Properties is deprecated.
27+
- ChartColor::EXCEL_COLOR_TYPE_ARGB deprecated in favor of EXCEL_COLOR_TYPE_RGB ("A" component was never allowed).
28+
- Misspelled Properties::LINE_STYLE_DASH_SQUERE_DOT deprecated in favor of LINE_STYLE_DASH_SQUARE_DOT.
29+
- Clone not permitted for Spreadsheet. Spreadsheet->copy() can be used instead.
2130

2231
### Removed
2332

@@ -26,6 +35,15 @@ and this project adheres to [Semantic Versioning](https://semver.org).
2635
### Fixed
2736

2837
- Fully flatten an array [Issue #2955](https://github.com/PHPOffice/PhpSpreadsheet/issues/2955) [PR #2956](https://github.com/PHPOffice/PhpSpreadsheet/pull/2956)
38+
- cellExists() and getCell() methods should support UTF-8 named cells [Issue #2987](https://github.com/PHPOffice/PhpSpreadsheet/issues/2987) [PR #2988](https://github.com/PHPOffice/PhpSpreadsheet/pull/2988)
39+
- Spreadsheet copy fixed, clone disabled. [PR #2951](https://github.com/PHPOffice/PhpSpreadsheet/pull/2951)
40+
- Fix PDF problems with text rotation and paper size. [Issue #1747](https://github.com/PHPOffice/PhpSpreadsheet/issues/1747) [Issue #1713](https://github.com/PHPOffice/PhpSpreadsheet/issues/1713) [PR #2960](https://github.com/PHPOffice/PhpSpreadsheet/pull/2960)
41+
- Limited support for chart titles as formulas [Issue #2965](https://github.com/PHPOffice/PhpSpreadsheet/issues/2965) [Issue #749](https://github.com/PHPOffice/PhpSpreadsheet/issues/749) [PR #2971](https://github.com/PHPOffice/PhpSpreadsheet/pull/2971)
42+
- Add Gradients, Transparency, and Hidden Axes to Chart [Issue #2257](https://github.com/PHPOffice/PhpSpreadsheet/issues/2257) [Issue #2229](https://github.com/PHPOffice/PhpSpreadsheet/issues/2929) [Issue #2935](https://github.com/PHPOffice/PhpSpreadsheet/issues/2935) [PR #2950](https://github.com/PHPOffice/PhpSpreadsheet/pull/2950)
43+
- Chart Support for Rounded Corners and Trendlines [Issue #2968](https://github.com/PHPOffice/PhpSpreadsheet/issues/2968) [Issue #2815](https://github.com/PHPOffice/PhpSpreadsheet/issues/2815) [PR #2976](https://github.com/PHPOffice/PhpSpreadsheet/pull/2976)
44+
- Add setName Method for Chart [Issue #2991](https://github.com/PHPOffice/PhpSpreadsheet/issues/2991) [PR #3001](https://github.com/PHPOffice/PhpSpreadsheet/pull/3001)
45+
- Eliminate partial dependency on php-intl in StringHelper [Issue #2982](https://github.com/PHPOffice/PhpSpreadsheet/issues/2982) [PR #2994](https://github.com/PHPOffice/PhpSpreadsheet/pull/2994)
46+
- Minor changes for Pdf [Issue #2999](https://github.com/PHPOffice/PhpSpreadsheet/issues/2999) [PR #3002](https://github.com/PHPOffice/PhpSpreadsheet/pull/3002) [PR #3006](https://github.com/PHPOffice/PhpSpreadsheet/pull/3006)
2947

3048
## 1.24.1 - 2022-07-18
3149

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,18 @@ or the appropriate PDF Writer wrapper for the library that you have chosen to in
7171

7272
#### Chart Export
7373

74-
For Chart export, we support, which you will also need to install yourself
75-
- jpgraph/jpgraph
74+
For Chart export, we support following packages, which you will also need to install yourself using `composer require`
75+
- [jpgraph/jpgraph](https://packagist.org/packages/jpgraph/jpgraph) (this package was abandoned at version 4.0.
76+
You can manually download the latest version that supports PHP 8 and above from [jpgraph.net](https://jpgraph.net/))
77+
- [mitoteam/jpgraph](https://packagist.org/packages/mitoteam/jpgraph) (fork with php 8.1 support)
7678

7779
and then configure PhpSpreadsheet using:
7880
```php
79-
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
81+
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class); // to use jpgraph/jpgraph
82+
//or
83+
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class); // to use mitoteam/jpgraph
8084
```
8185

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-
8486
## Documentation
8587

8688
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).

composer.json

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,20 +81,21 @@
8181
"dealerdirect/phpcodesniffer-composer-installer": "dev-master",
8282
"dompdf/dompdf": "^1.0 || ^2.0",
8383
"friendsofphp/php-cs-fixer": "^3.2",
84-
"jpgraph/jpgraph": "^4.0",
84+
"mitoteam/jpgraph": "^10.1",
8585
"mpdf/mpdf": "8.1.1",
8686
"phpcompatibility/php-compatibility": "^9.3",
8787
"phpstan/phpstan": "^1.1",
8888
"phpstan/phpstan-phpunit": "^1.0",
8989
"phpunit/phpunit": "^8.5 || ^9.0",
9090
"squizlabs/php_codesniffer": "^3.7",
91-
"tecnickcom/tcpdf": "^6.4"
91+
"tecnickcom/tcpdf": "6.5"
9292
},
9393
"suggest": {
94+
"ext-intl": "PHP Internationalization Functions",
9495
"mpdf/mpdf": "Option for rendering PDF with PDF Writer",
95-
"dompdf/dompdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)",
96-
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer (doesn't yet support PHP8)",
97-
"jpgraph/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers"
96+
"dompdf/dompdf": "Option for rendering PDF with PDF Writer",
97+
"tecnickcom/tcpdf": "Option for rendering PDF with PDF Writer",
98+
"mitoteam/jpgraph": "Option for rendering charts, or including charts with PDF or HTML Writers"
9899
},
99100
"autoload": {
100101
"psr-4": {

composer.lock

Lines changed: 54 additions & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

phpstan-baseline.neon

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -420,11 +420,6 @@ parameters:
420420
count: 1
421421
path: src/PhpSpreadsheet/Calculation/FormulaParser.php
422422

423-
-
424-
message: "#^Strict comparison using \\=\\=\\= between string and null will always evaluate to false\\.$#"
425-
count: 1
426-
path: src/PhpSpreadsheet/Calculation/FormulaParser.php
427-
428423
-
429424
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\Functions\\:\\:ifCondition\\(\\) has no return type specified\\.$#"
430425
count: 1
@@ -2200,11 +2195,6 @@ parameters:
22002195
count: 1
22012196
path: src/PhpSpreadsheet/Shared/JAMA/LUDecomposition.php
22022197

2203-
-
2204-
message: "#^Call to function is_string\\(\\) with float\\|int will always evaluate to false\\.$#"
2205-
count: 5
2206-
path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
2207-
22082198
-
22092199
message: "#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\JAMA\\\\Matrix\\:\\:__construct\\(\\) has parameter \\$args with no type specified\\.$#"
22102200
count: 1
@@ -2285,11 +2275,6 @@ parameters:
22852275
count: 2
22862276
path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
22872277

2288-
-
2289-
message: "#^Result of && is always false\\.$#"
2290-
count: 10
2291-
path: src/PhpSpreadsheet/Shared/JAMA/Matrix.php
2292-
22932278
-
22942279
message: "#^Unreachable statement \\- code above always terminates\\.$#"
22952280
count: 19

phpstan.neon.dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ parameters:
1111
- tests/
1212
excludePaths:
1313
- src/PhpSpreadsheet/Chart/Renderer/JpGraph.php
14+
- src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php
1415
parallel:
1516
processTimeout: 300.0
1617
checkMissingIterableValueType: false

samples/Chart/32_Chart_read_write_HTML.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
require __DIR__ . '/../Header.php';
77

88
// Change these values to select the Rendering library that you wish to use
9-
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
9+
//Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
10+
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class);
1011

1112
$inputFileType = 'Xlsx';
1213
$inputFileNames = __DIR__ . '/../templates/36write*.xlsx';

samples/Chart/32_Chart_read_write_PDF.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
IOFactory::registerWriter('Pdf', \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::class);
99

1010
// Change these values to select the Rendering library that you wish to use
11-
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
11+
//Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\JpGraph::class);
12+
Settings::setChartRenderer(\PhpOffice\PhpSpreadsheet\Chart\Renderer\MtJpGraphRenderer::class);
1213

1314
$inputFileType = 'Xlsx';
1415
$inputFileNames = __DIR__ . '/../templates/36write*.xlsx';

0 commit comments

Comments
 (0)