diff --git a/.gitignore b/.gitignore index 96c463e..62641ff 100644 --- a/.gitignore +++ b/.gitignore @@ -17,5 +17,3 @@ /php-swaggest-json-schema-0.12.38-ab7cca1.tgz /php-swaggest-json-schema-0.12.39-193ba39.tgz /php-swaggest-json-schema-0.12.41-1bb9790.tgz -/php-swaggest-json-schema-0.12.42-d23adb5.tgz -/php-swaggest-json-schema-0.12.43-1f3a77a.tgz diff --git a/php-swaggest-json-schema.spec b/php-swaggest-json-schema.spec index ee926cc..226e715 100644 --- a/php-swaggest-json-schema.spec +++ b/php-swaggest-json-schema.spec @@ -1,8 +1,8 @@ # remirepo/fedora spec file for php-swaggest-json-schema # -# SPDX-FileCopyrightText: Copyright 2019-2024 Remi Collet -# SPDX-License-Identifier: CECILL-2.1 -# http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +# Copyright (c) 2019-2021 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ # # Please, preserve the changelog entries # @@ -10,7 +10,7 @@ %bcond_without tests # Github -%global gh_commit 1f3a77a382c5d273a0f1fe34be3b8af4060a88cd +%global gh_commit 1bb97901314f828774dd8c5b21bff889ce0b34bb %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner swaggest %global gh_project php-json-schema @@ -23,8 +23,8 @@ %global major %nil Name: php-%{pk_vendor}-%{pk_project}%{major} -Version: 0.12.43 -Release: 3%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} +Version: 0.12.41 +Release: 1%{?gh_date?%{gh_date}git%{gh_short}}%{?dist} Summary: High definition PHP structures with JSON-schema based validation License: MIT @@ -34,17 +34,22 @@ Source1: makesrc.sh BuildArch: noarch %if %{with tests} -BuildRequires: php(language) >= 7.1 +BuildRequires: php(language) >= 5.4 BuildRequires: php-json BuildRequires: php-mbstring +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(phplang/scope-exit) >= 1.0 with php-composer(phplang/scope-exit) < 2) BuildRequires: (php-composer(swaggest/json-diff) >= 3.8.2 with php-composer(swaggest/json-diff) < 4) +%else +BuildRequires: php-phplang-scope-exit >= 1.0 +BuildRequires: php-swaggest-json-diff >= 3.8.2 +%endif # For tests, from composer.json "require-dev": { # "phpunit/phpunit": "^5", # "phpunit/php-code-coverage": "^4", # "codeclimate/php-test-reporter": "^0.4.0" -BuildRequires: phpunit9 -%global phpunit %{_bindir}/phpunit9 +BuildRequires: php-composer(phpunit/phpunit) >= 5 +%global phpunit %{_bindir}/phpunit BuildRequires: php-date BuildRequires: php-filter BuildRequires: php-pcre @@ -54,17 +59,22 @@ BuildRequires: php-fedora-autoloader-devel %endif # From composer.json, "require": { -# "php": ">=7.1", +# "php": ">=5.4", # "ext-json": "*", # "ext-mbstring": "*", # "phplang/scope-exit": "^1.0", # "swaggest/json-diff": "^3.8.2", # "symfony/polyfill-mbstring": "^1.19" -Requires: php(language) >= 7.1 +Requires: php(language) >= 5.4 Requires: php-json Requires: php-mbstring +%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 Requires: (php-composer(phplang/scope-exit) >= 1.0 with php-composer(phplang/scope-exit) < 2) Requires: (php-composer(swaggest/json-diff) >= 3.8.2 with php-composer(swaggest/json-diff) < 4) +%else +Requires: php-phplang-scope-exit >= 1.0 +Requires: php-swaggest-json-diff >= 3.8.2 +%endif # From phpcompatinfo report for 0.12.17 Requires: php-date Requires: php-filter @@ -117,28 +127,16 @@ cat << 'EOF' | tee vendor/autoload.php expectException($e); - if ($m) $this->expectExceptionMessage($m); - } -} EOF -# For phpunit9 -sed -e '/setUp()/s/$/:void/' \ - -i tests/src/PHPUnit/Example/ExampleTest.php - # Skip online tests: testInvalid, testValidate -# Skip because of phpunit9: testPatternPropertiesMismatch ret=0 -for cmd in php php81 php82 php83 php84; do +for cmd in php php73 php74 php80 php81; do if which $cmd; then $cmd %{phpunit} \ --no-coverage \ - --filter '^((?!(SwaggerTest::testInvalid|SwaggerTest::testValidate|testPatternPropertiesMismatch)).)*$' \ - || ret=1 + --filter '^((?!(SwaggerTest::testInvalid|SwaggerTest::testValidate)).)*$' \ + --verbose || ret=1 fi done exit $ret @@ -156,44 +154,9 @@ exit $ret %changelog -* Fri Jul 25 2025 Fedora Release Engineering - 0.12.43-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Sat Jan 18 2025 Fedora Release Engineering - 0.12.43-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Mon Dec 23 2024 Remi Collet - 0.12.43-1 -- update to 0.12.43 -- re-license spec file to CECILL-2.1 -- raise dependency on PHP 7.1 - -* Fri Jul 19 2024 Fedora Release Engineering - 0.12.42-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Thu Jan 25 2024 Fedora Release Engineering - 0.12.42-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 0.12.42-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Fri Oct 6 2023 Remi Collet - 0.12.42-2 -- switch to phpunit9 - -* Wed Sep 13 2023 Remi Collet - 0.12.42-1 -- update to 0.12.42 - -* Fri Jul 21 2023 Fedora Release Engineering - 0.12.41-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Fri Jan 20 2023 Fedora Release Engineering - 0.12.41-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - * Thu Aug 18 2022 Remi Collet - 0.12.41-1 - update to 0.12.41 -* Fri Jul 22 2022 Fedora Release Engineering - 0.12.39-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - * Fri Jan 21 2022 Fedora Release Engineering - 0.12.39-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild diff --git a/sources b/sources index b9268ad..cb87255 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-swaggest-json-schema-0.12.43-1f3a77a.tgz) = fc1961dfb66d289af17ad602fd01edebb0d9647c28a93203c931a9290eb56eb9e5cdc764878d2e267a4940fbe2d0f9295c375236c184ca15b49d843a7a327969 +SHA512 (php-swaggest-json-schema-0.12.41-1bb9790.tgz) = 80a21c34645bd8863b84bcd485f809a1c389e118a07a7f462314b9b873b624072c99081bf93dbaa194938af95bb264e54dbc22863c8a355e99535beb2785d096