From f131ca30e66f659a761aab17ffdc5e6f869e328c Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Tue, 5 Sep 2023 19:46:26 -0700 Subject: [PATCH] Drop PHP 7.4 support 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 Also share the exact same dev deps across all PHP version for GitHub Actions so runs are faster, much most importantly they are stable and predictable. And we decide manually when we want to migrate to PHPUnit 10. Fixes #3634 Closes #3710 --- .github/workflows/github-pages.yml | 2 +- .github/workflows/main.yml | 16 +- CHANGELOG.md | 1 + CONTRIBUTING.md | 2 +- README.md | 4 +- composer.json | 10 +- composer.lock | 707 +++++++++--------- docs/index.md | 10 +- docs/topics/reading-and-writing-to-file.md | 2 +- phpstan-baseline.neon | 5 + phpstan-conditional.php | 86 --- phpstan.neon.dist | 1 - phpunit10.xml.dist | 15 - samples/index.php | 2 +- .../Calculation/LookupRef/Sort.php | 19 - .../Reader/Security/XmlScanner.php | 89 +-- src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php | 3 +- src/PhpSpreadsheet/Settings.php | 4 +- .../Style/NumberFormat/Wizard/Accounting.php | 6 - .../Reader/Csv/CsvCallbackTest.php | 2 +- .../Reader/Csv/CsvTest.php | 2 +- .../Reader/Security/XmlScannerTest.php | 27 - tests/PhpSpreadsheetTests/SettingsTest.php | 26 - .../Worksheet/MemoryDrawingTest.php | 24 +- 24 files changed, 379 insertions(+), 686 deletions(-) delete mode 100644 phpstan-conditional.php delete mode 100644 phpunit10.xml.dist diff --git a/.github/workflows/github-pages.yml b/.github/workflows/github-pages.yml index aa35f57f87..adae063159 100644 --- a/.github/workflows/github-pages.yml +++ b/.github/workflows/github-pages.yml @@ -14,7 +14,7 @@ jobs: - name: Setup PHP, with composer and extensions uses: shivammathur/setup-php@v2 with: - php-version: 7.4 + php-version: 8.1 coverage: none # remove xdebug - name: Build API documentation diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a478a1b6d8..3a37448c46 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,7 +8,6 @@ jobs: experimental: - false php-version: - - '7.4' - '8.0' - '8.1' - '8.2' @@ -43,13 +42,13 @@ jobs: - name: Delete composer lock file id: composer-lock - if: ${{ matrix.php-version == '8.1' || matrix.php-version == '8.2' || matrix.php-version == 'nightly' }} + if: ${{ matrix.php-version == 'nightly' }} run: | rm composer.lock echo "flags=--ignore-platform-reqs" >> $GITHUB_OUTPUT - name: Install dependencies - run: composer update --no-progress --prefer-dist --optimize-autoloader ${{ steps.composer-lock.outputs.flags }} + run: composer install --no-progress --prefer-dist --optimize-autoloader ${{ steps.composer-lock.outputs.flags }} - name: Setup problem matchers for PHP run: echo "::add-matcher::${{ runner.tool_cache }}/php.json" @@ -57,18 +56,11 @@ jobs: - name: Setup problem matchers for PHPUnit run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: "Run PHPUnit tests 1 (Experimental: ${{ matrix.experimental }})" + - name: "Run PHPUnit tests (Experimental: ${{ matrix.experimental }})" env: FAILURE_ACTION: "${{ matrix.experimental == true }}" - if: ${{ matrix.php-version == '7.4' || matrix.php-version == '8.0' }} run: vendor/bin/phpunit --verbose || $FAILURE_ACTION - - name: "Run PHPUnit tests 2 (Experimental: ${{ matrix.experimental }})" - env: - FAILURE_ACTION: "${{ matrix.experimental == true }}" - if: ${{ matrix.php-version == '8.1' || matrix.php-version == '8.2' || matrix.php-version == 'nightly' }} - run: vendor/bin/phpunit -c phpunit10.xml.dist --display-incomplete --display-skipped --display-deprecations --display-errors --display-notices --display-warnings || $FAILURE_ACTION - php-cs-fixer: runs-on: ubuntu-latest steps: @@ -160,7 +152,7 @@ jobs: run: composer install --no-progress --prefer-dist --optimize-autoloader - name: Code Version Compatibility check with PHP_CodeSniffer - run: ./vendor/bin/phpcs -q --report-width=200 --report=summary,full src/ --standard=PHPCompatibility --runtime-set testVersion 7.4- + run: ./vendor/bin/phpcs -q --report-width=200 --report=summary,full src/ --standard=PHPCompatibility --runtime-set testVersion 8.0- phpstan: runs-on: ubuntu-latest diff --git a/CHANGELOG.md b/CHANGELOG.md index edccf62719..c3bb9e7edc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org). ### Changed +- Drop support for PHP 7.4, according to https://phpspreadsheet.readthedocs.io/en/latest/#php-version-support [PR #3713](https://github.com/PHPOffice/PhpSpreadsheet/pull/3713) - RLM Added to NumberFormatter Currency. This happens depending on release of ICU which Php is using (it does not yet happen with any official release). PhpSpreadsheet will continue to use the value returned by Php, but a method is added to keep the result unchanged from release to release. [Issue #3571](https://github.com/PHPOffice/PhpSpreadsheet/issues/3571) [PR #3640](https://github.com/PHPOffice/PhpSpreadsheet/pull/3640) ### Deprecated diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 09794b5651..e89e99ec5a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ If you would like to contribute, here are some notes and guidelines: - 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 - 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 - - The code must work with all PHP versions that we support (currently PHP 7.4 to PHP 8.2). + - The code must work with all PHP versions that we support. - You can call `composer versions` to test version compatibility. - Code style should be maintained. - `composer style` will identify any issues with Coding Style`. diff --git a/README.md b/README.md index a69c3afc95..b76b527894 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ allow you to read and write various spreadsheet file formats such as Excel and L LTS: Support for PHP versions will only be maintained for a period of six months beyond the [end of life](https://www.php.net/supported-versions) of that PHP version. -Currently the required PHP minimum version is PHP __7.4__, and we [will support that version](https://www.php.net/eol.php) until 28th June 2023. +Currently the required PHP minimum version is PHP __8.0__, and we [will support that version](https://www.php.net/eol.php) until May 2024. See the `composer.json` for other requirements. @@ -36,7 +36,7 @@ If you are building your installation on a development machine that is on a diff }, "config": { "platform": { - "php": "7.4" + "php": "8.0" } } } diff --git a/composer.json b/composer.json index 4b05be334b..f71ec94edb 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "scripts": { "check": [ "phpcs src/ tests/ --report=checkstyle", - "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 7.4- -n", + "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 8.0- -n", "php-cs-fixer fix --ansi --dry-run --diff", "phpunit --color=always", "phpstan analyse --ansi --memory-limit=2048M" @@ -57,11 +57,11 @@ "php-cs-fixer fix" ], "versions": [ - "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 7.4- -n" + "phpcs --report-width=200 samples/ src/ tests/ --ignore=samples/Header.php --standard=PHPCompatibility --runtime-set testVersion 8.0- -n" ] }, "require": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-ctype": "*", "ext-dom": "*", "ext-fileinfo": "*", @@ -85,14 +85,14 @@ }, "require-dev": { "dealerdirect/phpcodesniffer-composer-installer": "dev-main", - "dompdf/dompdf": "^1.0 || ^2.0", + "dompdf/dompdf": "^2.0", "friendsofphp/php-cs-fixer": "^3.2", "mitoteam/jpgraph": "^10.3", "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1", "phpstan/phpstan-phpunit": "^1.0", - "phpunit/phpunit": "^8.5 || ^9.0 || ^10.0", + "phpunit/phpunit": "^9.6", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" }, diff --git a/composer.lock b/composer.lock index c12e2115b5..3cbe12842b 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "202b1e25cc7e8a5216ffa899dc111cda", + "content-hash": "da6daa4303820541316ba24ed289c595", "packages": [ { "name": "ezyang/htmlpurifier", @@ -69,23 +69,23 @@ }, { "name": "maennchen/zipstream-php", - "version": "2.2.6", + "version": "2.4.0", "source": { "type": "git", "url": "https://github.com/maennchen/ZipStream-PHP.git", - "reference": "30ad6f93cf3efe4192bc7a4c9cad11ff8f4f237f" + "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/30ad6f93cf3efe4192bc7a4c9cad11ff8f4f237f", - "reference": "30ad6f93cf3efe4192bc7a4c9cad11ff8f4f237f", + "url": "https://api.github.com/repos/maennchen/ZipStream-PHP/zipball/3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", + "reference": "3fa72e4c71a43f9e9118752a5c90e476a8dc9eb3", "shasum": "" }, "require": { + "ext-mbstring": "*", "myclabs/php-enum": "^1.5", - "php": "^7.4 || ^8.0", - "psr/http-message": "^1.0", - "symfony/polyfill-mbstring": "^1.0" + "php": "^8.0", + "psr/http-message": "^1.0" }, "require-dev": { "ext-zip": "*", @@ -94,7 +94,7 @@ "mikey179/vfsstream": "^1.6", "php-coveralls/php-coveralls": "^2.4", "phpunit/phpunit": "^8.5.8 || ^9.4.2", - "vimeo/psalm": "^4.1" + "vimeo/psalm": "^5.0" }, "type": "library", "autoload": { @@ -131,7 +131,7 @@ ], "support": { "issues": "https://github.com/maennchen/ZipStream-PHP/issues", - "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.2.6" + "source": "https://github.com/maennchen/ZipStream-PHP/tree/2.4.0" }, "funding": [ { @@ -143,7 +143,7 @@ "type": "open_collective" } ], - "time": "2022-11-25T18:57:19+00:00" + "time": "2022-12-08T12:29:14+00:00" }, { "name": "markbaker/complex", @@ -477,25 +477,25 @@ }, { "name": "psr/simple-cache", - "version": "1.0.1", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/simple-cache.git", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", - "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/764e0b3939f5ca87cb904f570ef9be2d78a07865", + "reference": "764e0b3939f5ca87cb904f570ef9be2d78a07865", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -510,7 +510,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common interfaces for simple caching", @@ -522,92 +522,9 @@ "simple-cache" ], "support": { - "source": "https://github.com/php-fig/simple-cache/tree/master" - }, - "time": "2017-10-23T01:57:42+00:00" - }, - { - "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "shasum": "" + "source": "https://github.com/php-fig/simple-cache/tree/3.0.0" }, - "require": { - "php": ">=7.1" - }, - "provide": { - "ext-mbstring": "*" - }, - "suggest": { - "ext-mbstring": "For best performance" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "mbstring", - "polyfill", - "portable", - "shim" - ], - "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" - }, - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2021-10-29T13:26:27+00:00" } ], "packages-dev": [ @@ -684,16 +601,16 @@ }, { "name": "composer/semver", - "version": "3.3.2", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9" + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/3953f23262f2bff1919fc82183ad9acb13ff62c9", - "reference": "3953f23262f2bff1919fc82183ad9acb13ff62c9", + "url": "https://api.github.com/repos/composer/semver/zipball/35e8d0af4486141bc745f23a29cc2091eb624a32", + "reference": "35e8d0af4486141bc745f23a29cc2091eb624a32", "shasum": "" }, "require": { @@ -743,9 +660,9 @@ "versioning" ], "support": { - "irc": "irc://irc.freenode.org/composer", + "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.3.2" + "source": "https://github.com/composer/semver/tree/3.4.0" }, "funding": [ { @@ -761,7 +678,7 @@ "type": "tidelift" } ], - "time": "2022-04-01T19:23:25+00:00" + "time": "2023-08-31T09:50:34+00:00" }, { "name": "composer/xdebug-handler", @@ -835,12 +752,12 @@ "source": { "type": "git", "url": "https://github.com/PHPCSStandards/composer-installer.git", - "reference": "4be43904336affa5c2f70744a348312336afd0da" + "reference": "1a457ec7536569197503e104bc4616226844b6ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/4be43904336affa5c2f70744a348312336afd0da", - "reference": "4be43904336affa5c2f70744a348312336afd0da", + "url": "https://api.github.com/repos/PHPCSStandards/composer-installer/zipball/1a457ec7536569197503e104bc4616226844b6ff", + "reference": "1a457ec7536569197503e104bc4616226844b6ff", "shasum": "" }, "require": { @@ -906,7 +823,7 @@ "issues": "https://github.com/PHPCSStandards/composer-installer/issues", "source": "https://github.com/PHPCSStandards/composer-installer" }, - "time": "2023-01-05T11:28:13+00:00" + "time": "2023-02-13T11:00:28+00:00" }, { "name": "doctrine/instantiator", @@ -1042,16 +959,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.25.0", + "version": "v3.25.1", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "9025b7d2b6e1d90a63d0ac0905018ce5d03ec88d" + "reference": "8e21d69801de6b5ecb0dbe0bcdf967b335b1260b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/9025b7d2b6e1d90a63d0ac0905018ce5d03ec88d", - "reference": "9025b7d2b6e1d90a63d0ac0905018ce5d03ec88d", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/8e21d69801de6b5ecb0dbe0bcdf967b335b1260b", + "reference": "8e21d69801de6b5ecb0dbe0bcdf967b335b1260b", "shasum": "" }, "require": { @@ -1125,7 +1042,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.25.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.25.1" }, "funding": [ { @@ -1133,30 +1050,28 @@ "type": "github" } ], - "time": "2023-08-31T21:27:18+00:00" + "time": "2023-09-04T01:22:52+00:00" }, { "name": "masterminds/html5", - "version": "2.7.6", + "version": "2.8.1", "source": { "type": "git", "url": "https://github.com/Masterminds/html5-php.git", - "reference": "897eb517a343a2281f11bc5556d6548db7d93947" + "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/897eb517a343a2281f11bc5556d6548db7d93947", - "reference": "897eb517a343a2281f11bc5556d6548db7d93947", + "url": "https://api.github.com/repos/Masterminds/html5-php/zipball/f47dcf3c70c584de14f21143c55d9939631bc6cf", + "reference": "f47dcf3c70c584de14f21143c55d9939631bc6cf", "shasum": "" }, "require": { - "ext-ctype": "*", "ext-dom": "*", - "ext-libxml": "*", "php": ">=5.3.0" }, "require-dev": { - "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7" + "phpunit/phpunit": "^4.8.35 || ^5.7.21 || ^6 || ^7 || ^8" }, "type": "library", "extra": { @@ -1200,9 +1115,9 @@ ], "support": { "issues": "https://github.com/Masterminds/html5-php/issues", - "source": "https://github.com/Masterminds/html5-php/tree/2.7.6" + "source": "https://github.com/Masterminds/html5-php/tree/2.8.1" }, - "time": "2022-08-18T16:18:26+00:00" + "time": "2023-05-10T11:58:31+00:00" }, { "name": "mitoteam/jpgraph", @@ -1252,26 +1167,27 @@ }, { "name": "mpdf/mpdf", - "version": "v8.1.6", + "version": "v8.2.0", "source": { "type": "git", "url": "https://github.com/mpdf/mpdf.git", - "reference": "146c7c1dfd21c826b9d5bbfe3c15e52fd933c90f" + "reference": "170a236a588d177c2aa7447ce490a030ca68e6f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mpdf/mpdf/zipball/146c7c1dfd21c826b9d5bbfe3c15e52fd933c90f", - "reference": "146c7c1dfd21c826b9d5bbfe3c15e52fd933c90f", + "url": "https://api.github.com/repos/mpdf/mpdf/zipball/170a236a588d177c2aa7447ce490a030ca68e6f4", + "reference": "170a236a588d177c2aa7447ce490a030ca68e6f4", "shasum": "" }, "require": { "ext-gd": "*", "ext-mbstring": "*", + "mpdf/psr-http-message-shim": "^1.0 || ^2.0", "mpdf/psr-log-aware-trait": "^2.0 || ^3.0", "myclabs/deep-copy": "^1.7", "paragonie/random_compat": "^1.4|^2.0|^9.99.99", "php": "^5.6 || ^7.0 || ~8.0.0 || ~8.1.0 || ~8.2.0", - "psr/http-message": "^1.0", + "psr/http-message": "^1.0 || ^2.0", "psr/log": "^1.0 || ^2.0 || ^3.0", "setasign/fpdi": "^2.1" }, @@ -1289,6 +1205,9 @@ }, "type": "library", "autoload": { + "files": [ + "src/functions.php" + ], "psr-4": { "Mpdf\\": "src/" } @@ -1325,24 +1244,72 @@ "type": "custom" } ], - "time": "2023-05-03T19:36:43+00:00" + "time": "2023-09-01T11:44:52+00:00" + }, + { + "name": "mpdf/psr-http-message-shim", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/mpdf/psr-http-message-shim.git", + "reference": "3206e6b80b6d2479e148ee497e9f2bebadc919db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mpdf/psr-http-message-shim/zipball/3206e6b80b6d2479e148ee497e9f2bebadc919db", + "reference": "3206e6b80b6d2479e148ee497e9f2bebadc919db", + "shasum": "" + }, + "require": { + "psr/http-message": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Mpdf\\PsrHttpMessageShim\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mark Dorison", + "email": "mark@chromatichq.com" + }, + { + "name": "Kristofer Widholm", + "email": "kristofer@chromatichq.com" + }, + { + "name": "Nigel Cunningham", + "email": "nigel.cunningham@technocrat.com.au" + } + ], + "description": "Shim to allow support of different psr/message versions.", + "support": { + "issues": "https://github.com/mpdf/psr-http-message-shim/issues", + "source": "https://github.com/mpdf/psr-http-message-shim/tree/1.0.0" + }, + "time": "2023-09-01T05:59:47+00:00" }, { "name": "mpdf/psr-log-aware-trait", - "version": "v2.0.0", + "version": "v3.0.0", "source": { "type": "git", "url": "https://github.com/mpdf/psr-log-aware-trait.git", - "reference": "7a077416e8f39eb626dee4246e0af99dd9ace275" + "reference": "a633da6065e946cc491e1c962850344bb0bf3e78" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mpdf/psr-log-aware-trait/zipball/7a077416e8f39eb626dee4246e0af99dd9ace275", - "reference": "7a077416e8f39eb626dee4246e0af99dd9ace275", + "url": "https://api.github.com/repos/mpdf/psr-log-aware-trait/zipball/a633da6065e946cc491e1c962850344bb0bf3e78", + "reference": "a633da6065e946cc491e1c962850344bb0bf3e78", "shasum": "" }, "require": { - "psr/log": "^1.0 || ^2.0" + "psr/log": "^3.0" }, "type": "library", "autoload": { @@ -1367,9 +1334,9 @@ "description": "Trait to allow support of different psr/log versions.", "support": { "issues": "https://github.com/mpdf/psr-log-aware-trait/issues", - "source": "https://github.com/mpdf/psr-log-aware-trait/tree/v2.0.0" + "source": "https://github.com/mpdf/psr-log-aware-trait/tree/v3.0.0" }, - "time": "2023-05-03T06:18:28+00:00" + "time": "2023-05-03T06:19:36+00:00" }, { "name": "myclabs/deep-copy", @@ -1432,16 +1399,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.16.0", + "version": "v4.17.1", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17" + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", - "reference": "19526a33fb561ef417e822e85f08a00db4059c17", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", + "reference": "a6303e50c90c355c7eeee2c4a8b27fe8dc8fef1d", "shasum": "" }, "require": { @@ -1482,9 +1449,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.17.1" }, - "time": "2023-06-25T14:52:30+00:00" + "time": "2023-08-13T19:53:39+00:00" }, { "name": "paragonie/random_compat", @@ -1801,16 +1768,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.32", + "version": "1.10.33", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "c47e47d3ab03137c0e121e77c4d2cb58672f6d44" + "reference": "03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/c47e47d3ab03137c0e121e77c4d2cb58672f6d44", - "reference": "c47e47d3ab03137c0e121e77c4d2cb58672f6d44", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1", + "reference": "03b1cf9f814ba0863c4e9affea49a4d1ed9a2ed1", "shasum": "" }, "require": { @@ -1859,7 +1826,7 @@ "type": "tidelift" } ], - "time": "2023-08-24T21:54:50+00:00" + "time": "2023-09-04T12:20:53+00:00" }, { "name": "phpstan/phpstan-phpunit", @@ -1915,16 +1882,16 @@ }, { "name": "phpunit/php-code-coverage", - "version": "9.2.26", + "version": "9.2.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", - "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/b0a88255cb70d52653d80c890bd7f38740ea50d1", + "reference": "b0a88255cb70d52653d80c890bd7f38740ea50d1", "shasum": "" }, "require": { @@ -1980,7 +1947,8 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" + "security": "https://github.com/sebastianbergmann/php-code-coverage/security/policy", + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.27" }, "funding": [ { @@ -1988,7 +1956,7 @@ "type": "github" } ], - "time": "2023-03-06T12:58:08+00:00" + "time": "2023-07-26T13:44:30+00:00" }, { "name": "phpunit/php-file-iterator", @@ -2336,22 +2304,27 @@ }, { "name": "psr/container", - "version": "1.1.2", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/513e0666f7216c7459170d56df27dfcefe1689ea", - "reference": "513e0666f7216c7459170d56df27dfcefe1689ea", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { "php": ">=7.4.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "psr-4": { "Psr\\Container\\": "src/" @@ -2378,9 +2351,9 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/1.1.2" + "source": "https://github.com/php-fig/container/tree/2.0.2" }, - "time": "2021-11-05T16:50:12+00:00" + "time": "2021-11-05T16:47:00+00:00" }, { "name": "psr/event-dispatcher", @@ -2434,30 +2407,30 @@ }, { "name": "psr/log", - "version": "1.1.4", + "version": "3.0.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11" + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", - "reference": "d49695b909c3b7628b6289db5479a1c204601f11", + "url": "https://api.github.com/repos/php-fig/log/zipball/fe5ea303b0887d5caefd3d431c3e61ad47037001", + "reference": "fe5ea303b0887d5caefd3d431c3e61ad47037001", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=8.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1.x-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Psr\\Log\\": "Psr/Log/" + "Psr\\Log\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -2478,9 +2451,9 @@ "psr-3" ], "support": { - "source": "https://github.com/php-fig/log/tree/1.1.4" + "source": "https://github.com/php-fig/log/tree/3.0.0" }, - "time": "2021-05-03T11:20:27+00:00" + "time": "2021-07-14T16:46:02+00:00" }, { "name": "sabberworm/php-css-parser", @@ -3041,16 +3014,16 @@ }, { "name": "sebastian/global-state", - "version": "5.0.5", + "version": "5.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + "reference": "bde739e7565280bda77be70044ac1047bc007e34" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", - "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bde739e7565280bda77be70044ac1047bc007e34", + "reference": "bde739e7565280bda77be70044ac1047bc007e34", "shasum": "" }, "require": { @@ -3093,7 +3066,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.6" }, "funding": [ { @@ -3101,7 +3074,7 @@ "type": "github" } ], - "time": "2022-02-14T08:28:10+00:00" + "time": "2023-08-02T09:26:13+00:00" }, { "name": "sebastian/lines-of-code", @@ -3501,16 +3474,16 @@ }, { "name": "setasign/fpdi", - "version": "v2.3.7", + "version": "v2.4.1", "source": { "type": "git", "url": "https://github.com/Setasign/FPDI.git", - "reference": "bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05" + "reference": "f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05", - "reference": "bccc892d5fa1f48c43f8ba7db5ed4ba6f30c8c05", + "url": "https://api.github.com/repos/Setasign/FPDI/zipball/f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b", + "reference": "f4ba73e5bc053ccc90b81717c5df1cb2ea7bae7b", "shasum": "" }, "require": { @@ -3523,7 +3496,7 @@ "require-dev": { "phpunit/phpunit": "~5.7", "setasign/fpdf": "~1.8", - "setasign/tfpdf": "1.31", + "setasign/tfpdf": "~1.31", "squizlabs/php_codesniffer": "^3.5", "tecnickcom/tcpdf": "~6.2" }, @@ -3561,7 +3534,7 @@ ], "support": { "issues": "https://github.com/Setasign/FPDI/issues", - "source": "https://github.com/Setasign/FPDI/tree/v2.3.7" + "source": "https://github.com/Setasign/FPDI/tree/v2.4.1" }, "funding": [ { @@ -3569,7 +3542,7 @@ "type": "tidelift" } ], - "time": "2023-02-09T10:38:43+00:00" + "time": "2023-07-27T08:12:09+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -3630,46 +3603,42 @@ }, { "name": "symfony/console", - "version": "v5.4.23", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c" + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/90f21e27d0d88ce38720556dd164d4a1e4c3934c", - "reference": "90f21e27d0d88ce38720556dd164d4a1e4c3934c", + "url": "https://api.github.com/repos/symfony/console/zipball/c3ebc83d031b71c39da318ca8b7a07ecc67507ed", + "reference": "c3ebc83d031b71c39da318ca8b7a07ecc67507ed", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", + "php": ">=8.0.2", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.9", - "symfony/polyfill-php80": "^1.16", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/string": "^5.1|^6.0" + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<4.4", - "symfony/dotenv": "<5.1", - "symfony/event-dispatcher": "<4.4", - "symfony/lock": "<4.4", - "symfony/process": "<4.4" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/event-dispatcher": "^4.4|^5.0|^6.0", - "symfony/lock": "^4.4|^5.0|^6.0", - "symfony/process": "^4.4|^5.0|^6.0", - "symfony/var-dumper": "^4.4|^5.0|^6.0" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "suggest": { "psr/log": "For using the console logger", @@ -3704,12 +3673,12 @@ "homepage": "https://symfony.com", "keywords": [ "cli", - "command-line", + "command line", "console", "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.23" + "source": "https://github.com/symfony/console/tree/v6.0.19" }, "funding": [ { @@ -3725,29 +3694,29 @@ "type": "tidelift" } ], - "time": "2023-04-24T18:47:29+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/deprecation-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66" + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/e8b495ea28c1d97b5e0c121748d6f9b53d075c66", - "reference": "e8b495ea28c1d97b5e0c121748d6f9b53d075c66", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", + "reference": "26954b3d62a6c5fd0ea8a2a00c0353a14978d05c", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=8.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3776,7 +3745,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.0.2" }, "funding": [ { @@ -3792,44 +3761,42 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/event-dispatcher", - "version": "v5.4.22", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f" + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f", - "reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", + "reference": "2eaf8e63bc5b8cefabd4a800157f0d0c094f677a", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/event-dispatcher-contracts": "^2|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/event-dispatcher-contracts": "^2|^3" }, "conflict": { - "symfony/dependency-injection": "<4.4" + "symfony/dependency-injection": "<5.4" }, "provide": { "psr/event-dispatcher-implementation": "1.0", - "symfony/event-dispatcher-implementation": "2.0" + "symfony/event-dispatcher-implementation": "2.0|3.0" }, "require-dev": { "psr/log": "^1|^2|^3", - "symfony/config": "^4.4|^5.0|^6.0", - "symfony/dependency-injection": "^4.4|^5.0|^6.0", - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/expression-language": "^4.4|^5.0|^6.0", - "symfony/http-foundation": "^4.4|^5.0|^6.0", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/error-handler": "^5.4|^6.0", + "symfony/expression-language": "^5.4|^6.0", + "symfony/http-foundation": "^5.4|^6.0", "symfony/service-contracts": "^1.1|^2|^3", - "symfony/stopwatch": "^4.4|^5.0|^6.0" + "symfony/stopwatch": "^5.4|^6.0" }, "suggest": { "symfony/dependency-injection": "", @@ -3861,7 +3828,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22" + "source": "https://github.com/symfony/event-dispatcher/tree/v6.0.19" }, "funding": [ { @@ -3877,24 +3844,24 @@ "type": "tidelift" } ], - "time": "2023-03-17T11:31:58+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/event-dispatcher-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher-contracts.git", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1" + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/f98b54df6ad059855739db6fcbc2d36995283fe1", - "reference": "f98b54df6ad059855739db6fcbc2d36995283fe1", + "url": "https://api.github.com/repos/symfony/event-dispatcher-contracts/zipball/7bc61cc2db649b4637d331240c5346dcc7708051", + "reference": "7bc61cc2db649b4637d331240c5346dcc7708051", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "psr/event-dispatcher": "^1" }, "suggest": { @@ -3903,7 +3870,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -3940,7 +3907,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/event-dispatcher-contracts/tree/v3.0.2" }, "funding": [ { @@ -3956,27 +3923,26 @@ "type": "tidelift" } ], - "time": "2022-01-02T09:53:40+00:00" + "time": "2022-01-02T09:55:41+00:00" }, { "name": "symfony/filesystem", - "version": "v5.4.23", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5" + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", - "reference": "b2f79d86cd9e7de0fff6d03baa80eaed7a5f38b5", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/3d49eec03fda1f0fc19b7349fbbe55ebc1004214", + "reference": "3d49eec03fda1f0fc19b7349fbbe55ebc1004214", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", - "symfony/polyfill-mbstring": "~1.8", - "symfony/polyfill-php80": "^1.16" + "symfony/polyfill-mbstring": "~1.8" }, "type": "library", "autoload": { @@ -4004,7 +3970,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v5.4.23" + "source": "https://github.com/symfony/filesystem/tree/v6.0.19" }, "funding": [ { @@ -4020,26 +3986,24 @@ "type": "tidelift" } ], - "time": "2023-03-02T11:38:35+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/finder", - "version": "v5.4.21", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19" + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/078e9a5e1871fcfe6a5ce421b539344c21afef19", - "reference": "078e9a5e1871fcfe6a5ce421b539344c21afef19", + "url": "https://api.github.com/repos/symfony/finder/zipball/5cc9cac6586fc0c28cd173780ca696e419fefa11", + "reference": "5cc9cac6586fc0c28cd173780ca696e419fefa11", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -4067,7 +4031,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v5.4.21" + "source": "https://github.com/symfony/finder/tree/v6.0.19" }, "funding": [ { @@ -4083,27 +4047,25 @@ "type": "tidelift" } ], - "time": "2023-02-16T09:33:00+00:00" + "time": "2023-01-20T17:44:14+00:00" }, { "name": "symfony/options-resolver", - "version": "v5.4.21", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/options-resolver.git", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9" + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/options-resolver/zipball/4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", - "reference": "4fe5cf6ede71096839f0e4b4444d65dd3a7c1eb9", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/6a180d1c45e0d9797470ca9eb46215692de00fa3", + "reference": "6a180d1c45e0d9797470ca9eb46215692de00fa3", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/deprecation-contracts": "^2.1|^3", - "symfony/polyfill-php73": "~1.0", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2", + "symfony/deprecation-contracts": "^2.1|^3" }, "type": "library", "autoload": { @@ -4136,7 +4098,7 @@ "options" ], "support": { - "source": "https://github.com/symfony/options-resolver/tree/v5.4.21" + "source": "https://github.com/symfony/options-resolver/tree/v6.0.19" }, "funding": [ { @@ -4152,20 +4114,20 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", - "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", + "reference": "ea208ce43cbb04af6867b4fdddb1bdbf84cc28cb", "shasum": "" }, "require": { @@ -4180,7 +4142,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4218,7 +4180,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.28.0" }, "funding": [ { @@ -4234,20 +4196,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-grapheme", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-grapheme.git", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354" + "reference": "875e90aeea2777b6f135677f618529449334a612" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", - "reference": "511a08c03c1960e08a883f4cffcacd219b758354", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/875e90aeea2777b6f135677f618529449334a612", + "reference": "875e90aeea2777b6f135677f618529449334a612", "shasum": "" }, "require": { @@ -4259,7 +4221,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4299,7 +4261,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.28.0" }, "funding": [ { @@ -4315,20 +4277,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-intl-normalizer", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-intl-normalizer.git", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", - "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", + "reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92", "shasum": "" }, "require": { @@ -4340,7 +4302,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4383,7 +4345,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0" }, "funding": [ { @@ -4399,29 +4361,35 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.27.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.28.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "42292d99c55abe617799667f454222c54c60e229" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/9e8ecb5f92152187c4799efd3c96b78ccab18ff9", - "reference": "9e8ecb5f92152187c4799efd3c96b78ccab18ff9", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229", + "reference": "42292d99c55abe617799667f454222c54c60e229", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4433,11 +4401,8 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -4453,16 +4418,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0" }, "funding": [ { @@ -4478,20 +4444,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-07-28T09:04:16+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5", + "reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5", "shasum": "" }, "require": { @@ -4500,7 +4466,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4545,7 +4511,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0" }, "funding": [ { @@ -4561,20 +4527,20 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/polyfill-php81", - "version": "v1.27.0", + "version": "v1.28.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php81.git", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a" + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/707403074c8ea6e2edaf8794b0157a0bfa52157a", - "reference": "707403074c8ea6e2edaf8794b0157a0bfa52157a", + "url": "https://api.github.com/repos/symfony/polyfill-php81/zipball/7581cd600fa9fd681b797d00b02f068e2f13263b", + "reference": "7581cd600fa9fd681b797d00b02f068e2f13263b", "shasum": "" }, "require": { @@ -4583,7 +4549,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.27-dev" + "dev-main": "1.28-dev" }, "thanks": { "name": "symfony/polyfill", @@ -4624,7 +4590,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php81/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php81/tree/v1.28.0" }, "funding": [ { @@ -4640,25 +4606,24 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2023-01-26T09:26:14+00:00" }, { "name": "symfony/process", - "version": "v5.4.23", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4b842fc4b61609e0a155a114082bd94e31e98287" + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4b842fc4b61609e0a155a114082bd94e31e98287", - "reference": "4b842fc4b61609e0a155a114082bd94e31e98287", + "url": "https://api.github.com/repos/symfony/process/zipball/2114fd60f26a296cc403a7939ab91478475a33d4", + "reference": "2114fd60f26a296cc403a7939ab91478475a33d4", "shasum": "" }, "require": { - "php": ">=7.2.5", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.0.2" }, "type": "library", "autoload": { @@ -4686,7 +4651,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v5.4.23" + "source": "https://github.com/symfony/process/tree/v6.0.19" }, "funding": [ { @@ -4702,26 +4667,25 @@ "type": "tidelift" } ], - "time": "2023-04-18T13:50:24+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/service-contracts", - "version": "v2.5.2", + "version": "v3.0.2", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c" + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/4b426aac47d6427cc1a1d0f7e2ac724627f5966c", - "reference": "4b426aac47d6427cc1a1d0f7e2ac724627f5966c", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/d78d39c1599bd1188b8e26bb341da52c3c6d8a66", + "reference": "d78d39c1599bd1188b8e26bb341da52c3c6d8a66", "shasum": "" }, "require": { - "php": ">=7.2.5", - "psr/container": "^1.1", - "symfony/deprecation-contracts": "^2.1|^3" + "php": ">=8.0.2", + "psr/container": "^2.0" }, "conflict": { "ext-psr": "<1.1|>=2" @@ -4732,7 +4696,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "2.5-dev" + "dev-main": "3.0-dev" }, "thanks": { "name": "symfony/contracts", @@ -4769,7 +4733,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v2.5.2" + "source": "https://github.com/symfony/service-contracts/tree/v3.0.2" }, "funding": [ { @@ -4785,24 +4749,24 @@ "type": "tidelift" } ], - "time": "2022-05-30T19:17:29+00:00" + "time": "2022-05-30T19:17:58+00:00" }, { "name": "symfony/stopwatch", - "version": "v5.4.21", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/stopwatch.git", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee" + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/stopwatch/zipball/f83692cd869a6f2391691d40a01e8acb89e76fee", - "reference": "f83692cd869a6f2391691d40a01e8acb89e76fee", + "url": "https://api.github.com/repos/symfony/stopwatch/zipball/011e781839dd1d2eb8119f65ac516a530f60226d", + "reference": "011e781839dd1d2eb8119f65ac516a530f60226d", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/service-contracts": "^1|^2|^3" }, "type": "library", @@ -4831,7 +4795,7 @@ "description": "Provides a way to profile code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/stopwatch/tree/v5.4.21" + "source": "https://github.com/symfony/stopwatch/tree/v6.0.19" }, "funding": [ { @@ -4847,38 +4811,37 @@ "type": "tidelift" } ], - "time": "2023-02-14T08:03:56+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "symfony/string", - "version": "v5.4.22", + "version": "v6.0.19", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62" + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", - "reference": "8036a4c76c0dd29e60b6a7cafcacc50cf088ea62", + "url": "https://api.github.com/repos/symfony/string/zipball/d9e72497367c23e08bf94176d2be45b00a9d232a", + "reference": "d9e72497367c23e08bf94176d2be45b00a9d232a", "shasum": "" }, "require": { - "php": ">=7.2.5", + "php": ">=8.0.2", "symfony/polyfill-ctype": "~1.8", "symfony/polyfill-intl-grapheme": "~1.0", "symfony/polyfill-intl-normalizer": "~1.0", - "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php80": "~1.15" + "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/translation-contracts": ">=3.0" + "symfony/translation-contracts": "<2.0" }, "require-dev": { - "symfony/error-handler": "^4.4|^5.0|^6.0", - "symfony/http-client": "^4.4|^5.0|^6.0", - "symfony/translation-contracts": "^1.1|^2", - "symfony/var-exporter": "^4.4|^5.0|^6.0" + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/translation-contracts": "^2.0|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -4917,7 +4880,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.22" + "source": "https://github.com/symfony/string/tree/v6.0.19" }, "funding": [ { @@ -4933,20 +4896,20 @@ "type": "tidelift" } ], - "time": "2023-03-14T06:11:53+00:00" + "time": "2023-01-01T08:36:10+00:00" }, { "name": "tecnickcom/tcpdf", - "version": "6.6.2", + "version": "6.6.3", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459" + "reference": "96985b992f7464ecccf0d47e3c59073de06375e1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/e3cffc9bcbc76e89e167e9eb0bbda0cab7518459", - "reference": "e3cffc9bcbc76e89e167e9eb0bbda0cab7518459", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/96985b992f7464ecccf0d47e3c59073de06375e1", + "reference": "96985b992f7464ecccf0d47e3c59073de06375e1", "shasum": "" }, "require": { @@ -4975,7 +4938,7 @@ }, "notification-url": "https://packagist.org/downloads/", "license": [ - "LGPL-3.0-only" + "LGPL-3.0-or-later" ], "authors": [ { @@ -4997,7 +4960,7 @@ ], "support": { "issues": "https://github.com/tecnickcom/TCPDF/issues", - "source": "https://github.com/tecnickcom/TCPDF/tree/6.6.2" + "source": "https://github.com/tecnickcom/TCPDF/tree/6.6.3" }, "funding": [ { @@ -5005,7 +4968,7 @@ "type": "custom" } ], - "time": "2022-12-17T10:28:59+00:00" + "time": "2023-09-06T08:42:11+00:00" }, { "name": "theseer/tokenizer", @@ -5066,7 +5029,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "^7.4 || ^8.0", + "php": "^8.0", "ext-ctype": "*", "ext-dom": "*", "ext-fileinfo": "*", diff --git a/docs/index.md b/docs/index.md index b5c031dd65..f5efd3b142 100644 --- a/docs/index.md +++ b/docs/index.md @@ -24,7 +24,7 @@ allow you to read and write various spreadsheet file formats such as Excel and L ## Software requirements -PHP version 7.4 or newer to develop using PhpSpreadsheet. Other requirements, such as PHP extensions, are enforced by +PHP version 8.0 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) for details. @@ -33,8 +33,10 @@ for details. LTS: Support for PHP versions will only be maintained for a period of six months beyond the [end of life of that PHP version](https://www.php.net/eol.php). -Currently the required PHP minimum version is PHP 7.4: the last release was 7.4.32 on 29th September 2022, and security support ends on 28th November 2022, so PhpSpreadsheet will support PHP 7.4 until 28th May 2023. -PHP 8.0 is officially [End of Life](https://www.php.net/supported-versions.php) on 26th November 2023, and PhpSpreadsheet will continue to support PHP 8.0 for six months after that date. +Currently, the required PHP minimum version is PHP 8.0. + +Support for PHP versions will only be maintained for a period of six months beyond the +[end of life](https://www.php.net/supported-versions) of that PHP version. See the `composer.json` for other requirements. @@ -60,7 +62,7 @@ If you are building your installation on a development machine that is on a diff }, "config": { "platform": { - "php": "7.4" + "php": "8.0" } } } diff --git a/docs/topics/reading-and-writing-to-file.md b/docs/topics/reading-and-writing-to-file.md index 5e001e83c0..4db05608c6 100644 --- a/docs/topics/reading-and-writing-to-file.md +++ b/docs/topics/reading-and-writing-to-file.md @@ -541,7 +541,7 @@ function constructorCallback(\PhpOffice\PhpSpreadsheet\Reader\Csv $reader): void $reader->setDelimiter(','); $reader->setEnclosure('"'); // Following represents how Excel behaves better than the default escape character - $reader->setEscapeCharacter((version_compare(PHP_VERSION, '7.4') < 0) ? "\x0" : ''); + $reader->setEscapeCharacter(''); } \PhpOffice\PhpSpreadsheet\Reader\Csv::setConstructorCallback('constructorCallback'); diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index eff03914e8..5243681117 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -24,3 +24,8 @@ parameters: message: "#^Strict comparison using \\=\\=\\= between PhpOffice\\\\PhpSpreadsheet\\\\Calculation\\\\FormulaToken and null will always evaluate to false\\.$#" count: 1 path: src/PhpSpreadsheet/Calculation/FormulaParser.php + + - + message: "#^Binary operation \"/\" between float and array\\|float\\|int\\|string results in an error\\.$#" + count: 1 + path: src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php diff --git a/phpstan-conditional.php b/phpstan-conditional.php deleted file mode 100644 index 9b1150b34c..0000000000 --- a/phpstan-conditional.php +++ /dev/null @@ -1,86 +0,0 @@ - '~^Method .* has invalid return type GdImage\.$~', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Shared/Drawing.php', - 'count' => 1, - ]; - $config['parameters']['ignoreErrors'][] = [ - 'message' => '~^Property .* has unknown class GdImage as its type\.$~', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php', - 'count' => 1, - ]; - $config['parameters']['ignoreErrors'][] = [ - 'message' => '~^Method .* has invalid return type GdImage\.$~', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php', - 'count' => 1, - ]; - $config['parameters']['ignoreErrors'][] = [ - 'message' => '~^Parameter .* of method .* has invalid type GdImage\.$~', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Worksheet/MemoryDrawing.php', - 'count' => 1, - ]; - $config['parameters']['ignoreErrors'][] = [ - 'message' => '~^Class GdImage not found\.$~', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Writer/Xls/Worksheet.php', - 'count' => 1, - ]; - $config['parameters']['ignoreErrors'][] = [ - 'message' => '~^Parameter .* of method .* has invalid type GdImage\.$~', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Writer/Xls/Worksheet.php', - 'count' => 1, - ]; - // GdImage with Phpstan 1.9.2 - $config['parameters']['ignoreErrors'][] = [ - 'message' => '~Class GdImage not found.*$~', - 'path' => __DIR__ . '/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php', - 'count' => 3, - ]; - // Erroneous analysis by Phpstan before PHP8 - 3rd parameter is nullable - // Fixed for Php7 with Phpstan 1.9. - //$config['parameters']['ignoreErrors'][] = [ - // 'message' => '#^Parameter \\#3 \\$namespace of method XMLWriter\\:\\:startElementNs\\(\\) expects string, null given\\.$#', - // 'path' => __DIR__ . '/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php', - // 'count' => 8, - //]; - // Erroneous analysis by Phpstan before PHP8 - mb_strlen does not return false - $config['parameters']['ignoreErrors'][] = [ - 'message' => '#^Method PhpOffice\\\\PhpSpreadsheet\\\\Shared\\\\StringHelper\\:\\:countCharacters\\(\\) should return int but returns int(<0, max>)?\\|false\\.$#', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Shared/StringHelper.php', - 'count' => 1, - ]; - // New with Phpstan 1.9.2 for Php7 only - $config['parameters']['ignoreErrors'][] = [ - 'message' => '#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, array\\|false given.$#', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Calculation/LookupRef/Sort.php', - 'count' => 1, - ]; - $config['parameters']['ignoreErrors'][] = [ - 'message' => '#^Parameter \\#1 \\$input of function array_chunk expects array, array\\|false given.$#', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Calculation/MathTrig/MatrixFunctions.php', - 'count' => 1, - ]; - $config['parameters']['ignoreErrors'][] = [ - 'message' => '#^Parameter \\#2 \\$array of function array_map expects array, array\\|false given.$#', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Calculation/MathTrig/Random.php', - 'count' => 1, - ]; - $config['parameters']['ignoreErrors'][] = [ - 'message' => '#^Parameter \\#2 \\.\\.\\.\\$args of function array_merge expects array, array\\|false given.$#', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Calculation/TextData/Text.php', - 'count' => 1, - ]; -} else { - // Flagged in Php8+ - unsure how to correct code - $config['parameters']['ignoreErrors'][] = [ - 'message' => '#^Binary operation "/" between float and array[|]float[|]int[|]string results in an error.#', - 'path' => __DIR__ . '/src/PhpSpreadsheet/Calculation/MathTrig/Combinations.php', - 'count' => 1, - ]; -} - -return $config; diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 52de758037..b894ce1381 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,6 +1,5 @@ includes: - phpstan-baseline.neon - - phpstan-conditional.php - vendor/phpstan/phpstan-phpunit/extension.neon - vendor/phpstan/phpstan-phpunit/rules.neon diff --git a/phpunit10.xml.dist b/phpunit10.xml.dist deleted file mode 100644 index 207d8ec978..0000000000 --- a/phpunit10.xml.dist +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - ./tests/PhpSpreadsheetTests - - - - ./src - - - diff --git a/samples/index.php b/samples/index.php index a51a3d7fde..cd966dc72a 100644 --- a/samples/index.php +++ b/samples/index.php @@ -3,7 +3,7 @@ require_once 'Header.php'; $requirements = [ - 'PHP 7.4.0' => version_compare(PHP_VERSION, '7.4.0', '>='), + 'PHP 8.0' => version_compare(PHP_VERSION, '8.0', '>='), 'PHP extension XML' => extension_loaded('xml'), 'PHP extension xmlwriter' => extension_loaded('xmlwriter'), 'PHP extension mbstring' => extension_loaded('mbstring'), diff --git a/src/PhpSpreadsheet/Calculation/LookupRef/Sort.php b/src/PhpSpreadsheet/Calculation/LookupRef/Sort.php index ff78fbea86..8f90f18ced 100644 --- a/src/PhpSpreadsheet/Calculation/LookupRef/Sort.php +++ b/src/PhpSpreadsheet/Calculation/LookupRef/Sort.php @@ -228,7 +228,6 @@ private static function processSortBy(array $sortArray, array $sortIndex, $sortO $sortArguments[] = self::prepareSortVectorValues($sortValues); $sortArguments[] = $sortOrder[$index] === self::ORDER_ASCENDING ? SORT_ASC : SORT_DESC; } - $sortArguments = self::applyPHP7Patch($sortArray, $sortArguments); $sortVector = self::executeVectorSortQuery($sortData, $sortArguments); @@ -272,7 +271,6 @@ private static function buildVectorForSort(array $sortArray, array $sortIndex, a $sortArguments[] = self::prepareSortVectorValues($sortValues); $sortArguments[] = $sortOrder[$index] === self::ORDER_ASCENDING ? SORT_ASC : SORT_DESC; } - $sortArguments = self::applyPHP7Patch($sortArray, $sortArguments); $sortData = self::executeVectorSortQuery($sortData, $sortArguments); @@ -322,21 +320,4 @@ private static function sortLookupArrayFromVector(array $sortArray, array $sortV // // return $lookupArray; } - - /** - * Hack to handle PHP 7: - * From PHP 8.0.0, If two members compare as equal in a sort, they retain their original order; - * but prior to PHP 8.0.0, their relative order in the sorted array was undefined. - * MS Excel replicates the PHP 8.0.0 behaviour, retaining the original order of matching elements. - * To replicate that behaviour with PHP 7, we add an extra sort based on the row index. - */ - private static function applyPHP7Patch(array $sortArray, array $sortArguments): array - { - if (PHP_VERSION_ID < 80000) { - $sortArguments[] = range(1, count($sortArray)); - $sortArguments[] = SORT_ASC; - } - - return $sortArguments; - } } diff --git a/src/PhpSpreadsheet/Reader/Security/XmlScanner.php b/src/PhpSpreadsheet/Reader/Security/XmlScanner.php index f8eaf39d09..ae602bab4a 100644 --- a/src/PhpSpreadsheet/Reader/Security/XmlScanner.php +++ b/src/PhpSpreadsheet/Reader/Security/XmlScanner.php @@ -6,35 +6,14 @@ class XmlScanner { - /** - * String used to identify risky xml elements. - * - * @var string - */ - private $pattern; + private string $pattern; /** @var ?callable */ private $callback; - /** @var ?bool */ - private static $libxmlDisableEntityLoaderValue; - - /** - * @var bool - */ - private static $shutdownRegistered = false; - public function __construct(string $pattern = 'pattern = $pattern; - - $this->disableEntityLoaderCheck(); - - // A fatal error will bypass the destructor, so we register a shutdown here - if (!self::$shutdownRegistered) { - self::$shutdownRegistered = true; - register_shutdown_function([__CLASS__, 'shutdown']); - } } public static function getInstance(Reader\IReader $reader): self @@ -46,72 +25,25 @@ public static function getInstance(Reader\IReader $reader): self /** * @codeCoverageIgnore + * + * @deprecated this has no effect at all and always return false. All usages must be removed. */ public static function threadSafeLibxmlDisableEntityLoaderAvailability(): bool { - if (PHP_MAJOR_VERSION === 7) { - switch (PHP_MINOR_VERSION) { - case 2: - return PHP_RELEASE_VERSION >= 1; - case 1: - return PHP_RELEASE_VERSION >= 13; - case 0: - return PHP_RELEASE_VERSION >= 27; - } - - return true; - } - return false; } - /** - * @codeCoverageIgnore - */ - private function disableEntityLoaderCheck(): void - { - if (\PHP_VERSION_ID < 80000) { - $libxmlDisableEntityLoaderValue = libxml_disable_entity_loader(true); - - if (self::$libxmlDisableEntityLoaderValue === null) { - self::$libxmlDisableEntityLoaderValue = $libxmlDisableEntityLoaderValue; - } - } - } - - /** - * @codeCoverageIgnore - */ - public static function shutdown(): void - { - if (self::$libxmlDisableEntityLoaderValue !== null && \PHP_VERSION_ID < 80000) { - libxml_disable_entity_loader(self::$libxmlDisableEntityLoaderValue); - self::$libxmlDisableEntityLoaderValue = null; - } - } - - public function __destruct() - { - self::shutdown(); - } - public function setAdditionalCallback(callable $callback): void { $this->callback = $callback; } - /** @param mixed $arg */ - private static function forceString($arg): string + private static function forceString(mixed $arg): string { return is_string($arg) ? $arg : ''; } - /** - * @param string $xml - * - * @return string - */ - private function toUtf8($xml) + private function toUtf8(string $xml): string { $pattern = '/encoding="(.*?)"/'; $result = preg_match($pattern, $xml, $matches); @@ -134,13 +66,10 @@ private function toUtf8($xml) * Scan the XML for use of disableEntityLoaderCheck(); $xml = $this->toUtf8($xml); @@ -160,12 +89,8 @@ public function scan($xml) /** * Scan theXML for use of scan(file_get_contents($filestream)); } diff --git a/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php b/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php index bc406e652a..5cf62efd85 100644 --- a/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php +++ b/src/PhpSpreadsheet/Reader/Xlsx/AutoFilter.php @@ -34,8 +34,7 @@ public function load(): void { // Remove all "$" in the auto filter range $attrs = $this->worksheetXml->autoFilter->attributes() ?? []; - // Mysterious 'Node no longer exists' warning for Php7.4 only. - $autoFilterRange = (string) @preg_replace('/\$/', '', $attrs['ref'] ?? ''); + $autoFilterRange = (string) preg_replace('/\$/', '', $attrs['ref'] ?? ''); if (strpos($autoFilterRange, ':') !== false) { $this->readAutoFilter($autoFilterRange); } diff --git a/src/PhpSpreadsheet/Settings.php b/src/PhpSpreadsheet/Settings.php index d8007fd009..214865afdf 100644 --- a/src/PhpSpreadsheet/Settings.php +++ b/src/PhpSpreadsheet/Settings.php @@ -174,9 +174,7 @@ public static function getCache(): CacheInterface public static function useSimpleCacheVersion3(): bool { - return - PHP_MAJOR_VERSION === 8 && - (new ReflectionClass(CacheInterface::class))->getMethod('get')->getReturnType() !== null; + return (new ReflectionClass(CacheInterface::class))->getMethod('get')->getReturnType() !== null; } /** diff --git a/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php b/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php index c14d385327..eb7bd55b57 100644 --- a/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php +++ b/src/PhpSpreadsheet/Style/NumberFormat/Wizard/Accounting.php @@ -45,12 +45,6 @@ public function __construct( */ protected function getLocaleFormat(): string { - if (version_compare(PHP_VERSION, '7.4.1', '<')) { - // @codeCoverageIgnoreStart - throw new Exception('The Intl extension does not support Accounting Formats below PHP 7.4.1'); - // @codeCoverageIgnoreEnd - } - if (self::icuVersion() < 53.0) { // @codeCoverageIgnoreStart throw new Exception('The Intl extension does not support Accounting Formats without ICU 53'); diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvCallbackTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvCallbackTest.php index c27d3b71ff..46f4a52774 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvCallbackTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvCallbackTest.php @@ -36,7 +36,7 @@ public function callbackSetFallbackEncoding(Csv $reader): void { $reader->setFallbackEncoding('ISO-8859-2'); $reader->setInputEncoding(Csv::GUESS_ENCODING); - $reader->setEscapeCharacter((version_compare(PHP_VERSION, '7.4') < 0) ? "\x0" : ''); + $reader->setEscapeCharacter(''); } public function testFallbackEncodingDefltIso2(): void diff --git a/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php b/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php index 062f4f7d9d..8a0308a4e0 100644 --- a/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Csv/CsvTest.php @@ -248,7 +248,7 @@ public static function providerEscapes(): array return [ ['\\', ';'], ["\x0", ','], - [(version_compare(PHP_VERSION, '7.4') < 0) ? "\x0" : '', ','], + ['', ','], ]; } diff --git a/tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php b/tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php index 26906c094b..046ff1860c 100644 --- a/tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php +++ b/tests/PhpSpreadsheetTests/Reader/Security/XmlScannerTest.php @@ -11,14 +11,6 @@ class XmlScannerTest extends TestCase { - protected function setUp(): void - { - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (\PHP_VERSION_ID < 80000) { - libxml_disable_entity_loader(false); - } - } - /** * @dataProvider providerValidXML * @@ -27,19 +19,9 @@ protected function setUp(): void */ public function testValidXML($filename, $expectedResult, bool $libxmlDisableEntityLoader): void { - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (\PHP_VERSION_ID < 80000) { - $oldDisableEntityLoaderState = libxml_disable_entity_loader($libxmlDisableEntityLoader); - } - $reader = XmlScanner::getInstance(new \PhpOffice\PhpSpreadsheet\Reader\Xml()); $result = $reader->scanFile($filename); self::assertEquals($expectedResult, $result); - - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (isset($oldDisableEntityLoaderState)) { - libxml_disable_entity_loader($oldDisableEntityLoaderState); - } } public static function providerValidXML(): array @@ -66,19 +48,10 @@ public function testInvalidXML($filename, bool $libxmlDisableEntityLoader): void { $this->expectException(\PhpOffice\PhpSpreadsheet\Reader\Exception::class); - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (\PHP_VERSION_ID < 80000) { - libxml_disable_entity_loader($libxmlDisableEntityLoader); - } - $reader = XmlScanner::getInstance(new \PhpOffice\PhpSpreadsheet\Reader\Xml()); $expectedResult = 'FAILURE: Should throw an Exception rather than return a value'; $result = $reader->scanFile($filename); self::assertEquals($expectedResult, $result); - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (\PHP_VERSION_ID < 80000) { - self::assertEquals($libxmlDisableEntityLoader, libxml_disable_entity_loader()); - } } public static function providerInvalidXML(): array diff --git a/tests/PhpSpreadsheetTests/SettingsTest.php b/tests/PhpSpreadsheetTests/SettingsTest.php index a27bb8d093..146ddfe135 100644 --- a/tests/PhpSpreadsheetTests/SettingsTest.php +++ b/tests/PhpSpreadsheetTests/SettingsTest.php @@ -8,26 +8,8 @@ class SettingsTest extends TestCase { - /** - * @var bool - */ - private $prevValue; - - protected function setUp(): void - { - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (\PHP_VERSION_ID < 80000) { - $this->prevValue = libxml_disable_entity_loader(); - libxml_disable_entity_loader(false); // Enable entity loader - } - } - protected function tearDown(): void { - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (\PHP_VERSION_ID < 80000) { - libxml_disable_entity_loader($this->prevValue); - } Settings::setCache(null); } @@ -35,10 +17,6 @@ public function testGetXMLSettings(): void { $result = Settings::getLibXmlLoaderOptions(); self::assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR) & $result)); - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (\PHP_VERSION_ID < 80000) { - self::assertFalse(libxml_disable_entity_loader()); - } } public function testSetXMLSettings(): void @@ -47,10 +25,6 @@ public function testSetXMLSettings(): void Settings::setLibXmlLoaderOptions(LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID); $result = Settings::getLibXmlLoaderOptions(); self::assertTrue((bool) ((LIBXML_DTDLOAD | LIBXML_DTDATTR | LIBXML_DTDVALID) & $result)); - // php 8.+ deprecated libxml_disable_entity_loader() - It's on by default - if (\PHP_VERSION_ID < 80000) { - self::assertFalse(libxml_disable_entity_loader()); - } Settings::setLibXmlLoaderOptions($original); } diff --git a/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php b/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php index b6139b3d55..dd992dae1c 100644 --- a/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php +++ b/tests/PhpSpreadsheetTests/Worksheet/MemoryDrawingTest.php @@ -28,12 +28,8 @@ public function testMemoryDrawing(): void $drawing->setRenderingFunction(MemoryDrawing::RENDERING_PNG); $drawing->setMimeType(MemoryDrawing::MIMETYPE_PNG); - if (version_compare(PHP_VERSION, '8.0.0', '>=') === true) { - self::assertIsObject($drawing->getImageResource()); - self::assertInstanceOf(GdImage::class, $drawing->getImageResource()); - } else { - self::assertIsResource($drawing->getImageResource()); - } + self::assertIsObject($drawing->getImageResource()); + self::assertInstanceOf(GdImage::class, $drawing->getImageResource()); self::assertSame(MemoryDrawing::MIMETYPE_DEFAULT, $drawing->getMimeType()); self::assertSame(MemoryDrawing::RENDERING_DEFAULT, $drawing->getRenderingFunction()); @@ -49,12 +45,8 @@ public function testMemoryDrawingFromString(): void } $drawing = MemoryDrawing::fromString($imageString); - if (version_compare(PHP_VERSION, '8.0.0', '>=') === true) { - self::assertIsObject($drawing->getImageResource()); - self::assertInstanceOf(GdImage::class, $drawing->getImageResource()); - } else { - self::assertIsResource($drawing->getImageResource()); - } + self::assertIsObject($drawing->getImageResource()); + self::assertInstanceOf(GdImage::class, $drawing->getImageResource()); self::assertSame(MemoryDrawing::MIMETYPE_JPEG, $drawing->getMimeType()); self::assertSame(MemoryDrawing::RENDERING_JPEG, $drawing->getRenderingFunction()); @@ -80,12 +72,8 @@ public function testMemoryDrawingFromStream(): void $drawing = MemoryDrawing::fromStream($imageStream); fclose($imageStream); - if (version_compare(PHP_VERSION, '8.0.0', '>=') === true) { - self::assertIsObject($drawing->getImageResource()); - self::assertInstanceOf(GdImage::class, $drawing->getImageResource()); - } else { - self::assertIsResource($drawing->getImageResource()); - } + self::assertIsObject($drawing->getImageResource()); + self::assertInstanceOf(GdImage::class, $drawing->getImageResource()); self::assertSame(MemoryDrawing::MIMETYPE_JPEG, $drawing->getMimeType()); self::assertSame(MemoryDrawing::RENDERING_JPEG, $drawing->getRenderingFunction());