summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2016-10-27 11:28:18 +0200
committerRemi Collet <fedora@famillecollet.com>2016-10-27 11:28:18 +0200
commit83fc72cebf5a7a043ac7a9dec544ce4e454cac51 (patch)
tree317506eed25ea58de835af64590ddf57a45621de
parent4e7fb7cd2f53aa0fd95b7dcd8548918a2ed149d5 (diff)
php-icewind-streams: 0.5.1
-rw-r--r--php-icewind-streams-autoload.php12
-rw-r--r--php-icewind-streams.spec30
2 files changed, 25 insertions, 17 deletions
diff --git a/php-icewind-streams-autoload.php b/php-icewind-streams-autoload.php
index a0bcd01..ecbb3df 100644
--- a/php-icewind-streams-autoload.php
+++ b/php-icewind-streams-autoload.php
@@ -1,15 +1,7 @@
<?php
/* Autoloader for icewind/streams and its dependencies */
-$vendorDir = '/usr/share/php';
-// Use Symfony autoloader
-if (!isset($fedoraClassLoader) || !($fedoraClassLoader instanceof \Symfony\Component\ClassLoader\ClassLoader)) {
- if (!class_exists('Symfony\\Component\\ClassLoader\\ClassLoader', false)) {
- require_once $vendorDir . '/Symfony/Component/ClassLoader/ClassLoader.php';
- }
+require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
- $fedoraClassLoader = new \Symfony\Component\ClassLoader\ClassLoader();
- $fedoraClassLoader->register();
-}
+\Fedora\Autoloader\Autoload::addPsr4('Icewind\\Streams\\', __DIR__);
-$fedoraClassLoader->addPrefix('Icewind\\Streams\\', dirname(dirname(__DIR__)));
diff --git a/php-icewind-streams.spec b/php-icewind-streams.spec
index d9ee5ae..f69a92b 100644
--- a/php-icewind-streams.spec
+++ b/php-icewind-streams.spec
@@ -7,7 +7,7 @@
# Please, preserve the changelog entries
#
# Github information
-%global gh_commit d3620e8dc410c86c2ba55579803679c4e0b289ac
+%global gh_commit 0700f81441200b33d929c108b9ee6d76b0104fa2
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner icewind1991
%global gh_project Streams
@@ -19,7 +19,7 @@
%global ns_name Streams
Name: php-%{pk_vendor}-%{pk_name}
-Version: 0.4.1
+Version: 0.5.1
Release: 1%{?dist}
Summary: A set of generic stream wrappers
@@ -39,7 +39,7 @@ BuildRequires: php(language) >= 5.3
BuildRequires: php-composer(phpunit/phpunit) >= 4.8
BuildRequires: php-composer(theseer/autoload)
# Autoloader
-BuildRequires: php-composer(symfony/class-loader)
+BuildRequires: php-composer(fedora/autoloader)
# From composer.json, "require": {
# "php": ">=5.3"
@@ -47,7 +47,7 @@ Requires: php(language) >= 5.3
# From phpcompatinfo report for version 0.2.0
Requires: php-spl
# Autoloader
-Requires: php-composer(symfony/class-loader)
+Requires: php-composer(fedora/autoloader)
Provides: php-composer(%{pk_vendor}/%{pk_name}) = %{version}
@@ -84,11 +84,23 @@ cd tests
echo "require '%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_name}/autoload.php';" >> bootstrap.php
: Run the test suite
+# remirepo:11
+run=0
+ret=0
+if which php56; then
+ php56 %{_bindir}/phpunit || ret=1
+ run=1
+fi
+if which php71; then
+ php71 %{_bindir}/phpunit || ret=1
+ run=1
+fi
+if [ $run -eq 0 ]; then
%{_bindir}/phpunit --verbose
-
-if which php70; then
- php70 %{_bindir}/phpunit --verbose
+# remirepo:2
fi
+exit $ret
+
%clean
rm -rf %{buildroot}
@@ -105,6 +117,10 @@ rm -rf %{buildroot}
%changelog
+* Thu Oct 27 2016 Remi Collet <remi@fedoraproject.org> - 0.5.1-1
+- update to 0.5.1
+- switch from symfony/class-loader to fedora/autoloader
+
* Fri Jun 3 2016 Remi Collet <remi@fedoraproject.org> - 0.4.1-1
- update to 0.4.1