summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-doctrine-dbal3.spec10
1 files changed, 7 insertions, 3 deletions
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 <remi@remirepo.net> - 3.0.0-2
+- don't register autoloader twice, e.g. by doctrine/dbal v3
+
* Mon Nov 16 2020 Remi Collet <remi@remirepo.net> - 3.0.0-1
- update to 3.0.0
- rename to php-doctrine-dbal3