summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rw-r--r--composer.json16
-rwxr-xr-xphp-phpdocumentor-reflection-docblock4-get-source.sh (renamed from php-phpdocumentor-reflection-docblock-get-source.sh)0
-rw-r--r--php-phpdocumentor-reflection-docblock4.spec84
4 files changed, 73 insertions, 31 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13af741
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,4 @@
+SRCDIR := $(shell pwd)
+NAME := $(shell basename $(SRCDIR))
+include ../../../common/Makefile
+
diff --git a/composer.json b/composer.json
index 558046c..e3dc38a 100644
--- a/composer.json
+++ b/composer.json
@@ -10,9 +10,9 @@
}
],
"require": {
- "php": ">=5.5",
- "phpdocumentor/reflection-common": "^1.0@dev",
- "phpdocumentor/type-resolver": "^0.3.0",
+ "php": "^7.0",
+ "phpdocumentor/reflection-common": "^1.0.0",
+ "phpdocumentor/type-resolver": "^0.4.0",
"webmozart/assert": "^1.0"
},
"autoload": {
@@ -22,7 +22,13 @@
"psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]}
},
"require-dev": {
- "mockery/mockery": "^0.9.4",
- "phpunit/phpunit": "^4.4"
+ "mockery/mockery": "^1.0",
+ "phpunit/phpunit": "^6.4",
+ "doctrine/instantiator": "~1.0.5"
+ },
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.x-dev"
+ }
}
}
diff --git a/php-phpdocumentor-reflection-docblock-get-source.sh b/php-phpdocumentor-reflection-docblock4-get-source.sh
index 8cf51f1..8cf51f1 100755
--- a/php-phpdocumentor-reflection-docblock-get-source.sh
+++ b/php-phpdocumentor-reflection-docblock4-get-source.sh
diff --git a/php-phpdocumentor-reflection-docblock4.spec b/php-phpdocumentor-reflection-docblock4.spec
index 779e09d..4d391d7 100644
--- a/php-phpdocumentor-reflection-docblock4.spec
+++ b/php-phpdocumentor-reflection-docblock4.spec
@@ -1,6 +1,6 @@
-# Fedora/remirepo spec file for php-phpdocumentor-reflection-docblock
+# Fedora/remirepo spec file for php-phpdocumentor-reflection-docblock4
#
-# Copyright (c) 2017 Remi Collet, Shawn Iwinski
+# Copyright (c) 2017-2018 Remi Collet, Shawn Iwinski
# 2014-2015 Remi Collet
#
# License: CC-BY-SA
@@ -8,14 +8,15 @@
#
# Please, preserve the changelog entries
#
-%global gh_commit 4aada1f93c72c35e22fb1383b47fee43b8f1d157
+%global gh_commit 66465776cfc249844bde6d117abff1d22e06c2da
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner phpDocumentor
%global gh_project ReflectionDocBlock
+%global major 4
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
-Name: php-phpdocumentor-reflection-docblock
-Version: 3.2.2
+Name: php-phpdocumentor-reflection-docblock%{major}
+Version: 4.2.0
Release: 1%{?dist}
Summary: DocBlock parser
@@ -31,19 +32,31 @@ Source1: %{name}-get-source.sh
BuildArch: noarch
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
-BuildRequires: php(language) >= 5.5
+BuildRequires: php(language) >= 7.0
+%if 0%{?fedora} >= 27
+BuildRequires: (php-composer(phpdocumentor/reflection-common) >= 1.0 with php-composer(phpdocumentor/reflection-common) < 2)
+BuildRequires: (php-composer(phpdocumentor/type-resolver) >= 0.4.0 with php-composer(phpdocumentor/type-resolver) < 1.0)
+BuildRequires: (php-composer(webmozart/assert) >= 1.0 with php-composer(webmozart/assert) < 2)
+%else
BuildRequires: php-composer(phpdocumentor/reflection-common) < 2
BuildRequires: php-composer(phpdocumentor/reflection-common) >= 1.0
BuildRequires: php-composer(phpdocumentor/type-resolver) < 1.0
-BuildRequires: php-composer(phpdocumentor/type-resolver) >= 0.3.0
-BuildRequires: php-composer(phpunit/phpunit)
+BuildRequires: php-composer(phpdocumentor/type-resolver) >= 0.4.0
BuildRequires: php-composer(webmozart/assert) < 2
BuildRequires: php-composer(webmozart/assert) >= 1.0
+%endif
# From composer.json, require-dev
-# "mockery/mockery": "^0.9.4"
-BuildRequires: php-composer(mockery/mockery) < 1
-BuildRequires: php-composer(mockery/mockery) >= 0.9.4
-# From phpcompatinfo report for 3.2.1
+# "mockery/mockery": "^1.0",
+# "phpunit/phpunit": "^6.4",
+# "doctrine/instantiator": "~1.0.5"
+%if 0%{?fedora} >= 27
+BuildRequires: (php-composer(mockery/mockery) >= 1.0 with php-composer(mockery/mockery) < 2)
+%else
+BuildRequires: php-composer(mockery/mockery) < 2
+BuildRequires: php-composer(mockery/mockery) >= 1.0
+%endif
+BuildRequires: phpunit6 >= 6.4
+# From phpcompatinfo report for 4.2.0
BuildRequires: php-filter
BuildRequires: php-pcre
BuildRequires: php-reflection
@@ -51,17 +64,23 @@ BuildRequires: php-spl
%endif
# From composer.json, require
-# "php": ">=5.5"
-# "phpdocumentor/reflection-common": "^1.0@dev",
-# "phpdocumentor/type-resolver": "^0.3.0",
+# "php": ">=7.0"
+# "phpdocumentor/reflection-common": "^1.0.0",
+# "phpdocumentor/type-resolver": "^0.4.0",
# "webmozart/assert": "^1.0"
-Requires: php(language) >= 5.5
+Requires: php(language) >= 7.0
+%if 0%{?fedora} >= 27
+Requires: (php-composer(phpdocumentor/reflection-common) >= 1.0 with php-composer(phpdocumentor/reflection-common) < 2)
+Requires: (php-composer(phpdocumentor/type-resolver) >= 0.4.0 with php-composer(phpdocumentor/type-resolver) < 1.0)
+Requires: (php-composer(webmozart/assert) >= 1.0 with php-composer(webmozart/assert) < 2)
+%else
Requires: php-composer(phpdocumentor/reflection-common) < 2
Requires: php-composer(phpdocumentor/reflection-common) >= 1.0
Requires: php-composer(phpdocumentor/type-resolver) < 1
-Requires: php-composer(phpdocumentor/type-resolver) >= 0.3.0
+Requires: php-composer(phpdocumentor/type-resolver) >= 0.4.0
Requires: php-composer(webmozart/assert) < 2
Requires: php-composer(webmozart/assert) >= 1.0
+%endif
# From phpcompatinfo report for 3.2.1
Requires: php-filter
Requires: php-pcre
@@ -86,13 +105,18 @@ parser that is fully compatible with the PHPDoc standard.
With this component, a library can provide support for annotations via
DocBlocks or otherwise retrieve information that is embedded in a DocBlock.
+Autoloader: %{_datadir}/php/phpDocumentor/Reflection/DocBlock%{major}/autoload.php
+
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-sed 's#vendor/mockery/mockery/library#%{_datadir}/php#' phpunit.xml.dist \
+sed 's#vendor/mockery/mockery/library/Mockery#%{_datadir}/php/Mockery1#' phpunit.xml.dist \
> phpunit.xml
+# single directory tree
+mv src/*php src/DocBlock/
+
%build
phpab \
@@ -111,8 +135,8 @@ AUTOLOAD
%install
-mkdir -p %{buildroot}%{_datadir}/php/phpDocumentor
-cp -pr src %{buildroot}%{_datadir}/php/phpDocumentor/Reflection
+mkdir -p %{buildroot}%{_datadir}/php/phpDocumentor/Reflection
+cp -pr src/DocBlock %{buildroot}%{_datadir}/php/phpDocumentor/Reflection/DocBlock%{major}
%check
@@ -127,19 +151,19 @@ phpab \
cat <<BOOTSTRAP | tee -a bootstrap.php
\Fedora\Autoloader\Dependencies::required([
- '%{buildroot}%{_datadir}/php/phpDocumentor/Reflection/DocBlock/autoload.php',
- '%{_datadir}/php/Mockery/autoload.php',
+ '%{buildroot}%{_datadir}/php/phpDocumentor/Reflection/DocBlock%{major}/autoload.php',
+ '%{_datadir}/php/Mockery1/autoload.php',
]);
BOOTSTRAP
# use auto_prepend_file to ensure build version used first
RETURN_CODE=0
-for PHP_EXEC in php php56 php70 php71 php72; do
+for PHP_EXEC in php php70 php71 php72; do
if which $PHP_EXEC; then
$PHP_EXEC -d auto_prepend_file=$PWD/bootstrap.php \
- %{_bindir}/phpunit --verbose \
+ %{_bindir}/phpunit6 \
--bootstrap bootstrap.php \
- || RETURN_CODE=1
+ --verbose || RETURN_CODE=1
fi
done
exit $RETURN_CODE
@@ -153,10 +177,18 @@ exit $RETURN_CODE
%license LICENSE
%doc *.md
%doc composer.json
-%{_datadir}/php/phpDocumentor
+%{_datadir}/php/phpDocumentor/Reflection/DocBlock%{major}
%changelog
+* Mon Jan 22 2018 Remi Collet <remi@remirepo.net> - 4.2.0-1
+- Update to 4.2.0
+- rename to php-phpdocumentor-reflection-docblock4
+- move to /usr/share/php/phpDocumentor/Reflection/DocBlock4
+- raise dependency on PHP 7.0
+- raise dependency on phpdocumentor/type-resolver 0.4.0
+- use phpunit6 and php-mockery for test suite
+
* Tue Aug 8 2017 Remi Collet <remi@remirepo.net> - 3.2.2-1
- Update to 3.2.2