Compare commits

...
Sign in to create a new pull request.

1 commit

Author SHA1 Message Date
Remi Collet
3a91c96198 update to 2.0.3
raise dependency on nikic/php-parser 4.18 and allow 5.0

(cherry picked from commit 62e2c7d8e6)
2023-12-22 10:17:35 +01:00
3 changed files with 26 additions and 13 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
/php-sebastian-complexity-2.0.0-33fcd6a.tgz
/php-sebastian-complexity-2.0.1-ba8cc2d.tgz
/php-sebastian-complexity-2.0.2-739b35e.tgz
/php-sebastian-complexity-2.0.3-25f207c.tgz

View file

@ -1,7 +1,7 @@
# remirepo/fedora spec file for php-sebastian-complexity
#
# Copyright (c) 2020 Remi Collet
# License: CC-BY-SA
# Copyright (c) 2020-2023 Remi Collet
# License: CC-BY-SA-4.0
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
@ -9,7 +9,7 @@
%bcond_without tests
# github
%global gh_commit 739b35e53379900cc9ac327b2147867b8b6efd88
%global gh_commit 25f207c40d62b8b7aa32f5ab026c53561964053a
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project complexity
@ -23,11 +23,11 @@
%global ns_project Complexity
Name: php-%{pk_vendor}-%{pk_project}%{major}
Version: 2.0.2
Release: 6%{?dist}
Summary: Calculating the complexity of PHP code units
Version: 2.0.3
Release: 1%{?dist}
Summary: Calculating the complexity of PHP code units, version 2
License: BSD
License: BSD-3-Clause
URL: https://github.com/%{gh_owner}/%{gh_project}
# git snapshot to retrieve test suite
Source0: %{name}-%{version}-%{gh_short}.tgz
@ -35,7 +35,7 @@ Source1: makesrc.sh
BuildArch: noarch
BuildRequires: php(language) >= 7.3
BuildRequires: (php-composer(nikic/php-parser) >= 4.7 with php-composer(nikic/php-parser) < 5)
BuildRequires: (php-composer(nikic/php-parser) >= 4.18 with php-composer(nikic/php-parser) < 6)
BuildRequires: php-spl
# Autoloader
BuildRequires: php-fedora-autoloader-devel >= 1.0.0
@ -47,9 +47,9 @@ BuildRequires: phpunit9 >= 9.3
# from composer.json, "require": {
# "php": ">=7.3",
# "nikic/php-parser": "^4.7"
# "nikic/php-parser": "^4.18 || ^5.0"
Requires: php(language) >= 7.3
Requires: (php-composer(nikic/php-parser) >= 4.7 with php-composer(nikic/php-parser) < 5)
Requires: (php-composer(nikic/php-parser) >= 4.18 with php-composer(nikic/php-parser) < 6)
# from phpcompatinfo report for version 2.0.0
Requires: php-spl
# Autoloader
@ -61,6 +61,10 @@ Provides: php-composer(%{pk_vendor}/%{pk_project}) = %{version}
%description
Library for calculating the complexity of PHP code units.
This package provides version 2 of %{pk_vendor}/%{pk_project} library.
Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
@ -72,7 +76,10 @@ phpab --template fedora --output src/autoload.php src
cat <<EOF | tee -a src/autoload.php
\Fedora\Autoloader\Dependencies::required([
'%{php_home}/PhpParser4/autoload.php',
[
'%{php_home}/PhpParser5/autoload.php',
'%{php_home}/PhpParser4/autoload.php',
],
]);
EOF
@ -89,7 +96,7 @@ touch vendor/autoload.php
: Run upstream test suite
ret=0
for cmd in php php73 php74 php80; do
for cmd in php php80 php81 php82; do
if which $cmd; then
$cmd -d auto_prepend_file=%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}%{major}/autoload.php \
%{_bindir}/phpunit9 --verbose || ret=1
@ -110,6 +117,11 @@ exit $ret
%changelog
* Fri Dec 22 2023 Remi Collet <remi@remirepo.net> - 2.0.3-1
- update to 2.0.3
- raise dependency on nikic/php-parser 4.18 and allow 5.0
- use SPDX License id
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.2-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild

View file

@ -1 +1 @@
SHA512 (php-sebastian-complexity-2.0.2-739b35e.tgz) = e023347d3d562db234ed3f1d51acaa616d525d7d9f2cf498e52458843870dac6b572bdf57605e40ddef5c4f690a8c6d7903c11ecffffc9cf1b9793a5414d095f
SHA512 (php-sebastian-complexity-2.0.3-25f207c.tgz) = 9905a84ed6d45092533d3ebf0eb51b8deb5d7174c61ef45a6efa4ea690a042716a46a58c8c7c3b90b321b873d713dc3224a49677b2298c40caa2feb771a21418