summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-10-26 08:17:30 +0100
committerRemi Collet <remi@remirepo.net>2020-10-26 08:17:30 +0100
commitecd21f7a9c1f45571244b4ed4edaf893b3204259 (patch)
treec5382cb2edbc7fc136bbd7ef89d222ce1a58f38f
parentaf1ce253773a8d57ef9f23330557863f01ad23bb (diff)
update to 1.1.0HEADmaster
switch to phpunit9
-rw-r--r--composer.json8
-rw-r--r--php-cs-fixer-accessible-object.spec52
2 files changed, 30 insertions, 30 deletions
diff --git a/composer.json b/composer.json
index f2594e2..32f29ef 100644
--- a/composer.json
+++ b/composer.json
@@ -14,14 +14,10 @@
}
],
"require": {
- "php": "^5.3 || ^7.0"
+ "php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
- "phpunit/phpunit": "^4.8.35 || ^5.4.3",
- "symfony/phpunit-bridge": "^3.2.2"
- },
- "conflict": {
- "hhvm": "*"
+ "symfony/phpunit-bridge": "^5.1"
},
"config": {
"optimize-autoloader": true,
diff --git a/php-cs-fixer-accessible-object.spec b/php-cs-fixer-accessible-object.spec
index 8bba8d5..bd4bcb8 100644
--- a/php-cs-fixer-accessible-object.spec
+++ b/php-cs-fixer-accessible-object.spec
@@ -1,12 +1,12 @@
# remirepo/fedora spec file for php-cs-fixer-accessible-object
#
-# Copyright (c) 2017 Remi Collet
+# Copyright (c) 2017-2020 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
-%global gh_commit 9ef12f98c49e3b2a78a47bef74ecb37c5b6d4ea6
+%global gh_commit a08d2ad0ed28555cca941aa197610db8b45599bd
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
#global gh_date 20150717
%global gh_owner PHP-CS-Fixer
@@ -19,8 +19,8 @@
%global with_tests 0%{!?_without_tests:1}
Name: %{pk_vendor}-%{pk_project}
-Version: 1.0.0
-Release: 4%{?dist}
+Version: 1.1.0
+Release: 1%{?dist}
Summary: A library to reveal object internals
Group: Development/Tools
@@ -33,20 +33,24 @@ Source1: makesrc.sh
BuildArch: noarch
%if %{with_tests}
# For tests
-BuildRequires: php(language) >= 5.3
+# as we use modern phpunit
+BuildRequires: php(language) >= 7.2
BuildRequires: php-reflection
BuildRequires: php-spl
# From composer.json, "require-dev": {
-# "phpunit/phpunit": "^4.8.35 || ^5.4.3",
-# "symfony/phpunit-bridge": "^3.2.2"
-BuildRequires: php-composer(phpunit/phpunit) >= 5.4.3
-BuildRequires: php-symfony3-phpunit-bridge >= 3.2.2
+# "symfony/phpunit-bridge": "^5.1"
+%if 0%{?fedora} >= 31 || 0%{?rhel} >= 9
+%global phpunit %{_bindir}/phpunit9
+%else
+%global phpunit %{_bindir}/phpunit8
+%endif
+BuildRequires: %{phpunit}
# Autoloader
BuildRequires: php-fedora-autoloader-devel
%endif
# From composer.json, "require": {
-# "php": "^5.3 || ^7.0"
+# "php": "^5.3 || ^7.0 || ^8.0"
Requires: php(language) >= 5.3
# From phpcompatinfo report for version 1.0.0
Requires: php-reflection
@@ -69,16 +73,10 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php
%prep
%setup -q -n %{gh_project}-%{gh_commit}
-cat << 'EOF' | tee src/autoload.php
-<?php
-/* autoloader for %{name} */
-
-\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\AccessibleObject\\', __DIR__);
-EOF
-
%build
-# Empty build section, most likely nothing required.
+: generate a classmap autoloader
+phpab --template fedora --output src/autoload.php src
%install
@@ -94,17 +92,19 @@ cat << 'EOF' | tee vendor/autoload.php
<?php
require '%{buildroot}%{php_home}/%{ns_vendor}/%{ns_project}/autoload.php';
-\Fedora\Autoloader\Dependencies::required([
- '%{php_home}/Symfony3/Bridge/PhpUnit/autoload.php',
-]);
\Fedora\Autoloader\Autoload::addPsr4('PhpCsFixer\\AccessibleObject\\Tests\\', dirname(__DIR__) . '/tests');
EOF
+: disable listener and add missing test suite name
+sed -e '/listener/d' \
+ -e 's/<testsuite>/<testsuite name="main">/' \
+ phpunit.xml.dist > phpunit.xml
ret=0
-for cmd in php php56 php70 php71 php72; do
- if which $cmd; then
- $cmd %{_bindir}/phpunit --verbose || ret=1
+for cmdarg in "php %{phpunit}" "php72 %{_bindir}/phpunit8" php73 php74 php80; do
+ if which $cmdarg; then
+ set $cmdarg
+ $1 ${2:-%{_bindir}/phpunit9} --verbose || ret=1
fi
done
exit $ret
@@ -123,6 +123,10 @@ exit $ret
%changelog
+* Mon Oct 26 2020 Remi Collet <remi@remirepo.net> - 1.1.0-1
+- update to 1.1.0
+- switch to phpunit9
+
* Wed Nov 8 2017 Remi Collet <remi@remirepo.net> - 1.0.0-4
- fix FTBFS from Koschei
- use package name for symfony/phpunit-bridge