summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-07-02 11:55:14 +0200
committerRemi Collet <fedora@famillecollet.com>2016-07-02 11:55:14 +0200
commitf519456c16fb4bfdf99841977dfefdc71db824bd (patch)
tree453c760eff671772de40dc97d2ed438ae828e95a
parent81a83bf528944f11077760fddcc139dc86574757 (diff)
php-zendframework-zend-loader: load container-interop and psr/http-message when present
-rw-r--r--php-zendframework-zend-loader-autoload.php9
-rw-r--r--php-zendframework-zend-loader.spec5
2 files changed, 13 insertions, 1 deletions
diff --git a/php-zendframework-zend-loader-autoload.php b/php-zendframework-zend-loader-autoload.php
index e5b7d43..e69359d 100644
--- a/php-zendframework-zend-loader-autoload.php
+++ b/php-zendframework-zend-loader-autoload.php
@@ -24,4 +24,13 @@ if (defined('RPM_BUILDROOT')) {
foreach(glob(__DIR__ . '/*-autoload.php') as $dep) {
require_once $dep;
}
+// Common optional dependencies
+foreach ([
+ '/usr/share/php/Psr/Http/Message/autoload.php',
+ '/usr/share/php/Interop/Container/autoload.php',
+] as $dep) {
+ if (file_exists($dep)) {
+ require_once($dep);
+ }
+}
diff --git a/php-zendframework-zend-loader.spec b/php-zendframework-zend-loader.spec
index d461731..ae1c070 100644
--- a/php-zendframework-zend-loader.spec
+++ b/php-zendframework-zend-loader.spec
@@ -16,7 +16,7 @@
Name: php-%{gh_owner}-%{gh_project}
Version: 2.5.1
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Zend Framework %{library} component
Group: Development/Libraries
@@ -100,6 +100,9 @@ rm -rf %{buildroot}
%changelog
+* Sat Jul 2 2016 Remi Collet <remi@fedoraproject.org> - 2.5.1-4
+- load container-interop and psr/http-message when present
+
* Mon May 2 2016 Remi Collet <remi@fedoraproject.org> - 2.5.1-3
- load dependencies out of Zend namespaces