From 62693c6bd8060d32fcbf3775d4c1e56498dbf2c7 Mon Sep 17 00:00:00 2001 From: Jan Nedbal Date: Fri, 13 Jun 2025 17:32:18 +0200 Subject: [PATCH 1/2] Drop deprecated assert.exception --- phpunit.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/phpunit.xml b/phpunit.xml index f4beeb21..93b7e4c7 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -13,9 +13,6 @@ xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" convertDeprecationsToExceptions="true" > - - - ./src From ca4aeaf6b8e687a8beb2aefd7e5cbe4bbfc1cecc Mon Sep 17 00:00:00 2001 From: Jan Nedbal Date: Fri, 13 Jun 2025 17:39:58 +0200 Subject: [PATCH 2/2] Direct call, but muted --- phpstan.neon | 3 +++ tests/bootstrap.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/phpstan.neon b/phpstan.neon index efbf455d..eecac9c2 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -44,6 +44,9 @@ parameters: - message: '#^Call to function method_exists\(\) with ''Doctrine\\\\ORM\\\\EntityManager'' and ''create'' will always evaluate to true\.$#' path: src/Doctrine/Mapping/ClassMetadataFactory.php + - + message: '#^Call to function ini_set\(\) with deprecated option ''assert\.exception''\.$#' + path: tests/bootstrap.php - message: '#^Call to function method_exists\(\) with Doctrine\\DBAL\\Connection and ''getNativeConnection'' will always evaluate to true\.$#' # needed for older DBAL versions diff --git a/tests/bootstrap.php b/tests/bootstrap.php index edf6599d..7994f793 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -4,6 +4,8 @@ require_once __DIR__ . '/../vendor/autoload.php'; +@ini_set('assert.exception', '0'); // @ deprecated in PHP 8.3 + PHPStanTestCase::getContainer(); require_once __DIR__ . '/orm-3-bootstrap.php';