diff options
author | Remi Collet <remi@remirepo.net> | 2017-05-05 07:41:58 +0200 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2017-05-05 07:41:58 +0200 |
commit | 62360d976ba6d6dadcf22e09b44e995481866b4b (patch) | |
tree | 35dc124bc838d69569eaa4fa7af2db0222c5f003 | |
parent | 76a23c5d8d7c94d7e5f4184a8ffc0033025bcac3 (diff) |
v3.1.1, wip, from Fedora
-rw-r--r-- | .gitignore | 7 | ||||
-rw-r--r-- | composer.json | 28 | ||||
-rw-r--r-- | php-phpdocumentor-reflection-docblock.spec | 127 |
3 files changed, 137 insertions, 25 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1ab5c4f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +package-*.xml +*.tgz +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..85be2fd --- /dev/null +++ b/composer.json @@ -0,0 +1,28 @@ +{ + "name": "phpdocumentor/reflection-docblock", + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "type": "library", + "license": "MIT", + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "autoload": { + "psr-4": {"phpDocumentor\\Reflection\\": ["src/"]} + }, + "autoload-dev": { + "psr-4": {"phpDocumentor\\Reflection\\": ["tests/unit"]} + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + } +} diff --git a/php-phpdocumentor-reflection-docblock.spec b/php-phpdocumentor-reflection-docblock.spec index 0df1c31..e45d991 100644 --- a/php-phpdocumentor-reflection-docblock.spec +++ b/php-phpdocumentor-reflection-docblock.spec @@ -1,19 +1,20 @@ # spec file for php-phpdocumentor-reflection-docblock # -# Copyright (c) 2014-2017 Remi Collet +# Copyright (c) 2014-2015 Remi Collet +# 2017 Remi Collet, Shawn Iwinski # License: CC-BY-SA # http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # -%global gh_commit d68dbdc53dc358a816f00b300704702b2eaff7b8 +%global gh_commit 8331b5efe816ae05461b7ca1e721c01b46bafb3e %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner phpDocumentor %global gh_project ReflectionDocBlock %global with_tests %{?_without_tests:0}%{!?_without_tests:1} Name: php-phpdocumentor-reflection-docblock -Version: 2.0.4 +Version: 3.1.1 Release: 1%{?dist} Summary: DocBlock parser @@ -22,24 +23,54 @@ License: MIT URL: https://github.com/%{gh_owner}/%{gh_project} Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{gh_project}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch -BuildRequires: php(language) >= 5.3.3 -BuildRequires: php-phpunit-PHPUnit -BuildRequires: php-theseer-autoload +BuildRequires: php-fedora-autoloader-devel +%if %{with_tests} +BuildRequires: php(language) >= 5.5 +BuildRequires: php-composer(phpdocumentor/reflection-common) < 2.0 +BuildRequires: php-composer(phpdocumentor/reflection-common) >= 1.0 +BuildRequires: php-composer(phpdocumentor/type-resolver) < 1.0 +BuildRequires: php-composer(phpdocumentor/type-resolver) >= 0.2.0 +BuildRequires: php-composer(phpunit/phpunit) +BuildRequires: php-composer(webmozart/assert) < 2.0 +BuildRequires: php-composer(webmozart/assert) >= 1.0 +# From composer.json, require-dev +# "mockery/mockery": "^0.9.4" +BuildRequires: php-composer(mockery/mockery) < 1.0 +BuildRequires: php-composer(mockery/mockery) >= 0.9.4 +# From phpcompatinfo report for 3.1.1 +BuildRequires: php-filter +BuildRequires: php-pcre +BuildRequires: php-reflection +BuildRequires: php-spl +%endif # From composer.json, require -# "php": ">=5.3.3" -# From composer.json, suggest -# "dflydev/markdown": "1.0.*", -# "erusev/parsedown": "~0.7" -Requires: php(language) >= 5.3.3 -# From phpcompatinfo report for 2.0.3 +# "php": ">=5.5" +# "phpdocumentor/reflection-common": "^1.0@dev", +# "phpdocumentor/type-resolver": "^0.2.0", +# "webmozart/assert": "^1.0" +Requires: php(language) >= 5.5 +Requires: php-composer(phpdocumentor/reflection-common) < 2.0 +Requires: php-composer(phpdocumentor/reflection-common) >= 1.0 +Requires: php-composer(phpdocumentor/type-resolver) < 1.0 +Requires: php-composer(phpdocumentor/type-resolver) >= 0.2.0 +Requires: php-composer(webmozart/assert) < 2.0 +Requires: php-composer(webmozart/assert) >= 1.0 +# From phpcompatinfo report for 3.1.1 +Requires: php-filter Requires: php-pcre +Requires: php-reflection Requires: php-spl Provides: php-composer(phpdocumentor/reflection-docblock) = %{version} +Conflicts: drush < 8.1.10-2 +Conflicts: php-bartlett-PHP-Reflect < 4.0.2-3 +Conflicts: php-consolidation-annotated-command < 2.4.8 +Conflicts: php-phpdocumentor-reflection < 1.0.7-3 +Conflicts: php-phpspec-prophecy < 1.7.0-4 + %description The ReflectionDocBlock component of phpDocumentor provides a DocBlock @@ -52,34 +83,71 @@ DocBlocks or otherwise retrieve information that is embedded in a DocBlock. %prep %setup -q -n %{gh_project}-%{gh_commit} +sed 's#vendor/mockery/mockery/library#%{_datadir}/php#' phpunit.xml.dist \ + > phpunit.xml + %build phpab \ - --basedir src/phpDocumentor/Reflection/DocBlock \ - --output src/phpDocumentor/Reflection/DocBlock/autoload.php \ - src/phpDocumentor/Reflection + --template fedora \ + --output src/DocBlock/autoload.php \ + src/ + +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/Webmozart/Assert/autoload.php', +]); +AUTOLOAD %install -rm -rf %{buildroot} -mkdir -p %{buildroot}%{_datadir}/php -cp -pr src/* %{buildroot}%{_datadir}/php +mkdir -p %{buildroot}%{_datadir}/php/phpDocumentor +cp -pr src %{buildroot}%{_datadir}/php/phpDocumentor/Reflection %check %if %{with_tests} -phpunit --bootstrap %{buildroot}%{_datadir}/php/phpDocumentor/Reflection/DocBlock/autoload.php +sed -e '/autoload.php/d' -i examples/*.php examples/*/*.php + +phpab \ + --template fedora \ + --output bootstrap.php \ + tests/unit/ + +cat <<BOOTSTRAP | tee -a bootstrap.php + +\Fedora\Autoloader\Dependencies::required([ + '%{buildroot}%{_datadir}/php/phpDocumentor/Reflection/DocBlock/autoload.php', + '%{_datadir}/php/Mockery/autoload.php', +]); +BOOTSTRAP + +# Notice, with 7.2: +# 1) phpDocumentor\Reflection\DocBlock\Tags\MethodTest::testCreateMethodParenthesisMissing +# Uninitialized string offset: 0 +# tests/unit/DocBlock/Tags/MethodTest.php:428 + +# use auto_prepend_file to ensure build version used first +RETURN_CODE=0 +for PHP_EXEC in php php56 php70 php71; do + if which $PHP_EXEC; then + $PHP_EXEC \ + %{_bindir}/phpunit --verbose \ + --include-path %{buildroot}%{_datadir}/php \ + --bootstrap bootstrap.php \ + || RETURN_CODE=1 + fi +done +exit $RETURN_CODE %else : Test suite disabled %endif -%clean -rm -rf %{buildroot} - - %files -%defattr(-,root,root,-) %{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md @@ -88,6 +156,15 @@ rm -rf %{buildroot} %changelog +* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Wed Feb 11 2015 Remi Collet <remi@fedoraproject.org> - 2.0.4-1 - update to 2.0.4 - LICENSE is in upstream archive |