Drop PHP 5.6 and 7.0

This is according to our formal, published, policy to only support
eol PHP after 6 months.

See https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support
This commit is contained in:
Adrien Crivelli 2019-07-24 23:12:45 -07:00
parent dbc8777c43
commit 454d942c13
No known key found for this signature in database
GPG Key ID: B182FD79DC6DE92E
7 changed files with 10 additions and 22 deletions

View File

@ -2,8 +2,6 @@ language: php
dist: trusty dist: trusty
php: php:
- 5.6
- 7.0
- 7.1 - 7.1
- 7.2 - 7.2
- 7.3 - 7.3
@ -12,7 +10,6 @@ php:
matrix: matrix:
fast_finish: true fast_finish: true
allow_failures: allow_failures:
- php: 5.6
- php: 7.4snapshot - php: 7.4snapshot
cache: cache:

View File

@ -35,11 +35,11 @@
"php-cs-fixer fix --ansi" "php-cs-fixer fix --ansi"
], ],
"versions": [ "versions": [
"phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 5.6- -n" "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 7.1- -n"
] ]
}, },
"require": { "require": {
"php": "^5.6|^7.0", "php": "^7.1",
"ext-ctype": "*", "ext-ctype": "*",
"ext-dom": "*", "ext-dom": "*",
"ext-gd": "*", "ext-gd": "*",
@ -84,4 +84,4 @@
"PhpOffice\\PhpSpreadsheetTests\\": "tests/PhpSpreadsheetTests" "PhpOffice\\PhpSpreadsheetTests\\": "tests/PhpSpreadsheetTests"
} }
} }
} }

6
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "d70247696f417581626dde9641b53bdc", "content-hash": "844c52e10f1e289de51d2b71cb7fc1ff",
"packages": [ "packages": [
{ {
"name": "markbaker/complex", "name": "markbaker/complex",
@ -3192,7 +3192,7 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": "^5.6|^7.0", "php": "^7.1",
"ext-ctype": "*", "ext-ctype": "*",
"ext-dom": "*", "ext-dom": "*",
"ext-gd": "*", "ext-gd": "*",
@ -3208,4 +3208,4 @@
"ext-zlib": "*" "ext-zlib": "*"
}, },
"platform-dev": [] "platform-dev": []
} }

View File

@ -25,12 +25,9 @@ spreadsheet file formats, like Excel and LibreOffice Calc.
## Software requirements ## Software requirements
The following software is required to develop using PhpSpreadsheet: PHP version 7.1 or newer to develop using PhpSpreadsheet. Other requirements, such as PHP extensions, are enforced by
composer. See the `require` section of [the composer.json file](https://github.com/PHPOffice/PhpSpreadsheet/blob/master/composer.json)
- PHP version 5.6 or newer for details.
- PHP extension php\_zip enabled
- PHP extension php\_xml enabled
- PHP extension php\_gd2 enabled (if not compiled in)
### PHP version support ### PHP version support

View File

@ -3,7 +3,7 @@
require_once 'Header.php'; require_once 'Header.php';
$requirements = [ $requirements = [
'PHP 5.6.0' => version_compare(PHP_VERSION, '5.6.0', '>='), 'PHP 7.1.0' => version_compare(PHP_VERSION, '7.1.0', '>='),
'PHP extension XML' => extension_loaded('xml'), 'PHP extension XML' => extension_loaded('xml'),
'PHP extension xmlwriter' => extension_loaded('xmlwriter'), 'PHP extension xmlwriter' => extension_loaded('xmlwriter'),
'PHP extension mbstring' => extension_loaded('mbstring'), 'PHP extension mbstring' => extension_loaded('mbstring'),

View File

@ -30,7 +30,6 @@ class Settings
* 7.2 < 7.2.1 * 7.2 < 7.2.1
* 7.1 < 7.1.13 * 7.1 < 7.1.13
* 7.0 < 7.0.27 * 7.0 < 7.0.27
* 5.6 ANY
* then you may need to disable this check to prevent unwanted behaviour in other threads * then you may need to disable this check to prevent unwanted behaviour in other threads
* SECURITY WARNING: Changing this flag is not recommended. * SECURITY WARNING: Changing this flag is not recommended.
* *
@ -122,7 +121,6 @@ class Settings
* 7.2 < 7.2.1 * 7.2 < 7.2.1
* 7.1 < 7.1.13 * 7.1 < 7.1.13
* 7.0 < 7.0.27 * 7.0 < 7.0.27
* 5.6 ANY
* then you may need to disable this check to prevent unwanted behaviour in other threads * then you may need to disable this check to prevent unwanted behaviour in other threads
* SECURITY WARNING: Changing this flag to false is not recommended. * SECURITY WARNING: Changing this flag to false is not recommended.
* *

View File

@ -243,10 +243,6 @@ class CoordinateTest extends TestCase
{ {
$this->expectException(\TypeError::class); $this->expectException(\TypeError::class);
if (PHP_MAJOR_VERSION < 7) {
$this->markTestSkipped('Cannot catch type hinting error with PHP 5.6');
}
$cellRange = ''; $cellRange = '';
Coordinate::buildRange($cellRange); Coordinate::buildRange($cellRange);
} }