summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2017-07-18 07:43:51 +0200
committerRemi Collet <remi@remirepo.net>2017-07-18 07:43:51 +0200
commit4b8438af9dac23be57543bd569e28aedf214e161 (patch)
tree63875c613ad85c07bb854e67acf190518766be6f
parent838ee2ccade3a65178d40a8655c44c4c82966fa2 (diff)
v0.4.0 from Fedora
-rw-r--r--composer.json2
-rw-r--r--php-phpdocumentor-type-resolver.spec27
2 files changed, 20 insertions, 9 deletions
diff --git a/composer.json b/composer.json
index abaa965..82ead15 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
{"name": "Mike van Riel", "email": "me@mikevanriel.com"}
],
"require": {
- "php": ">=5.5",
+ "php": "^5.5 || ^7.0",
"phpdocumentor/reflection-common": "^1.0"
},
"autoload": {
diff --git a/php-phpdocumentor-type-resolver.spec b/php-phpdocumentor-type-resolver.spec
index e1cd9f7..d3dc60e 100644
--- a/php-phpdocumentor-type-resolver.spec
+++ b/php-phpdocumentor-type-resolver.spec
@@ -12,13 +12,13 @@
%global github_owner phpDocumentor
%global github_name TypeResolver
-%global github_version 0.2.1
-%global github_commit e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb
+%global github_version 0.4.0
+%global github_commit 9c977708995954784726e25d0cd1dddf4e65b0f7
%global composer_vendor phpdocumentor
%global composer_project type-resolver
-# "php": ">=5.5"
+# "php": "^5.5 || ^7.0"
%global php_min_ver 5.5
# "mockery/mockery": "^0.9.4"
%global mockery_min_ver 0.9.4
@@ -40,7 +40,11 @@ Summary: A PSR-5 based resolver of Class names, Types and Structural Eleme
Group: Development/Libraries
License: MIT
URL: https://github.com/%{github_owner}/%{github_name}
-Source0: %{url}/archive/%{github_commit}/%{name}-%{github_version}-%{github_commit}.tar.gz
+
+# GitHub export does not include tests.
+# Run php-phpdocumentor-type-resolver-get-source.sh to create full source.
+Source0: %{name}-%{github_version}-%{github_commit}.tar.gz
+Source1: %{name}-get-source.sh
BuildArch: noarch
# Tests
@@ -52,7 +56,7 @@ BuildRequires: php-composer(mockery/mockery) >= %{mockery_min_ver}
BuildRequires: php-composer(phpdocumentor/reflection-common) < %{reflection_common_max_ver}
BuildRequires: php-composer(phpdocumentor/reflection-common) >= %{reflection_common_min_ver}
BuildRequires: php-composer(phpunit/phpunit)
-## phpcompatinfo (computed from version 0.2.1)
+## phpcompatinfo (computed from version 0.4.0)
BuildRequires: php-reflection
BuildRequires: php-spl
BuildRequires: php-tokenizer
@@ -64,7 +68,7 @@ BuildRequires: php-fedora-autoloader-devel
Requires: php(language) >= %{php_min_ver}
Requires: php-composer(phpdocumentor/reflection-common) >= %{reflection_common_min_ver}
Requires: php-composer(phpdocumentor/reflection-common) < %{reflection_common_max_ver}
-# phpcompatinfo (computed from version 0.2.1)
+# phpcompatinfo (computed from version 0.4.0)
Requires: php-spl
Requires: php-tokenizer
# Autoloader
@@ -135,9 +139,12 @@ sed 's#vendor/mockery/mockery/library#%{phpdir}#' phpunit.xml.dist > phpunit.xml
: Upstream tests
RETURN_CODE=0
+PHPUNIT=$(which phpunit)
for PHP_EXEC in php php56 php70 php71 php72; do
- if which $PHP_EXEC; then
- $PHP_EXEC %{_bindir}/phpunit --verbose --bootstrap bootstrap.php || RETURN_CODE=1
+ if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then
+ $PHP_EXEC -d auto_prepend_file=$PWD/bootstrap.php \
+ $PHPUNIT --verbose --bootstrap bootstrap.php \
+ || RETURN_CODE=1
fi
done
exit $RETURN_CODE
@@ -160,5 +167,9 @@ exit $RETURN_CODE
%changelog
+* Mon Jul 17 2017 Shawn Iwinski <shawn@iwin.ski> - 0.4.0-1
+- Update to 0.4.0 (RHBZ #1460503)
+- Add "get source" script because upstream attributes removed tests from snapshot
+
* Sat Mar 11 2017 Shawn Iwinski <shawn@iwin.ski> - 0.2.1-1
- Initial package