diff options
-rw-r--r-- | composer.json | 7 | ||||
l--------- | makesrc.sh | 1 | ||||
-rw-r--r-- | php-phpdocumentor-reflection-docblock4.spec | 116 |
3 files changed, 80 insertions, 44 deletions
diff --git a/composer.json b/composer.json index e3dc38a..9bbf8eb 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,8 @@ ], "require": { "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0", - "phpdocumentor/type-resolver": "^0.4.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", "webmozart/assert": "^1.0" }, "autoload": { @@ -23,8 +23,9 @@ }, "require-dev": { "mockery/mockery": "^1.0", + "phpdocumentor/type-resolver": "0.4.*", "phpunit/phpunit": "^6.4", - "doctrine/instantiator": "~1.0.5" + "doctrine/instantiator": "^1.0.5" }, "extra": { "branch-alias": { diff --git a/makesrc.sh b/makesrc.sh new file mode 120000 index 0000000..55c8426 --- /dev/null +++ b/makesrc.sh @@ -0,0 +1 @@ +php-phpdocumentor-reflection-docblock4-get-source.sh
\ No newline at end of file diff --git a/php-phpdocumentor-reflection-docblock4.spec b/php-phpdocumentor-reflection-docblock4.spec index 55363a3..2a69cd3 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-docblock4 # -# Copyright (c) 2017-2018 Remi Collet, Shawn Iwinski +# Copyright (c) 2017-2021 Remi Collet, Shawn Iwinski # 2014-2015 Remi Collet # # License: CC-BY-SA @@ -8,7 +8,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 94fd0001232e47129dd3504189fa1c7225010d08 +%global gh_commit da3fd972d6bafd628114f7e7e036f45944b62e9c %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpDocumentor %global gh_project ReflectionDocBlock @@ -16,8 +16,8 @@ %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-phpdocumentor-reflection-docblock%{major} -Version: 4.3.0 -Release: 1%{?dist} +Version: 4.3.4 +Release: 5%{?dist} Summary: DocBlock parser License: MIT @@ -28,62 +28,65 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{gh_commit}.tar.gz Source1: %{name}-get-source.sh +# Minimal fix for PHP 8 +Patch0: %{name}-php8.patch + BuildArch: noarch BuildRequires: php-fedora-autoloader-devel %if %{with_tests} 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) +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(phpdocumentor/reflection-common) >= 1.0.0 with php-composer(phpdocumentor/reflection-common) < 3) +BuildRequires: (php-composer(phpdocumentor/type-resolver) >= 0.4.0 with php-composer(phpdocumentor/type-resolver) < 0.5) +BuildRequires: (php-composer(webmozart/assert) >= 1.0 with php-composer(webmozart/assert) < 2) +# remirepo:5 %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.4.0 -BuildRequires: php-composer(webmozart/assert) < 2 -BuildRequires: php-composer(webmozart/assert) >= 1.0 +BuildRequires: php-phpdocumentor-reflection-common >= 1.0.0 +BuildRequires: php-phpdocumentor-type-resolver >= 0.4.0 +BuildRequires: php-webmozart-assert >= 1.0 %endif # From composer.json, require-dev # "mockery/mockery": "^1.0", +# "phpdocumentor/type-resolver": "0.4.*", # "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) +# "doctrine/instantiator": "^1.0.5" +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +BuildRequires: (php-composer(mockery/mockery) >= 1.0 with php-composer(mockery/mockery) < 2) +# remirepo:3 %else -BuildRequires: php-composer(mockery/mockery) < 2 -BuildRequires: php-composer(mockery/mockery) >= 1.0 +BuildRequires: php-mockery >= 1.0 %endif -BuildRequires: phpunit6 >= 6.4 -# From phpcompatinfo report for 4.2.0 +BuildRequires: phpunit7 +# From phpcompatinfo report for 4.3.2 +BuildRequires: php-reflection BuildRequires: php-filter BuildRequires: php-pcre -BuildRequires: php-reflection BuildRequires: php-spl %endif # From composer.json, require # "php": ">=7.0" -# "phpdocumentor/reflection-common": "^1.0.0", -# "phpdocumentor/type-resolver": "^0.4.0", +# "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", +# "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", # "webmozart/assert": "^1.0" 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) +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(phpdocumentor/reflection-common) >= 1.0.0 with php-composer(phpdocumentor/reflection-common) < 3) +Requires: (php-composer(phpdocumentor/type-resolver) >= 0.4.0 with php-composer(phpdocumentor/type-resolver) < 2) +Requires: (php-composer(webmozart/assert) >= 1.0 with php-composer(webmozart/assert) < 2) +# remirepo:5 %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.4.0 -Requires: php-composer(webmozart/assert) < 2 -Requires: php-composer(webmozart/assert) >= 1.0 +Requires: php-phpdocumentor-reflection-common >= 1.0.0 +Requires: php-phpdocumentor-type-resolver >= 0.4.0 +Requires: php-webmozart-assert >= 1.0 %endif -# From phpcompatinfo report for 3.2.1 +# From phpcompatinfo report for 4.3.2 +Requires: php-reflection Requires: php-filter Requires: php-pcre -Requires: php-reflection Requires: php-spl # Autoloader Requires: php-composer(fedora/autoloader) @@ -103,6 +106,7 @@ Autoloader: %{_datadir}/php/phpDocumentor/Reflection/DocBlock%{major}/autoload.p %prep %setup -q -n %{gh_project}-%{gh_commit} +%patch0 -p1 sed 's#vendor/mockery/mockery/library/Mockery#%{_datadir}/php/Mockery1#' phpunit.xml.dist \ > phpunit.xml @@ -120,8 +124,13 @@ phpab \ cat <<AUTOLOAD | tee -a src/DocBlock/autoload.php \Fedora\Autoloader\Dependencies::required([ - '%{_datadir}/php/phpDocumentor/Reflection/autoload-common.php', - '%{_datadir}/php/phpDocumentor/Reflection/autoload-type-resolver.php', + [ + '%{_datadir}/php/phpDocumentor/Reflection2/autoload-common.php', + '%{_datadir}/php/phpDocumentor/Reflection/autoload-common.php', + ], [ + '%{_datadir}/php/phpDocumentor/Reflection2/autoload-type-resolver.php', + '%{_datadir}/php/phpDocumentor/Reflection/autoload-type-resolver.php', + ], '%{_datadir}/php/Webmozart/Assert/autoload.php', ]); AUTOLOAD @@ -144,6 +153,8 @@ phpab \ cat <<BOOTSTRAP | tee -a bootstrap.php \Fedora\Autoloader\Dependencies::required([ + // only v0.4 at buidtime + '%{_datadir}/php/phpDocumentor/Reflection/autoload-type-resolver.php', '%{buildroot}%{_datadir}/php/phpDocumentor/Reflection/DocBlock%{major}/autoload.php', '%{_datadir}/php/Mockery1/autoload.php', ]); @@ -151,10 +162,11 @@ BOOTSTRAP # use auto_prepend_file to ensure build version used first RETURN_CODE=0 -for PHP_EXEC in php php70 php71 php72 php73; do +for PHP_EXEC in php php73 php74 php80; do if which $PHP_EXEC; then $PHP_EXEC -d auto_prepend_file=$PWD/bootstrap.php \ - %{_bindir}/phpunit6 \ + %{_bindir}/phpunit7 \ + --no-coverage \ --bootstrap bootstrap.php \ --verbose || RETURN_CODE=1 fi @@ -166,14 +178,36 @@ exit $RETURN_CODE %files +# remirepo:1 %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md %doc composer.json -%{_datadir}/php/phpDocumentor/Reflection/DocBlock%{major} +%dir %{_datadir}/php/phpDocumentor/Reflection + %{_datadir}/php/phpDocumentor/Reflection/DocBlock%{major} %changelog +* Tue Mar 23 2021 Remi Collet <remi@remirepo.net> - 4.3.4-5 +- fix FTBFS with PHP 8 + +* Fri Jan 29 2021 Remi Collet <remi@remirepo.net> - 4.3.4-4 +- switch to phpunit7 and fix FTBFS + +* Fri Jan 3 2020 Remi Collet <remi@remirepo.net> - 4.3.4-1 +- update to 4.3.4 + +* Fri Dec 20 2019 Remi Collet <remi@remirepo.net> - 4.3.3-1 +- update to 4.3.3 + +* Fri Sep 13 2019 Remi Collet <remi@remirepo.net> - 4.3.2-1 +- update to 4.3.2 +- allow reflection-common 2.0 +- allow type-resolver 1.0 + +* Thu May 2 2019 Remi Collet <remi@remirepo.net> - 4.3.1-1 +- update to 4.3.1 + * Wed Jan 31 2018 Remi Collet <remi@remirepo.net> - 4.3.0-1 - Update to 4.3.0 |