From a76c9b82cd685ce76fbcb24ed14ebc7ff9d0fa18 Mon Sep 17 00:00:00 2001 From: oleibman <10341515+oleibman@users.noreply.github.com> Date: Wed, 17 Sep 2025 09:42:23 -0700 Subject: [PATCH] Upgrade Mitoteam to Beta Version I had been trapping its errors in test bootstrap, but that no longer seems to work. --- composer.json | 4 ++-- composer.lock | 19 ++++++++++--------- tests/bootstrap.php | 15 --------------- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/composer.json b/composer.json index bf03b9a79..ee387d26f 100644 --- a/composer.json +++ b/composer.json @@ -92,12 +92,12 @@ "dealerdirect/phpcodesniffer-composer-installer": "dev-main", "dompdf/dompdf": "^2.0 || ^3.0", "friendsofphp/php-cs-fixer": "^3.2", - "mitoteam/jpgraph": "^10.3", + "mitoteam/jpgraph": "^10.3 || 10.5.0-beta", "mpdf/mpdf": "^8.1.1", "phpcompatibility/php-compatibility": "^9.3", "phpstan/phpstan": "^1.1 || ^2.0", - "phpstan/phpstan-phpunit": "^1.0 || ^2.0", "phpstan/phpstan-deprecation-rules": "^1.0 || ^2.0", + "phpstan/phpstan-phpunit": "^1.0 || ^2.0", "phpunit/phpunit": "^10.5", "squizlabs/php_codesniffer": "^3.7", "tecnickcom/tcpdf": "^6.5" diff --git a/composer.lock b/composer.lock index 7140b853f..a2bdc86ad 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": "eebf758015c7124f27782196c50a3253", + "content-hash": "ae3ca8dc19ef05c0d80ac18f51ccd4db", "packages": [ { "name": "composer/pcre", @@ -1227,16 +1227,16 @@ }, { "name": "mitoteam/jpgraph", - "version": "10.4.4", + "version": "10.5.0-beta", "source": { "type": "git", "url": "https://github.com/mitoteam/jpgraph.git", - "reference": "9ad8e2fcc30f765c788a28543e9705fb541d499f" + "reference": "2a9c57a91f8e9460af5ffafe780355890711f36f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mitoteam/jpgraph/zipball/9ad8e2fcc30f765c788a28543e9705fb541d499f", - "reference": "9ad8e2fcc30f765c788a28543e9705fb541d499f", + "url": "https://api.github.com/repos/mitoteam/jpgraph/zipball/2a9c57a91f8e9460af5ffafe780355890711f36f", + "reference": "2a9c57a91f8e9460af5ffafe780355890711f36f", "shasum": "" }, "require": { @@ -1269,16 +1269,16 @@ "role": "Composer package maintenance, PHP-compatibility patches" } ], - "description": "JpGraph library composer package with PHP 8.4 support", + "description": "JpGraph library composer package with PHP 8.5 support", "homepage": "https://github.com/mitoteam/jpgraph", "keywords": [ "jpgraph" ], "support": { "issues": "https://github.com/mitoteam/jpgraph/issues", - "source": "https://github.com/mitoteam/jpgraph/tree/10.4.4" + "source": "https://github.com/mitoteam/jpgraph/tree/10.5.0-beta" }, - "time": "2025-01-01T05:39:20+00:00" + "time": "2025-08-19T05:32:34+00:00" }, { "name": "mpdf/mpdf", @@ -5644,7 +5644,8 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { - "dealerdirect/phpcodesniffer-composer-installer": 20 + "dealerdirect/phpcodesniffer-composer-installer": 20, + "mitoteam/jpgraph": 10 }, "prefer-stable": false, "prefer-lowest": false, diff --git a/tests/bootstrap.php b/tests/bootstrap.php index d773f8cbd..79adbabc4 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -6,9 +6,6 @@ setlocale(LC_ALL, 'en_US.utf8'); function phpunit10ErrorHandler(int $errno, string $errstr, string $filename, int $lineno): bool { - if (strIncrement85(PHP_VERSION_ID, $errno, $errstr, $filename)) { - return true; // message suppressed - stop error handling - } $x = error_reporting() & $errno; if ( in_array( @@ -34,18 +31,6 @@ function phpunit10ErrorHandler(int $errno, string $errstr, string $filename, int return false; // continue error handling } -function strIncrement85(int $version, int $errno, string $errstr, string $filename): bool -{ - if ($version < 80500 || $errno !== E_DEPRECATED) { - return false; - } - if (preg_match('/canonical/', $errstr) === 1 && preg_match('/mitoteam/', $filename) === 1) { - return true; - } - - return false; -} - if (!method_exists(PHPUnit\Framework\TestCase::class, 'setOutputCallback')) { set_error_handler('phpunit10ErrorHandler'); }