summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--php-endroid-qrcode.spec20
1 files changed, 11 insertions, 9 deletions
diff --git a/php-endroid-qrcode.spec b/php-endroid-qrcode.spec
index 2745b1d..6d7291c 100644
--- a/php-endroid-qrcode.spec
+++ b/php-endroid-qrcode.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-endroid-qrcode
#
-# Copyright (c) 2017 Remi Collet
+# Copyright (c) 2017-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
@@ -21,7 +21,7 @@
Name: php-%{pk_vendor}-%{pk_project}
Version: 1.9.3
-Release: 1%{?dist}
+Release: 3%{?dist}
Summary: Endroid QR Code
Group: Development/Libraries
@@ -113,15 +113,14 @@ find . -type f -exec chmod -x {} \;
cat << 'EOF' | tee src/autoload.php
<?php
/* Autoloader for %{name} and its dependencies */
-require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
+require_once '%{php_home}/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Autoload::addPsr4('%{ns_vendor}\\%{ns_project}\\', __DIR__);
-\Fedora\Autoloader\Dependencies::required([
- [
- '%{php_home}/Symfony3/Component/OptionsResolver/autoload.php',
- '%{php_home}/Symfony/Component/OptionsResolver/autoload.php',
- ],
-]);
+if (file_exists('%{php_home}/Symfony3/Component/OptionsResolver/autoload.php')) {
+ \Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\', '%{php_home}/Symfony3/Component');
+} else {
+ \Fedora\Autoloader\Autoload::addPsr4('Symfony\\Component\\', '%{php_home}/Symfony/Component');
+}
EOF
@@ -173,5 +172,8 @@ exit $ret
%{php_home}/%{ns_vendor}/%{ns_project}
%changelog
+* Mon Jan 15 2018 Remi Collet <remi@remirepo.net> - 1.9.3-2
+- simpler autoloader for Symfony
+
* Tue Jun 27 2017 Remi Collet <remi@remirepo.net> - 1.9.3-1
- initial package, version 1.9.3