Skip to content

Commit caf12eb

Browse files
authored
Merge branch 'master' into pr1449
2 parents 8abd795 + 2661adf commit caf12eb

File tree

177 files changed

+1985
-886
lines changed

Some content is hidden

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

177 files changed

+1985
-886
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ jobs:
221221
with:
222222
fetch-depth: 0
223223

224+
- name: Install locales
225+
run: sudo apt-get update && sudo apt-get install -y language-pack-fr language-pack-de
226+
227+
- name: Install single-byte locale
228+
run: sudo sed -i -e 's/# de_DE@euro/de_DE@euro/g' /etc/locale.gen && sudo locale-gen de_DE@euro
229+
224230
- name: Setup PHP, with composer and extensions
225231
uses: shivammathur/setup-php@v2
226232
with:

.php-cs-fixer.dist.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
'standardize_not_equals' => true,
222222
'static_lambda' => false, // Risky if we can't guarantee nobody use `bindTo()`
223223
'strict_comparison' => false, // No, too dangerous to change that
224-
'string_implicit_backslashes' => false, // was escape_implicit_backslashes, too confusing
224+
'string_implicit_backslashes' => ['single_quoted' => 'unescape', 'double_quoted' => 'escape', 'heredoc' => 'escape'], // was escape_implicit_backslashes
225225
'strict_param' => false, // No, too dangerous to change that
226226
'string_length_to_empty' => true,
227227
'string_line_ending' => true,

CHANGELOG.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,36 @@ 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 - 4.0.0
8+
## TBD - 4.1.0
9+
10+
### Added
11+
12+
- Allow Spreadsheet clone. [PR #437-](https://github.com/PHPOffice/PhpSpreadsheet/pull/4370)
13+
14+
### Removed
15+
16+
- Nothing yet.
17+
18+
### Changed
19+
20+
- ListWorksheetInfo will now return sheetState (visible, hidden, veryHidden). [Issue #4345](https://github.com/PHPOffice/PhpSpreadsheet/issues/4345) [PR #4366](https://github.com/PHPOffice/PhpSpreadsheet/pull/4366)
21+
- Start migration to Phpstan 2. [PR #4359](https://github.com/PHPOffice/PhpSpreadsheet/pull/4359)
22+
- IOFactory identify can return, and createReader and CreateWriter can accept, a class name rather than a file type. [Issue #4357](https://github.com/PHPOffice/PhpSpreadsheet/issues/4357) [PR #4361](https://github.com/PHPOffice/PhpSpreadsheet/pull/4361)
23+
24+
### Moved
25+
26+
- Nothing yet.
27+
28+
### Deprecated
29+
30+
- Nothing yet.
31+
32+
### Fixed
33+
34+
- Refactor Helper/Html. [PR #4359](https://github.com/PHPOffice/PhpSpreadsheet/pull/4359)
35+
- Better handling of defined names on sheets whose titles include apostrophes. [Issue #4356](https://github.com/PHPOffice/PhpSpreadsheet/issues/4356) [Issue #4362](https://github.com/PHPOffice/PhpSpreadsheet/issues/4362) [Issue #4376](https://github.com/PHPOffice/PhpSpreadsheet/issues/4376) [PR #4360](https://github.com/PHPOffice/PhpSpreadsheet/pull/4360)
36+
37+
## 2025-02-08 - 4.0.0
938

1039
### BREAKING CHANGES
1140

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"platform": {
1616
"php" : "8.1.99"
1717
},
18+
"process-timeout": 600,
1819
"sort-packages": true,
1920
"allow-plugins": {
2021
"dealerdirect/phpcodesniffer-composer-installer": true
@@ -79,7 +80,7 @@
7980
"ext-xmlwriter": "*",
8081
"ext-zip": "*",
8182
"ext-zlib": "*",
82-
"composer/pcre": "^3.3",
83+
"composer/pcre": "^1||^2||^3",
8384
"maennchen/zipstream-php": "^2.1 || ^3.0",
8485
"markbaker/complex": "^3.0",
8586
"markbaker/matrix": "^3.0",

composer.lock

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

docs/topics/Looping the Loop.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ $inputFileName = __DIR__ . '/../Financial Sample.xlsx';
1616

1717
$reader = IOFactory::createReader($inputFileType);
1818
$spreadsheet = $reader->load($inputFileName);
19-
19+
$worksheet = $spreadsheet->getActiveSheet();
2020

2121
$dataArray = $worksheet->toArray();
2222

docs/topics/reading-files.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,10 @@ method to identify the reader that you need, before using the
123123
```php
124124
$inputFileName = './sampleData/example1.xls';
125125

126-
/** Identify the type of $inputFileName **/
126+
/**
127+
* Identify the type of $inputFileName.
128+
* See below for a possible improvement for release 4.1.0+.
129+
*/
127130
$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName);
128131
/** Create a new Reader of the type that has been identified **/
129132
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader($inputFileType);
@@ -134,6 +137,13 @@ $spreadsheet = $reader->load($inputFileName);
134137
See `samples/Reader/04_Simple_file_reader_using_the_IOFactory_to_identify_a_reader_to_use.php`
135138
for a working example of this code.
136139

140+
Prior to release 4.1.0, `identify` returns a file type.
141+
It may be more useful to return a fully-qualified class name,
142+
which can be accomplished using a parameter introduced in 4.1.0:
143+
```php
144+
$inputFileType = \PhpOffice\PhpSpreadsheet\IOFactory::identify($inputFileName, null, true);
145+
```
146+
137147
As with the IOFactory `load()` method, you can also pass an array of formats
138148
for the `identify()` method to check against if you know that it will only
139149
be in a subset of the possible formats that PhpSpreadsheet supports.

0 commit comments

Comments
 (0)