summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--composer.json4
-rw-r--r--php-jeremeamia-superclosure-autoload.php1
-rw-r--r--php-jeremeamia-superclosure.spec61
4 files changed, 41 insertions, 34 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..6f69818
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+clog
+package-*.xml
+*.tgz
+*.tar.gz
+*.tar.bz2
+*.tar.xz
+*.tar.xz.asc
+*.src.rpm
+*/*rpm
diff --git a/composer.json b/composer.json
index 8738a99..2ffab22 100644
--- a/composer.json
+++ b/composer.json
@@ -15,7 +15,7 @@
],
"require": {
"php": ">=5.4",
- "nikic/php-parser": "^1.2|^2.0|^3.0",
+ "nikic/php-parser": "^1.2|^2.0|^3.0|^4.0",
"symfony/polyfill-php56": "^1.0"
},
"require-dev": {
@@ -33,7 +33,7 @@
},
"extra": {
"branch-alias": {
- "dev-master": "2.3-dev"
+ "dev-master": "2.4-dev"
}
}
}
diff --git a/php-jeremeamia-superclosure-autoload.php b/php-jeremeamia-superclosure-autoload.php
index aff7235..53233e0 100644
--- a/php-jeremeamia-superclosure-autoload.php
+++ b/php-jeremeamia-superclosure-autoload.php
@@ -6,6 +6,7 @@ require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
\Fedora\Autoloader\Dependencies::required(array(
'/usr/share/php/Symfony/Polyfill/autoload.php',
array(
+ '/usr/share/php/PhpParser4/autoload.php',
'/usr/share/php/PhpParser3/autoload.php',
'/usr/share/php/PhpParser2/autoload.php',
'/usr/share/php/PhpParser/autoload.php',
diff --git a/php-jeremeamia-superclosure.spec b/php-jeremeamia-superclosure.spec
index 619461b..55e5f41 100644
--- a/php-jeremeamia-superclosure.spec
+++ b/php-jeremeamia-superclosure.spec
@@ -1,13 +1,13 @@
# remirepo/fedora spec file for php-jeremeamia-superclosure
#
-# Copyright (c) 2015-2017 Remi Collet
+# Copyright (c) 2015-2018 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
# Github
-%global gh_commit 443c3df3207f176a1b41576ee2a66968a507b3db
+%global gh_commit 5707d5821b30b9a07acfb4d76949784aaa0e9ce9
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner jeremeamia
%global gh_project super_closure
@@ -18,11 +18,10 @@
%global namespace SuperClosure
Name: php-%{pk_vendor}-%{pk_name}
-Version: 2.3.0
+Version: 2.4.0
Release: 1%{?dist}
Summary: Serialize Closure objects, including their context and binding
-Group: Development/Libraries
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: %{name}-%{version}-%{gh_short}.tgz
@@ -31,11 +30,15 @@ Source1: makesrc.sh
# Autoloader
Source2: %{name}-autoload.php
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: php(language) >= 5.4
-BuildRequires: php-composer(nikic/php-parser) >= 1.4
-BuildRequires: php-composer(symfony/polyfill-php56) >= 1.0
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+BuildRequires: (php-composer(nikic/php-parser) >= 1.4 with php-composer(nikic/php-parser) < 5)
+BuildRequires: (php-composer(symfony/polyfill-php56) >= 1.0 with php-composer(symfony/polyfill-php56) < 2)
+%else
+BuildRequires: php-nikic-php-parser3
+BuildRequires: php-symfony-polyfill
+%endif
# From composer.json, "require-dev": {
# "phpunit/phpunit": "^4.0|^5.0",
BuildRequires: php-composer(phpunit/phpunit) >= 4.0
@@ -44,14 +47,17 @@ BuildRequires: php-composer(fedora/autoloader)
# From composer.json, "require": {
# "php": ">=5.4",
-# "nikic/php-parser": "^1.2|^2.0|^3.0",
+# "nikic/php-parser": "^1.2|^2.0|^3.0|^4.0",
# "symfony/polyfill-php56": "^1.0"
# php-parser 1.4 for autoloader
Requires: php(language) >= 5.4
-Requires: php-composer(nikic/php-parser) >= 1.4
-Requires: php-composer(nikic/php-parser) < 4
-Requires: php-composer(symfony/polyfill-php56) >= 1.0
-Requires: php-composer(symfony/polyfill-php56) < 2
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(nikic/php-parser) >= 1.4 with php-composer(nikic/php-parser) < 5)
+Requires: (php-composer(symfony/polyfill-php56) >= 1.0 with php-composer(symfony/polyfill-php56) < 2)
+%else
+Requires: php-nikic-php-parser3
+Requires: php-symfony-polyfill
+%endif
# From phpcompatifo report for 2.1.0
Requires: php-hash
Requires: php-reflection
@@ -81,7 +87,6 @@ install -pm 644 %{SOURCE2} src/autoload.php
%install
-rm -rf %{buildroot}
# Restore PSR-0 tree
mkdir -p %{buildroot}%{_datadir}/php
cp -pr src %{buildroot}%{_datadir}/php/%{namespace}
@@ -97,29 +102,16 @@ require dirname(__DIR__) . '/tests/Integ/Fixture/Foo.php';
EOF
: Run the test suite
-# remirepo:11
ret=0
-run=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
-# remirepo:1
-fi
-
-
-%clean
-rm -rf %{buildroot}
+for cmd in php php70 php71 php72; do
+ if which $cmd; then
+ $cmd %{_bindir}/phpunit || ret=1
+ fi
+done
+exit $ret
%files
-%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license LICENSE.md
%doc README.md composer.json
@@ -127,6 +119,11 @@ rm -rf %{buildroot}
%changelog
+* Thu Mar 22 2018 Remi Collet <remi@remirepo.net> - 2.4.0-1
+- update to 2.4.0
+- use range dependencies on F28+ else package names
+- allow nikic/php-parser v4 (not yet available)
+
* Wed Dec 7 2016 Remi Collet <remi@fedoraproject.org> - 2.3.0-1
- update to 2.3.0
- switch to fedora/autoloader