Skip to content

Commit 15f6dd7

Browse files
authored
Merge branch 'master' into sergiy-petrov-patch-4
2 parents 79d56b7 + dbc2e24 commit 15f6dd7

File tree

114 files changed

+7740
-6501
lines changed

Some content is hidden

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

114 files changed

+7740
-6501
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ jobs:
211211
runs-on: ubuntu-latest
212212
steps:
213213
- name: Checkout
214-
uses: actions/checkout@v3
214+
uses: actions/checkout@v4
215215
with:
216216
fetch-depth: 0
217217

CHANGELOG.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com)
66
and this project adheres to [Semantic Versioning](https://semver.org).
77

8-
## TBD - 3.4.0
8+
## TBD - 3.5.0
99

1010
### Added
1111

@@ -15,17 +15,57 @@ and this project adheres to [Semantic Versioning](https://semver.org).
1515

1616
- Nothing yet.
1717

18+
### Moved
19+
20+
- Nothing yet.
21+
1822
### Deprecated
1923

2024
- Nothing yet.
2125

26+
### Fixed
27+
28+
- Add support for `<s>` tag when converting HTML to RichText. [Issue #4223](https://github.com/PHPOffice/PhpSpreadsheet/issues/4223) [PR #4224](https://github.com/PHPOffice/PhpSpreadsheet/pull/4224)
29+
30+
## 2024-11-10 - 3.4.0
31+
32+
### Security Fix
33+
34+
- Several security patches.
35+
36+
### Added
37+
38+
- Add Dynamic valueBinder Property to Spreadsheet and Readers. [Issue #1395](https://github.com/PHPOffice/PhpSpreadsheet/issues/1395) [PR #4185](https://github.com/PHPOffice/PhpSpreadsheet/pull/4185)
39+
- Allow Omitting Chart Border. [Issue #562](https://github.com/PHPOffice/PhpSpreadsheet/issues/562) [PR #4188](https://github.com/PHPOffice/PhpSpreadsheet/pull/4188)
40+
- Method to Test Whether Csv Will Be Affected by Php9. [PR #4189](https://github.com/PHPOffice/PhpSpreadsheet/pull/4189)
41+
42+
### Changed
43+
44+
- Refactor Xls Reader. [PR #4118](https://github.com/PHPOffice/PhpSpreadsheet/pull/4118)
45+
46+
### Deprecated
47+
48+
- IReader::SKIP_EMPTY_CELLS - use its alias IGNORE_EMPTY_CELLS instead.
49+
- Worksheet::getProtectedCells was deprecated in release 2, but was not properly documented, and not removed in release 3. Use getProtectedCellRanges instead.
50+
- Writer/Html::isMpdf property was deprecated in release 2, but was not properly documented, and not removed in release 3. Use instanceof Mpdf instead.
51+
2252
### Moved
2353

2454
- Nothing yet.
2555

2656
### Fixed
2757

28-
- Nothing yet.
58+
- Xls Writer Condtional Rules Applied to Whole Rows or Columns. [Issue #3185](https://github.com/PHPOffice/PhpSpreadsheet/issues/3185) [PR #4152](https://github.com/PHPOffice/PhpSpreadsheet/pull/4152)
59+
- Xlsx Writer Duplicate ContentTypes Entry for Background Image. [Issue #4179](https://github.com/PHPOffice/PhpSpreadsheet/issues/4179) [PR #4180](https://github.com/PHPOffice/PhpSpreadsheet/pull/4180)
60+
- Check strictNullComparison outside of loops. [PR #3347](https://github.com/PHPOffice/PhpSpreadsheet/pull/3347)
61+
- SUMIFS Does Not Require xlfn. [Issue #4182](https://github.com/PHPOffice/PhpSpreadsheet/issues/4182) [PR #4186](https://github.com/PHPOffice/PhpSpreadsheet/pull/4186)
62+
- Image Transparency/Opacity with Html Reader Changes. [Discussion #4117](https://github.com/PHPOffice/PhpSpreadsheet/discussions/4117) [PR #4142](https://github.com/PHPOffice/PhpSpreadsheet/pull/4142)
63+
- Option to Write Hyperlink Rather Than Label to Csv. [Issue #1412](https://github.com/PHPOffice/PhpSpreadsheet/issues/1412) [PR #4151](https://github.com/PHPOffice/PhpSpreadsheet/pull/4151)
64+
- Invalid Html Due to Cached Filesize. [Issue #1107](https://github.com/PHPOffice/PhpSpreadsheet/issues/1107) [PR #4184](https://github.com/PHPOffice/PhpSpreadsheet/pull/4184)
65+
- Excel 2003 Allows Html Entities. [Issue #2157](https://github.com/PHPOffice/PhpSpreadsheet/issues/2157) [PR #4187](https://github.com/PHPOffice/PhpSpreadsheet/pull/4187)
66+
- Changes to ROUNDDOWN/ROUNDUP/TRUNC. [Issue #4213](https://github.com/PHPOffice/PhpSpreadsheet/issues/4213) [PR #4214](https://github.com/PHPOffice/PhpSpreadsheet/pull/4214)
67+
- Writer Xlsx ignoredErrors Before Drawings. [Issue #4200](https://github.com/PHPOffice/PhpSpreadsheet/issues/4200) [Issue #4145](https://github.com/PHPOffice/PhpSpreadsheet/issues/4145) [PR #4212](https://github.com/PHPOffice/PhpSpreadsheet/pull/4212)
68+
- Allow ANCHORARRAY as Data Validation list. [Issue #4197](https://github.com/PHPOffice/PhpSpreadsheet/issues/4197) [PR #4203](https://github.com/PHPOffice/PhpSpreadsheet/pull/4203)
2969

3070
## 2024-09-29 - 3.3.0 (no 3.0.\*, 3.1.\*, 3.2.\*)
3171

CONTRIBUTING.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ If you would like to contribute, here are some notes and guidelines:
44

55
- All new development should be on feature/fix branches, which are then merged to the `master` branch once stable and approved; so the `master` branch is always the most up-to-date, working code
66
- If you are going to submit a pull request, please fork from `master`, and submit your pull request back as a fix/feature branch referencing the GitHub issue number
7+
- Install (development) dependencies by running `composer install` inside your PhpSpreadsheet clone.
78
- The code must work with all PHP versions that we support.
89
- You can call `composer versions` to test version compatibility.
910
- Code style should be maintained.
10-
- `composer style` will identify any issues with Coding Style`.
11+
- `composer style` will identify any issues with Coding Style.
1112
- `composer fix` will fix most issues with Coding Style.
1213
- All code changes must be validated by `composer check`.
1314
- Please include Unit Tests to verify that a bug exists, and that this PR fixes it.
@@ -39,7 +40,10 @@ This makes it easier to see exactly what is being tested when reviewing the PR.
3940
2. Tag subject must be the version number, eg: `1.2.3`
4041
3. Tag body must be a copy-paste of the changelog entries.
4142
3. Push the tag with `git push --tags`, GitHub Actions will create a GitHub release automatically, and the release details will automatically be sent to packagist.
42-
4. Github seems to remove markdown headings in the Release Notes, so you should edit to restore these.
43+
4. By default, Github remove markdown headings in the Release Notes. You can either edit to restore these, or, probably preferably, change the default comment character on your system - `git config core.commentChar ';'`.
4344

44-
> **Note:** Tagged releases are made from the `master` branch. Only in an emergency should a tagged release be made from the `release` branch. (i.e. cherry-picked hot-fixes.)
45+
> **Note:** Tagged releases are made from the `master` branch. Only in an emergency should a tagged release be made from the `release` branch. (i.e. cherry-picked hot-fixes.) However, there are 3 branches which have been updated to apply security patches, and those may be tagged if future security updates are needed.
46+
- release1291
47+
- release210
48+
- release222
4549

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@
4545
],
4646
"scripts": {
4747
"check": [
48-
"./bin/check-phpdoc-types",
48+
"php ./bin/check-phpdoc-types",
4949
"phpcs samples/ src/ tests/ --report=checkstyle",
50-
"phpcs samples/ src/ tests/ --standard=PHPCompatibility --runtime-set testVersion 8.0- -n",
50+
"phpcs samples/ src/ tests/ --standard=PHPCompatibility --runtime-set testVersion 8.0- --exclude=PHPCompatibility.Variables.ForbiddenThisUseContexts -n",
5151
"php-cs-fixer fix --ansi --dry-run --diff",
52-
"phpunit --color=always",
53-
"phpstan analyse --ansi --memory-limit=2048M"
52+
"phpstan analyse --ansi --memory-limit=2048M",
53+
"phpunit --color=always"
5454
],
5555
"style": [
5656
"phpcs samples/ src/ tests/ --report=checkstyle",
@@ -61,7 +61,7 @@
6161
"php-cs-fixer fix"
6262
],
6363
"versions": [
64-
"phpcs samples/ src/ tests/ --standard=PHPCompatibility --runtime-set testVersion 8.0- -n"
64+
"phpcs samples/ src/ tests/ --standard=PHPCompatibility --runtime-set testVersion 8.0- --exclude=PHPCompatibility.Variables.ForbiddenThisUseContexts -n"
6565
]
6666
},
6767
"require": {

composer.lock

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

docs/topics/Behind the Mask.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,10 @@ If you wish to emulate the MS Excel behaviour, and automatically convert string
117117

118118
You can do this by changing the Value Binder, which will then apply every time you set a Cell value.
119119
```php
120+
// Old method using static property
120121
Cell::setValueBinder(new AdvancedValueBinder());
122+
// Preferred method using dynamic property since 3.4.0
123+
$spreadsheet->setValueBinder(new AdvancedValueBinder());
121124

122125
// Set Cell C21 using a formatted string value
123126
$worksheet->getCell('C20')->setValue('€ -12345.6789');

docs/topics/The Dating Game.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,10 @@ $spreadsheet = new Spreadsheet();
257257
$worksheet = $spreadsheet->getActiveSheet();
258258
// Use the Advanced Value Binder so that our string date/time values will be automatically converted
259259
// to Excel serialized date/timestamps
260+
// Old method using static property
260261
Cell::setValueBinder(new AdvancedValueBinder());
262+
// Preferred method using dynamic property since 3.4.0
263+
$spreadsheet->setValueBinder(new AdvancedValueBinder());
261264

262265
// Write our data to the worksheet
263266
$worksheet->fromArray($projectHeading);

docs/topics/accessing-cells.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -518,15 +518,15 @@ style information. The following example demonstrates how to set the
518518
value binder in PhpSpreadsheet:
519519

520520
```php
521-
/** PhpSpreadsheet */
522-
require_once 'src/Boostrap.php';
523-
524-
// Set value binder
521+
// Older method using static property
525522
\PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
526-
527523
// Create new Spreadsheet object
528524
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
529525

526+
// Preferred method using dynamic property since 3.4.0
527+
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
528+
$spreadsheet->setValueBinder( new \PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder() );
529+
530530
// ...
531531
// Add some data, resembling some different data types
532532
$spreadsheet->getActiveSheet()->setCellValue('A4', 'Percentage value:');
@@ -555,13 +555,20 @@ $stringValueBinder->setNumericConversion(false)
555555
->setBooleanConversion(false)
556556
->setNullConversion(false)
557557
->setFormulaConversion(false);
558+
// Older method using static property
558559
\PhpOffice\PhpSpreadsheet\Cell\Cell::setValueBinder( $stringValueBinder );
560+
// Preferred method using dynamic property since 3.4.0
561+
$spreadsheet = new \PhpOffice\PhpSpreadsheet\Spreadsheet();
562+
$spreadsheet->setValueBinder( $stringValueBinder );
559563
```
560564

561565
You can override the current binder when setting individual cell values by specifying a different Binder to use in the Cell's `setValue()` or the Worksheet's `setCellValue()` methods.
562566
```php
563567
$spreadsheet = new Spreadsheet();
568+
// Old method using static property
564569
Cell::setValueBinder(new AdvancedValueBinder());
570+
// Preferred method using dynamic property since 3.4.0
571+
$spreadsheet->setValueBinder(new AdvancedValueBinder());
565572

566573
$value = '12.5%';
567574

0 commit comments

Comments
 (0)