summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-12-08 14:12:25 +0100
committerRemi Collet <remi@remirepo.net>2020-12-08 14:12:25 +0100
commit34f8ddeb799b1b4fd7824fdff7000465480f5654 (patch)
tree8a7936b55b70878fc7c2f2307f98bcb0fd3fe66e
parentc330eef5968241bf185dab625523d9ea5438e11a (diff)
don't register autoloader twice, e.g. by doctrine/dbal v3
-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