Skip to content

Commit 85d5fd9

Browse files
authored
Merge branch 'master' into issue4105
2 parents 8506854 + f7c183b commit 85d5fd9

File tree

153 files changed

+4108
-458
lines changed

Some content is hidden

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

153 files changed

+4108
-458
lines changed

.php-cs-fixer.dist.php

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
$config
1111
->setRiskyAllowed(true)
1212
->setFinder($finder)
13-
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect())
13+
->setParallelConfig(PhpCsFixer\Runner\Parallel\ParallelConfigFactory::detect(null, 600))
1414
->setCacheFile(sys_get_temp_dir() . '/php-cs-fixer' . preg_replace('~\W~', '-', __DIR__))
1515
->setRules([
1616
'align_multiline_comment' => true,
@@ -19,18 +19,17 @@
1919
'backtick_to_shell_exec' => true,
2020
'binary_operator_spaces' => true,
2121
'blank_line_after_namespace' => true,
22+
'blank_lines_before_namespace' => ['max_line_breaks' => 2, 'min_line_breaks' => 2], // we want 1 blank line before namespace
2223
'blank_line_after_opening_tag' => true,
2324
'blank_line_before_statement' => true,
24-
'braces' => true,
2525
'cast_spaces' => true,
2626
'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'one']], // const are often grouped with other related const
2727
'class_definition' => false, // phpcs disagree
28-
'class_keyword_remove' => false, // Deprecated, and ::class keyword gives us better support in IDE
2928
'combine_consecutive_issets' => true,
3029
'combine_consecutive_unsets' => true,
3130
'combine_nested_dirname' => true,
3231
'comment_to_phpdoc' => false, // interferes with annotations
33-
'compact_nullable_typehint' => true,
32+
'compact_nullable_type_declaration' => true,
3433
'concat_space' => ['spacing' => 'one'],
3534
'constant_case' => true,
3635
'date_time_immutable' => false, // Break our unit tests
@@ -47,7 +46,6 @@
4746
'encoding' => true,
4847
'ereg_to_preg' => true,
4948
'error_suppression' => false, // it breaks \PhpOffice\PhpSpreadsheet\Helper\Handler
50-
'escape_implicit_backslashes' => true,
5149
'explicit_indirect_variable' => false, // I feel it makes the code actually harder to read
5250
'explicit_string_variable' => false, // I feel it makes the code actually harder to read
5351
'final_class' => false, // We need non-final classes
@@ -59,7 +57,6 @@
5957
'fully_qualified_strict_types' => true,
6058
'function_declaration' => true,
6159
'function_to_constant' => true,
62-
'function_typehint_space' => true,
6360
'general_phpdoc_annotation_remove' => ['annotations' => ['access', 'category', 'copyright']],
6461
'general_phpdoc_tag_rename' => true,
6562
'global_namespace_import' => true,
@@ -93,15 +90,13 @@
9390
'native_constant_invocation' => false, // Micro optimization that look messy
9491
'native_function_casing' => true,
9592
'native_function_invocation' => false, // I suppose this would be best, but I am still unconvinced about the visual aspect of it
96-
'native_function_type_declaration_casing' => true,
97-
'new_with_braces' => true,
93+
'new_with_parentheses' => ['anonymous_class' => true, 'named_class' => true],
9894
'no_alias_functions' => true,
9995
'no_alias_language_construct_call' => true,
10096
'no_alternative_syntax' => true,
10197
'no_binary_string' => true,
10298
'no_blank_lines_after_class_opening' => true,
10399
'no_blank_lines_after_phpdoc' => true,
104-
'no_blank_lines_before_namespace' => false, // we want 1 blank line before namespace
105100
'no_break_comment' => true,
106101
'no_closing_tag' => true,
107102
'no_empty_comment' => true,
@@ -121,16 +116,14 @@
121116
'no_space_around_double_colon' => true,
122117
'no_spaces_after_function_name' => true,
123118
'no_spaces_around_offset' => true,
124-
'no_spaces_inside_parenthesis' => true,
125119
'no_superfluous_elseif' => false, // Might be risky on a huge code base
126120
'no_superfluous_phpdoc_tags' => ['allow_mixed' => true],
127-
'no_trailing_comma_in_list_call' => true,
128-
'no_trailing_comma_in_singleline_array' => true,
121+
'no_trailing_comma_in_singleline' => ['elements' => ['arguments', 'array_destructuring', 'array', 'group_import']],
129122
'no_trailing_whitespace' => true,
130123
'no_trailing_whitespace_in_comment' => true,
131124
'no_trailing_whitespace_in_string' => false, // Too dangerous
132125
'no_unneeded_control_parentheses' => true,
133-
'no_unneeded_curly_braces' => true,
126+
'no_unneeded_braces' => true,
134127
'no_unneeded_final_method' => true,
135128
'no_unreachable_default_argument_value' => true,
136129
'no_unset_cast' => true,
@@ -175,7 +168,6 @@
175168
'phpdoc_align' => false, // Waste of time
176169
'phpdoc_annotation_without_dot' => true,
177170
'phpdoc_indent' => true,
178-
//'phpdoc_inline_tag' => true,
179171
'phpdoc_line_span' => false, // Unfortunately our old comments turn even uglier with this
180172
'phpdoc_no_access' => true,
181173
'phpdoc_no_alias_tag' => true,
@@ -215,20 +207,20 @@
215207
'simplified_if_return' => false, // Even if technically correct we prefer to be explicit
216208
'simplified_null_return' => false, // Even if technically correct we prefer to be explicit
217209
'single_blank_line_at_eof' => true,
218-
'single_blank_line_before_namespace' => true,
219210
'single_class_element_per_statement' => true,
220211
'single_import_per_statement' => true,
221212
'single_line_after_imports' => true,
222213
'single_line_comment_style' => true,
223214
'single_line_throw' => false, // I don't see any reason for having a special case for Exception
224215
'single_quote' => true,
225-
'single_space_after_construct' => true,
226216
'single_trait_insert_per_statement' => true,
227217
'space_after_semicolon' => true,
218+
'spaces_inside_parentheses' => ['space' => 'none'],
228219
'standardize_increment' => true,
229220
'standardize_not_equals' => true,
230221
'static_lambda' => false, // Risky if we can't guarantee nobody use `bindTo()`
231222
'strict_comparison' => false, // No, too dangerous to change that
223+
'string_implicit_backslashes' => false, // was escape_implicit_backslashes, too confusing
232224
'strict_param' => false, // No, too dangerous to change that
233225
'string_length_to_empty' => true,
234226
'string_line_ending' => true,
@@ -240,6 +232,7 @@
240232
'ternary_to_null_coalescing' => true,
241233
'trailing_comma_in_multiline' => true,
242234
'trim_array_spaces' => true,
235+
'type_declaration_spaces' => ['elements' => ['function', 'property']], // was function_typehint_space
243236
'types_spaces' => true,
244237
'unary_operator_spaces' => true,
245238
'use_arrow_functions' => true,

CHANGELOG.md

Lines changed: 48 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,25 +7,68 @@ and this project adheres to [Semantic Versioning](https://semver.org).
77

88
## TBD - 3.0.0
99

10+
### Dynamic Arrays
11+
12+
- Support for Excel dynamic arrays is added. It is an opt-in feature, so our hope is that there will be no BC breaks, but it is a very large change. Full support is added for Xlsx. It is emulated as Ctrl-Shift-Enter arrays for Ods read and write and Excel2003 and Gnumeric read. Html/Pdf and Csv writers will populate cells on output if they are the result of array formulas. No support is added for Xls or Slk.
13+
1014
### Added
1115

12-
- Nothing
16+
- 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)
1317

1418
### Changed
1519

16-
- Nothing
20+
- Nothing yet.
1721

1822
### Deprecated
1923

20-
- Nothing
24+
- Nothing yet.
2125

2226
### Moved
2327

24-
- Nothing
28+
- Nothing yet.
2529

2630
### Fixed
2731

28-
- Nothing
32+
- Nothing yet.
33+
34+
## 2024-08-07 - 2.2.2
35+
36+
### Added
37+
38+
- Nothing yet.
39+
40+
### Changed
41+
42+
- Nothing yet.
43+
44+
### Deprecated
45+
46+
- Nothing yet.
47+
48+
### Moved
49+
50+
- Nothing yet.
51+
52+
### Fixed
53+
54+
- Html Reader Preserve Unicode Whitespace. [Issue #1284](https://github.com/PHPOffice/PhpSpreadsheet/issues/1284) [PR #4106](https://github.com/PHPOffice/PhpSpreadsheet/pull/4106)
55+
- RATE Function Floating Point Number of Periods. [PR #4107](https://github.com/PHPOffice/PhpSpreadsheet/pull/4107)
56+
- Parameter Name Change Xlsx Writer Workbook. [Issue #4108](https://github.com/PHPOffice/PhpSpreadsheet/issues/4108) [PR #4111](https://github.com/PHPOffice/PhpSpreadsheet/pull/4111)
57+
- New Algorithm for TRUNC, ROUNDUP, ROUNDDOWN. [Issue #4113](https://github.com/PHPOffice/PhpSpreadsheet/issues/4113) [PR #4115](https://github.com/PHPOffice/PhpSpreadsheet/pull/4115)
58+
- Worksheet applyStylesFromArray Retain Active Cell (Excel 16 was having a problem with some files). [Issue #4128](https://github.com/PHPOffice/PhpSpreadsheet/issues/4128) [PR #4132](https://github.com/PHPOffice/PhpSpreadsheet/pull/4132)
59+
60+
## 2024-07-29 - 2.2.1
61+
62+
### Security Fix
63+
64+
- Prevent XXE when loading files [PR #4119](https://github.com/PHPOffice/PhpSpreadsheet/pull/4119)
65+
66+
### Fixed
67+
68+
- Add Sheet may leave Active Sheet uninitialized. [Issue #4112](https://github.com/PHPOffice/PhpSpreadsheet/issues/4112) [PR #4114](https://github.com/PHPOffice/PhpSpreadsheet/pull/4114)
69+
- Reference to Defined Name Specifying Worksheet. [Issue #206](https://github.com/PHPOffice/PhpSpreadsheet/issues/296) [PR #4096](https://github.com/PHPOffice/PhpSpreadsheet/pull/4096)
70+
- Xls Reader Print/Show Gridlines. [Issue #912](https://github.com/PHPOffice/PhpSpreadsheet/issues/912) [PR #4098](https://github.com/PHPOffice/PhpSpreadsheet/pull/4098)
71+
- ODS Reader Allow Omission of Page Settings Tags. [Issue #4099](https://github.com/PHPOffice/PhpSpreadsheet/issues/4099) [PR #4101](https://github.com/PHPOffice/PhpSpreadsheet/pull/4101)
2972

3073
## 2024-07-24 - 2.2.0
3174

0 commit comments

Comments
 (0)