From 34f8ddeb799b1b4fd7824fdff7000465480f5654 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 8 Dec 2020 14:12:25 +0100 Subject: don't register autoloader twice, e.g. by doctrine/dbal v3 --- php-doctrine-dbal3.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'php-doctrine-dbal3.spec') diff --git a/php-doctrine-dbal3.spec b/php-doctrine-dbal3.spec index c42bc1c..c4fbc3a 100644 --- a/php-doctrine-dbal3.spec +++ b/php-doctrine-dbal3.spec @@ -39,7 +39,7 @@ Name: php-%{composer_vendor}-%{composer_project}%{major} Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 2%{?github_release}%{?dist} Summary: Doctrine Database Abstraction Layer (DBAL) version %{major} License: MIT @@ -154,8 +154,9 @@ cat <<'AUTOLOAD' | tee src/autoload.php */ require_once '%{phpdir}/Fedora/Autoloader/autoload.php'; -\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\DBAL\\', __DIR__); - +if (!class_exists('Doctrine\\DBAL\\Connection')) { + \Fedora\Autoloader\Autoload::addPsr4('Doctrine\\DBAL\\', __DIR__); +} \Fedora\Autoloader\Dependencies::required(array( '%{phpdir}/Doctrine/Common/Cache/autoload.php', '%{phpdir}/Doctrine/Common/EventManager/autoload.php', @@ -219,6 +220,9 @@ exit $RETURN_CODE %changelog +* Tue Dec 8 2020 Remi Collet - 3.0.0-2 +- don't register autoloader twice, e.g. by doctrine/dbal v3 + * Mon Nov 16 2020 Remi Collet - 3.0.0-1 - update to 3.0.0 - rename to php-doctrine-dbal3 -- cgit