summaryrefslogtreecommitdiffstats
path: root/php-phpunit-phploc.spec
diff options
context:
space:
mode:
Diffstat (limited to 'php-phpunit-phploc.spec')
-rw-r--r--php-phpunit-phploc.spec59
1 files changed, 31 insertions, 28 deletions
diff --git a/php-phpunit-phploc.spec b/php-phpunit-phploc.spec
index 6b3af3c..0f2b1d9 100644
--- a/php-phpunit-phploc.spec
+++ b/php-phpunit-phploc.spec
@@ -1,6 +1,6 @@
# remirepo/fedora spec file for php-phpunit-phploc
#
-# Copyright (c) 2009-2018 Guillaume Kulakowski, Christof Damian, Remi Collet
+# Copyright (c) 2009-2019 Guillaume Kulakowski, Christof Damian, Remi Collet
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -11,7 +11,7 @@
# For compatibility with SCL
%undefine __brp_mangle_shebangs
-%global gh_commit 6a8a9416517b82d6326ac9c2d040ad53c13654eb
+%global gh_commit 5b714ccb7cb8ca29ccf9caf6eb1aed0131d3a884
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner sebastianbergmann
%global gh_project phploc
@@ -21,56 +21,57 @@
%global with_tests %{?_without_tests:0}%{!?_without_tests:1}
Name: php-phpunit-phploc
-Version: 4.0.1
-Release: 4%{?dist}
+Version: 5.0.0
+Release: 1%{?dist}
Summary: A tool for quickly measuring the size of a PHP project
-Group: Development/Libraries
License: BSD
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{version}-%{gh_short}.tar.gz
# Fix for RPM, use autoload
Patch0: %{gh_project}-rpm.patch
-# For PHP 7.3 (upstream have fixed it with other changes)
-Patch1: %{gh_project}-php73.patch
BuildArch: noarch
-BuildRequires: php(language) >= 5.6
+BuildRequires: php(language) >= 7.2
BuildRequires: php-fedora-autoloader-devel
%if %{with_tests}
-%if 0%{?fedora} >= 27
+BuildRequires: php-dom
+BuildRequires: php-json
+BuildRequires: php-spl
+BuildRequires: php-tokenizer
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
BuildRequires: (php-composer(sebastian/finder-facade) >= 1.1 with php-composer(sebastian/finder-facade) < 2)
BuildRequires: (php-composer(sebastian/version) >= 2.0 with php-composer(sebastian/version) < 3)
-BuildRequires: (php-composer(symfony/console) >= 2.7 with php-composer(symfony/console) < 5)
-%global phpunit %{_bindir}/phpunit6
+BuildRequires: (php-composer(symfony/console) >= 4.0 with php-composer(symfony/console) < 5)
%else
BuildRequires: php-phpunit-FinderFacade >= 1.1
BuildRequires: php-phpunit-Version >= 2.0
-BuildRequires: php-symfony3-console
-%global phpunit %{_bindir}/phpunit
+BuildRequires: php-symfony4-console
%endif
+%global phpunit %{_bindir}/phpunit8
BuildRequires: %{phpunit}
%endif
# From composer.json, "require": {
-# "php": "^5.6 || ^7.0",
+# "php": "^7.2",
# "sebastian/finder-facade": "^1.1",
# "sebastian/version": "^2.0",
-# "symfony/console": "^2.7|^3.0|^4.0"
-Requires: php(language) >= 5.6
+# "symfony/console": "^4.0"
+Requires: php(language) >= 7.2
Requires: php-cli
-%if 0%{?fedora} >= 27
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
Requires: (php-composer(sebastian/finder-facade) >= 1.1 with php-composer(sebastian/finder-facade) < 2)
Requires: (php-composer(sebastian/version) >= 2.0 with php-composer(sebastian/version) < 3)
-Requires: (php-composer(symfony/console) >= 2.7 with php-composer(symfony/console) < 5)
+Requires: (php-composer(symfony/console) >= 4.0 with php-composer(symfony/console) < 5)
%else
Requires: php-phpunit-FinderFacade >= 1.1
Requires: php-phpunit-Version >= 2.0
-Requires: php-symfony3-console
+Requires: php-symfony4-console
%endif
-# From phpcompatinfo report for version 4.0.0
+# From phpcompatinfo report for version 5.0.0
Requires: php-dom
+Requires: php-json
Requires: php-spl
Requires: php-tokenizer
# For our autoloader
@@ -94,7 +95,6 @@ need to get a quick understanding of a project's size.
%setup -q -n %{gh_project}-%{gh_commit}
%patch0 -p1 -b .rpm
-%patch1 -p1
%build
@@ -109,11 +109,7 @@ cat << 'EOF' | tee -a src/autoload.php
'%{_datadir}/php/SebastianBergmann/FinderFacade/autoload.php',
'%{_datadir}/php/SebastianBergmann/Version/autoload.php',
'%{_datadir}/php/TheSeer/fDOMDocument/autoload.php',
- [
- '%{_datadir}/php/Symfony4/Component/Console/autoload.php',
- '%{_datadir}/php/Symfony3/Component/Console/autoload.php',
- '%{_datadir}/php/Symfony/Component/Console/autoload.php',
- ],
+ '%{_datadir}/php/Symfony4/Component/Console/autoload.php',
]);
EOF
@@ -128,10 +124,10 @@ install -D -p -m 755 phploc %{buildroot}%{_bindir}/phploc
%if %{with_tests}
%check
ret=0
-for cmd in "php %{phpunit}" php70 php71 php72 php73; do
+for cmd in "php %{phpunit}" php72 php73; do
if which $cmd; then
set $cmd
- $1 ${2:-%{_bindir}/phpunit6} \
+ $1 ${2:-%{_bindir}/phpunit8} \
--bootstrap %{buildroot}%{php_home}/PHPLOC/autoload.php \
--verbose tests || ret=1
fi
@@ -157,6 +153,13 @@ fi
%changelog
+* Sun Mar 17 2019 Remi Collet <remi@remirepo.net> - 5.0.0-1
+- update to 5.0.0
+- raise dependency on PHP 7.2
+- add dependency on php-json
+- only allow Symfony 4
+- use phpunit8 for upstream test suite
+
* Mon Oct 15 2018 Remi Collet <remi@remirepo.net> - 4.0.1-4
- add patch for PHP 7.3