Skip to content

Commit 1f5c308

Browse files
authored
Merge branch 'master' into pr1449
2 parents 9d794e0 + 87ddd21 commit 1f5c308

Some content is hidden

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

64 files changed

+1980
-476
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
run: composer install --no-progress --prefer-dist --optimize-autoloader
174174

175175
- name: Code Version Compatibility check with PHP_CodeSniffer
176-
run: ./vendor/bin/phpcs -q --report-width=200 --report=summary,full src/ --standard=PHPCompatibility --runtime-set testVersion 8.1-
176+
run: ./vendor/bin/phpcs -q --report-width=200 --report=summary,full src/ --standard=PHPCompatibility --runtime-set testVersion 8.1- --exclude=PHPCompatibility.Variables.ForbiddenThisUseContexts
177177

178178
phpstan:
179179
runs-on: ubuntu-latest

CHANGELOG.md

Lines changed: 17 additions & 3 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.0.0
8+
## 2024-09-29 - 3.0.0
99

1010
### Dynamic Arrays
1111

@@ -14,22 +14,36 @@ and this project adheres to [Semantic Versioning](https://semver.org).
1414
### Added
1515

1616
- Excel Dynamic Arrays. [Issue #3901](https://github.com/PHPOffice/PhpSpreadsheet/issues/3901) [Issue #3659](https://github.com/PHPOffice/PhpSpreadsheet/issues/3659) [Issue #1834](https://github.com/PHPOffice/PhpSpreadsheet/issues/1834) [PR #3962](https://github.com/PHPOffice/PhpSpreadsheet/pull/3962)
17+
- String Value Binder Allow Setting "Ignore Number Stored as Text". [PR #4141](https://github.com/PHPOffice/PhpSpreadsheet/pull/4141)
1718

1819
### Changed
1920

20-
- Nothing yet.
21+
- Xlsx Reader default datatype when none is specified in Xml is changed from string to numeric, which is how Excel treats it. There is expected to be little impact because DefaultValueBinder and AdvancedValueBinder correct mis-identification as string, and StringValueBinder usually expects string. [PR #4139](https://github.com/PHPOffice/PhpSpreadsheet/pull/4139)
22+
- Currency and Accounting Wizards are changed to act like Excel, and a new CurrencyBase Wizard is added for for non-Excel formats. [Issue #4125](https://github.com/PHPOffice/PhpSpreadsheet/issues/4125) [Issue #4124](https://github.com/PHPOffice/PhpSpreadsheet/issues/4124) [PR #4127](https://github.com/PHPOffice/PhpSpreadsheet/pull/4127)
23+
- Images will not be added to spreadsheet if they cannot be validated as images.
2124

2225
### Deprecated
2326

2427
- Nothing yet.
2528

29+
### Removed
30+
31+
- The following items were deprecated in release 2 and are now removed.
32+
- Writer\Xls\Style\ColorMap (no longer needed).
33+
- Reader\Xml::trySimpleXMLLoadString (should not have been public, no public replacement).
34+
- Calculation\Calculation::_translateFormulaToLocale (use method name translateFormulaToLocale without leading underscore).
35+
- Calculation\Calculation::_translateFormulaToEnglish (use method name translateFormulaToEnglish without leading underscore).
36+
2637
### Moved
2738

2839
- Nothing yet.
2940

3041
### Fixed
3142

32-
- Nothing yet.
43+
- Several security patches.
44+
- Xls Reader Some Ranges Not Handled Properly. [Issue #1570](https://github.com/PHPOffice/PhpSpreadsheet/issues/1570) [PR #4140](https://github.com/PHPOffice/PhpSpreadsheet/pull/4140)
45+
- Better Handling of legacyDrawing Xml. [Issue #4105](https://github.com/PHPOffice/PhpSpreadsheet/issues/4105) [PR #4122](https://github.com/PHPOffice/PhpSpreadsheet/pull/4122)
46+
- Improve Xlsx Reader Speed. [Issue #3917](https://github.com/PHPOffice/PhpSpreadsheet/issues/3917) [PR #4153](https://github.com/PHPOffice/PhpSpreadsheet/pull/4153)
3347

3448
## 2024-08-07 - 2.2.2
3549

composer.lock

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

docs/topics/accessing-cells.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ By default, the StringValueBinder will cast any datatype passed to it into a str
551551
// Set value binder
552552
$stringValueBinder = new \PhpOffice\PhpSpreadsheet\Cell\StringValueBinder();
553553
$stringValueBinder->setNumericConversion(false)
554+
->setSetIgnoredErrors(true) // suppresses "number stored as text" indicators
554555
->setBooleanConversion(false)
555556
->setNullConversion(false)
556557
->setFormulaConversion(false);

docs/topics/conditional-formatting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ The Wizards know which operator types match up with condition types, and provide
7171

7272
---
7373

74-
Note that `$conditionalStyles` is an array: it is possible to apply several conditions to the same range of cells. If we also wanted to highlight values that were less than 10 in the the A1:A10 range, we can add a second style rule.
74+
Note that `$conditionalStyles` is an array: it is possible to apply several conditions to the same range of cells. If we also wanted to highlight values that were less than 10 in the A1:A10 range, we can add a second style rule.
7575

7676
In Excel, we would do this by selecting the range again, and going through the same process, this time selecting the "Highlight Cells Rules", then "Less Than" from the "Conditional Styles" menu, entering the value "10" in the prompt box, and selecting the appropriate style.
7777

docs/topics/defined-names.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ Even though `CHARGE_RATE` references a cell on a different worksheet, because is
263263

264264
However, a Named Range can be locally scoped so that it is only available when referenced from a specific worksheet, or it can be globally scoped. This means that you can use the same Named Range name with different values on different worksheets.
265265

266-
Building further on our timesheet, perhaps we use a different worksheet for each client, and we use the same hourly rate when billing most of our clients; but for one particular client (perhaps doing work for a a friend) we use a lower rate.
266+
Building further on our timesheet, perhaps we use a different worksheet for each client, and we use the same hourly rate when billing most of our clients; but for one particular client (perhaps doing work for a friend) we use a lower rate.
267267

268268
```php
269269
$clients = [

samples/Basic4/45_Quadratic_equation_solver.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515
?>
1616
<form action="45_Quadratic_equation_solver.php" method="POST">
17-
Enter the coefficients for the Ax<sup>2</sup> + Bx + C = 0
17+
Enter the coefficients for Ax<sup>2</sup> + Bx + C = 0
1818
<table border="0" cellpadding="0" cellspacing="0">
1919
<tr>
2020
<td>
@@ -47,7 +47,9 @@
4747
<?php
4848
/** If the user has submitted the form, then we need to execute a calculation * */
4949
if (isset($_POST['submit'])) {
50-
if ($_POST['A'] == 0) {
50+
if (!is_numeric($_POST['A']) || !is_numeric($_POST['B']) || !is_numeric($_POST['C'])) { // validate input
51+
$helper->log('Non-numeric input');
52+
} elseif ($_POST['A'] == 0) {
5153
$helper->log('The equation is not quadratic');
5254
} else {
5355
// Calculate and Display the results

0 commit comments

Comments
 (0)