diff --git a/.gitignore b/.gitignore index 5c63c47..9cce133 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ /php-webimpress-safe-writer-2.0.0-d03bea3b98abe1d4c8b24cbebf524361ffaafee4.tar.gz +/php-webimpress-safe-writer-2.1.0-5cfafdec5873c389036f14bf832a5efc9390dcdd.tar.gz +/php-webimpress-safe-writer-2.2.0-9d37cc8bee20f7cb2f58f6e23e05097eab5072e6.tar.gz diff --git a/composer.json b/composer.json index 79cfbf1..fad2280 100644 --- a/composer.json +++ b/composer.json @@ -10,11 +10,12 @@ "race condition" ], "require": { - "php": "^7.2" + "php": "^7.3 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.4.3", - "webimpress/coding-standard": "dev-develop" + "phpunit/phpunit": "^9.5.4", + "vimeo/psalm": "^4.7", + "webimpress/coding-standard": "^1.2.2" }, "autoload": { "psr-4": { @@ -31,18 +32,20 @@ }, "extra": { "branch-alias": { - "dev-master": "2.0.x-dev", - "dev-develop": "2.1.x-dev", + "dev-master": "2.2.x-dev", + "dev-develop": "2.3.x-dev", "dev-release-1.0": "1.0.x-dev" } }, "scripts": { "check": [ "@cs-check", - "@test" + "@test", + "@static-analysis" ], "cs-check": "phpcs", "cs-fix": "phpcbf", + "static-analysis": "psalm --shepherd --stats", "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" } diff --git a/php-webimpress-safe-writer.spec b/php-webimpress-safe-writer.spec index 3f2e70d..623412a 100644 --- a/php-webimpress-safe-writer.spec +++ b/php-webimpress-safe-writer.spec @@ -1,7 +1,7 @@ # # Fedora spec file for php-webimpress-safe-writer # -# Copyright (c) 2020 Shawn Iwinski +# Copyright (c) 2020-2021 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -9,28 +9,28 @@ # Please preserve changelog entries # +%bcond_without tests + %global github_owner webimpress %global github_name safe-writer -%global github_version 2.0.0 -%global github_commit d03bea3b98abe1d4c8b24cbebf524361ffaafee4 +%global github_version 2.2.0 +%global github_commit 9d37cc8bee20f7cb2f58f6e23e05097eab5072e6 %global composer_vendor webimpress %global composer_project safe-writer -# "php": "^7.2" -%global php_min_ver 7.2 - -# Build using "--without tests" to disable tests -%global with_tests 0%{!?_without_tests:1} +# "php": "^7.3 || ^8.0" +%global php_min_ver 7.3 %{!?phpdir: %global phpdir %{_datadir}/php} Name: php-%{composer_vendor}-%{composer_project} Version: %{github_version} -Release: 1%{?github_release}%{?dist} +Release: 12%{?github_release}%{?dist} Summary: Tool to write files safely, to avoid race conditions -License: BSD +# Automatically converted from old format: BSD - review is highly recommended. +License: LicenseRef-Callaway-BSD URL: https://github.com/%{github_owner}/%{github_name} # GitHub export does not include tests @@ -40,10 +40,10 @@ Source1: %{name}-get-source.sh BuildArch: noarch # Tests -%if %{with_tests} +%if %{with tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: phpunit8 +BuildRequires: phpunit9 >= 9.5.4 ## phpcompatinfo for version 2.0.0 BuildRequires: php-json BuildRequires: php-spl @@ -94,18 +94,15 @@ cp -rp src %{buildroot}%{phpdir}/Webimpress/SafeWriter %check -%if %{with_tests} -: Skip test known to fail in mock environment -sed 's/function testMultipleWriters/function SKIP_testMultipleWriters/' \ - -i test/FileWriterTest.php - +%if %{with tests} : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit8) -for PHP_EXEC in php php70 php71 php72 php73 php74; do +PHPUNIT=$(which phpunit9) +for PHP_EXEC in php php73 php74 php80; do if [ "php" == "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC $PHPUNIT --verbose \ --bootstrap %{buildroot}%{phpdir}/Webimpress/SafeWriter/autoload.php \ + --filter '^((?!(testMultipleWriters)).)*$' \ || RETURN_CODE=1 fi done @@ -116,7 +113,6 @@ exit $RETURN_CODE %files -%{!?_licensedir:%global license %%doc} %license LICENSE %doc *.md %doc composer.json @@ -125,5 +121,53 @@ exit $RETURN_CODE %changelog +* Fri Jul 25 2025 Fedora Release Engineering - 2.2.0-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Sat Jan 18 2025 Fedora Release Engineering - 2.2.0-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Wed Sep 4 2024 Miroslav Suchý - 2.2.0-10 +- convert license to SPDX + +* Fri Jul 19 2024 Fedora Release Engineering - 2.2.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Thu Jan 25 2024 Fedora Release Engineering - 2.2.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sun Jan 21 2024 Fedora Release Engineering - 2.2.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 2.2.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jan 20 2023 Fedora Release Engineering - 2.2.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 2.2.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Fri Jan 21 2022 Fedora Release Engineering - 2.2.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jul 27 2021 Fedora Release Engineering - 2.2.0-2 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Apr 20 2021 Remi Collet - 2.2.0-1 +- update to 2.2.0 +- raise dependency on PHP 7.3 +- switch to phpunit9 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Aug 25 2020 Remi Collet - 2.1.0-1 +- update to 2.1.0 + +* Tue Jul 28 2020 Fedora Release Engineering - 2.0.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Sun Feb 23 2020 Shawn Iwinski - 2.0.0-1 - Initial package diff --git a/sources b/sources index 4db2b80..c1b4afc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-webimpress-safe-writer-2.0.0-d03bea3b98abe1d4c8b24cbebf524361ffaafee4.tar.gz) = 4997350df7ca79e9ab2150f437ff9dab6281434627abc6243e6e458be542c882b29dd8c3f90316c87ce02e022aa144ec06dc19aa710621406521265c06229e0d +SHA512 (php-webimpress-safe-writer-2.2.0-9d37cc8bee20f7cb2f58f6e23e05097eab5072e6.tar.gz) = d5f14393e4d226d9f19f0f496087bd1932f0ac7e148f52f208ecf2df2d3275c2a124cf0713565e650371c374fc795f2955351395864eeb1465029b2961c223bf