Update to 0.4.1
allow nikic/php-parser version 2 and 3
This commit is contained in:
parent
76950e3485
commit
1a68476aa0
3 changed files with 28 additions and 13 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -3,3 +3,4 @@ clog
|
|||
/php-ocramius-code-generator-utils-0.3.1-d27db31c975001710beb4025768dcbd39e286a56.tar.gz
|
||||
/php-ocramius-code-generator-utils-0.3.2-0e2f6c593fc82801cbb5c8fa90559d923bd1445c.tar.gz
|
||||
/php-ocramius-code-generator-utils-0.4.0-7dc0be1dec3376d95ba094688f0d84f7cf95f300.tar.gz
|
||||
/php-ocramius-code-generator-utils-0.4.1-862c03de42475fe039e7d0f47966c25ac40a58a8.tar.gz
|
||||
|
|
|
|||
|
|
@ -11,17 +11,17 @@
|
|||
|
||||
%global github_owner Ocramius
|
||||
%global github_name CodeGenerationUtils
|
||||
%global github_version 0.4.0
|
||||
%global github_commit 7dc0be1dec3376d95ba094688f0d84f7cf95f300
|
||||
%global github_version 0.4.1
|
||||
%global github_commit 862c03de42475fe039e7d0f47966c25ac40a58a8
|
||||
|
||||
%global composer_vendor ocramius
|
||||
%global composer_project code-generator-utils
|
||||
|
||||
# "php": "~7.0"
|
||||
%global php_min_ver 7.0
|
||||
# "nikic/php-parser": "~2.0"
|
||||
# "nikic/php-parser": "~2.0|~3.0"
|
||||
%global php_parser_min_ver 2.0
|
||||
%global php_parser_max_ver 3
|
||||
%global php_parser_max_ver 4
|
||||
|
||||
# Build using "--without tests" to disable tests
|
||||
%global with_tests 0%{!?_without_tests:1}
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
Name: php-%{composer_vendor}-%{composer_project}
|
||||
Version: %{github_version}
|
||||
Release: 3%{?github_release}%{?dist}
|
||||
Release: 1%{?github_release}%{?dist}
|
||||
Summary: A set of code generator utilities built on top of PHP-Parsers
|
||||
|
||||
Group: Development/Libraries
|
||||
|
|
@ -42,7 +42,8 @@ BuildArch: noarch
|
|||
%if %{with_tests}
|
||||
# composer.json
|
||||
BuildRequires: php(language) >= %{php_min_ver}
|
||||
BuildRequires: php-nikic-php-parser
|
||||
BuildRequires: php-composer(nikic/php-parser) < %{php_parser_max_ver}
|
||||
BuildRequires: php-composer(nikic/php-parser) >= %{php_parser_min_ver}
|
||||
BuildRequires: php-composer(phpunit/phpunit) >= 5.0
|
||||
# phpcompatinfo (computed from version 0.4.0)
|
||||
BuildRequires: php-pcre
|
||||
|
|
@ -54,8 +55,8 @@ BuildRequires: php-composer(fedora/autoloader)
|
|||
|
||||
# composer.json
|
||||
Requires: php(language) >= %{php_min_ver}
|
||||
# workaround for range version
|
||||
Requires: php-nikic-php-parser
|
||||
Requires: php-composer(nikic/php-parser) < %{php_parser_max_ver}
|
||||
Requires: php-composer(nikic/php-parser) >= %{php_parser_min_ver}
|
||||
# phpcompatinfo (computed from version 0.4.0)
|
||||
Requires: php-pcre
|
||||
Requires: php-spl
|
||||
|
|
@ -90,9 +91,12 @@ cat <<'AUTOLOAD' | tee src/CodeGenerationUtils/autoload.php
|
|||
require_once '/usr/share/php/Fedora/Autoloader/autoload.php';
|
||||
|
||||
\Fedora\Autoloader\Autoload::addPsr4('CodeGenerationUtils\\', __DIR__);
|
||||
\Fedora\Autoloader\Dependencies::required(array(
|
||||
'%{phpdir}/PhpParser2/autoload.php',
|
||||
));
|
||||
\Fedora\Autoloader\Dependencies::required([
|
||||
[
|
||||
'%{phpdir}/PhpParser3/autoload.php',
|
||||
'%{phpdir}/PhpParser2/autoload.php',
|
||||
],
|
||||
]);
|
||||
AUTOLOAD
|
||||
|
||||
|
||||
|
|
@ -111,7 +115,13 @@ require '%{buildroot}%{phpdir}/CodeGenerationUtils/autoload.php';
|
|||
\Fedora\Autoloader\Autoload::addPsr4('CodeGenerationUtilsTestAsset\\', __DIR__.'/tests/CodeGenerationUtilsTestAsset');
|
||||
BOOTSTRAP
|
||||
|
||||
%{_bindir}/phpunit --verbose --bootstrap bootstrap.php
|
||||
ret=0
|
||||
for cmd in php php70 php71 php72; do
|
||||
if which $cmd; then
|
||||
$cmd %{_bindir}/phpunit --verbose --bootstrap bootstrap.php || ret=1
|
||||
fi
|
||||
done
|
||||
exit $ret
|
||||
%else
|
||||
: Tests skipped
|
||||
%endif
|
||||
|
|
@ -126,6 +136,10 @@ BOOTSTRAP
|
|||
|
||||
|
||||
%changelog
|
||||
* Fri Jun 23 2017 Remi Collet <remi@remirepo.net> - 0.4.1-1
|
||||
- Update to 0.4.1
|
||||
- allow nikic/php-parser version 2 and 3
|
||||
|
||||
* Wed Feb 22 2017 Remi Collet <remi@fedoraproject.org> - 0.4.0-3
|
||||
- switch to fedora-autoloader
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
f88b1ca22a25b7412f776ba79671d242 php-ocramius-code-generator-utils-0.4.0-7dc0be1dec3376d95ba094688f0d84f7cf95f300.tar.gz
|
||||
SHA512 (php-ocramius-code-generator-utils-0.4.1-862c03de42475fe039e7d0f47966c25ac40a58a8.tar.gz) = 06205f284aa1345e0081595b2fd6068c4de14aefb99dd4fedaf4e634dec60a0c63a08e03d1ebce84f59cfe247f40a8ea8d5ff2c6baeaf964f50f81c92e3d2431
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue