diff options
-rw-r--r-- | 12.patch | 23 | ||||
-rw-r--r-- | composer.json | 6 | ||||
-rw-r--r-- | php-cs-fixer-phpunit-constraint-xmlmatchesxsd.spec | 31 |
3 files changed, 24 insertions, 36 deletions
diff --git a/12.patch b/12.patch deleted file mode 100644 index 5235bfa..0000000 --- a/12.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 9d351061fdc28a58e5a75effd4879c4e556585d2 Mon Sep 17 00:00:00 2001 -From: Remi Collet <remi@remirepo.net> -Date: Tue, 13 Oct 2020 08:35:27 +0200 -Subject: [PATCH] fix for PHPUnit 5 - ---- - src/Constraint/XmlMatchesXsd.php | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/src/Constraint/XmlMatchesXsd.php b/src/Constraint/XmlMatchesXsd.php -index f981ab5..e9e6490 100644 ---- a/src/Constraint/XmlMatchesXsd.php -+++ b/src/Constraint/XmlMatchesXsd.php -@@ -12,7 +12,8 @@ - - namespace PhpCsFixer\PhpunitConstraintXmlMatchesXsd\Constraint; - --if (version_compare(\PHPUnit\Runner\Version::id(), '7.0.0') < 0) { -+if (!class_exists('\PHPUnit\Runner\Version') -+ || version_compare(\PHPUnit\Runner\Version::id(), '7.0.0') < 0) { - class_alias(XmlMatchesXsdForV5::class, XmlMatchesXsd::class); - } elseif (version_compare(\PHPUnit\Runner\Version::id(), '8.0.0') < 0) { - class_alias(XmlMatchesXsdForV7::class, XmlMatchesXsd::class); diff --git a/composer.json b/composer.json index b0b86d4..005ecff 100644 --- a/composer.json +++ b/composer.json @@ -16,10 +16,8 @@ "php": "^5.5 || ^7.0 || ^8.0", "ext-dom": "*", "ext-libxml": "*", - "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0 || ^8.0 || ^9.0" - }, - "conflict": { - "hhvm": "*" + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0", + "phpunitgoodpractices/polyfill": "^1.4" }, "require-dev": { "johnkary/phpunit-speedtrap": "^1.1 || ^2.0 || ^3.0", diff --git a/php-cs-fixer-phpunit-constraint-xmlmatchesxsd.spec b/php-cs-fixer-phpunit-constraint-xmlmatchesxsd.spec index 53632e6..8173062 100644 --- a/php-cs-fixer-phpunit-constraint-xmlmatchesxsd.spec +++ b/php-cs-fixer-phpunit-constraint-xmlmatchesxsd.spec @@ -6,7 +6,7 @@ # # Please, preserve the changelog entries # -%global gh_commit 526989325b1bb9a67f215108c490260cfdf6b4f1 +%global gh_commit c616db6153b75b641b772fe2008b8ff001cd74c7 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) #global gh_date 20150717 %global gh_owner PHP-CS-Fixer @@ -19,7 +19,7 @@ %global with_tests 0%{!?_without_tests:1} Name: %{pk_vendor}-%{pk_project} -Version: 1.2.0 +Version: 1.2.1 Release: 1%{?dist} Summary: Constraint for testing XML against XSD @@ -29,8 +29,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project} Source0: %{name}-%{version}-%{gh_short}.tgz Source1: makesrc.sh -Patch0: https://patch-diff.githubusercontent.com/raw/PHP-CS-Fixer/phpunit-constraint-xmlmatchesxsd/pull/12.patch - BuildArch: noarch %if %{with_tests} # For tests @@ -42,12 +40,15 @@ BuildRequires: php-libxml # "symfony/phpunit-bridge": "^3.2.2 || ^4.0" # ignore phpunit listeners %if 0%{?fedora} >= 31 || 0%{?rhel} >= 9 +BuildRequires: (php-composer(phpunitgoodpractices/polyfill) >= 1.4 with php-composer(phpunitgoodpractices/polyfill) < 2) BuildRequires: phpunit9 +%else +BuildRequires: php-phpunitgoodpractices-polyfill >= 1.4 %endif BuildRequires: phpunit8 -BuildRequires: phpunit7 -BuildRequires: phpunit6 >= 6.4.3 -BuildRequires: phpunit >= 5.7.23 +BuildRequires: phpunit7 >= 7.5.20 +BuildRequires: phpunit6 >= 6.5.14 +BuildRequires: phpunit >= 5.7.27 # Autoloader BuildRequires: php-fedora-autoloader-devel %endif @@ -56,11 +57,19 @@ BuildRequires: php-fedora-autoloader-devel # "php": "^5.5 || ^7.0 || ^8.0", # "ext-dom": "*", # "ext-libxml": "*", -# "phpunit/phpunit": "^5.7.23 || ^6.4.3 || ^7.0 || ^8.0 || ^9.0" +# "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.0 || ^9.0", +# "phpunitgoodpractices/polyfill": "^1.4" Requires: php(language) >= 5.5 Requires: php-dom Requires: php-libxml # ignore phpunit dep, package using it will run the proper phpunit command (and autoloader) +# remirepo:1 +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 +Requires: (php-composer(phpunitgoodpractices/polyfill) >= 1.4 with php-composer(phpunitgoodpractices/polyfill) < 2) +# remirepo:3 +%else +Requires: php-phpunitgoodpractices-polyfill >= 1.4 +%endif # From phpcompatinfo report for version 1.0.0 # nothing # Autoloader @@ -77,7 +86,6 @@ Autoloader: %{php_home}/%{ns_vendor}/%{ns_project}/autoload.php %prep %setup -q -n %{gh_project}-%{gh_commit} -%patch0 -p1 %build @@ -86,6 +94,7 @@ phpab --template fedora --output src/autoload.php src cat << 'EOF' | tee -a src/autoload.php \Fedora\Autoloader\Dependencies::required([ + '%{php_home}/PHPUnitGoodPractices/Polyfill/autoload.php', __DIR__ . '/Constraint/XmlMatchesXsd.php', ]); EOF @@ -162,6 +171,10 @@ exit $ret %changelog +* Tue Oct 20 2020 Remi Collet <remi@remirepo.net> - 1.2.1-1 +- update to 1.2.1 +- re-add dependency on phpunitgoodpractices/polyfill + * Tue Oct 13 2020 Remi Collet <remi@remirepo.net> - 1.2.0-1 - update to 1.2.0 - drop dependency on phpunitgoodpractices/polyfill |