From a0ff3ec9e173f8b259a8dff0d8194ea40ab6bc99 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 24 Feb 2020 09:41:46 +0100 Subject: v1.7.0 from Fedora --- composer.json | 9 +++------ makesrc.sh | 1 + php-webmozart-assert.spec | 31 +++++++++++++++++++++++-------- 3 files changed, 27 insertions(+), 14 deletions(-) create mode 120000 makesrc.sh diff --git a/composer.json b/composer.json index b6002ef..34350b2 100644 --- a/composer.json +++ b/composer.json @@ -18,13 +18,10 @@ "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } + "conflict": { + "vimeo/psalm": "<3.6.0" }, "autoload": { "psr-4": { diff --git a/makesrc.sh b/makesrc.sh new file mode 120000 index 0000000..75cb6db --- /dev/null +++ b/makesrc.sh @@ -0,0 +1 @@ +php-webmozart-assert-get-source.sh \ No newline at end of file diff --git a/php-webmozart-assert.spec b/php-webmozart-assert.spec index 78f9864..5e3e26d 100644 --- a/php-webmozart-assert.spec +++ b/php-webmozart-assert.spec @@ -2,7 +2,7 @@ # # Fedora spec file for php-webmozart-assert # -# Copyright (c) 2016-2019 Shawn Iwinski +# Copyright (c) 2016-2020 Shawn Iwinski # # License: MIT # http://opensource.org/licenses/MIT @@ -14,8 +14,8 @@ %global bootstrap 0 %global github_owner webmozart %global github_name assert -%global github_version 1.4.0 -%global github_commit 83e253c8e0be5b0257b881e1827274667c5c17a9 +%global github_version 1.7.0 +%global github_commit aed98a490f9a8f78468232db345ab9cf606cf598 %global composer_vendor webmozart %global composer_project assert @@ -23,6 +23,15 @@ # "php": "^5.3.3 || ^7.0" %global php_min_ver 5.3.3 +# PHPUnit +%if 0%{?fedora} >= 28 || 0%{?rhel} >= 8 +%global phpunit_require phpunit7 +%global phpunit_exec phpunit7 +%else +%global phpunit_require php-composer(phpunit/phpunit) +%global phpunit_exec phpunit +%endif + %if %{bootstrap} # Build using "--with tests" to enable tests %global with_tests 0%{?_with_tests:1} @@ -51,13 +60,14 @@ BuildArch: noarch %if %{with_tests} ## composer.json BuildRequires: php(language) >= %{php_min_ver} -BuildRequires: php-composer(phpunit/phpunit) -## phpcompatinfo (computed from version 1.4.0) +BuildRequires: %{phpunit_require} +## phpcompatinfo (computed from version 1.7.0) BuildRequires: php-ctype BuildRequires: php-filter BuildRequires: php-mbstring BuildRequires: php-pcre BuildRequires: php-reflection +BuildRequires: php-simplexml BuildRequires: php-spl ## Autoloader BuildRequires: php-composer(fedora/autoloader) @@ -65,7 +75,7 @@ BuildRequires: php-composer(fedora/autoloader) # composer.json Requires: php(language) >= %{php_min_ver} -# phpcompatinfo (computed from version 1.4.0) +# phpcompatinfo (computed from version 1.7.0) Requires: php-ctype Requires: php-filter Requires: php-mbstring @@ -120,8 +130,8 @@ BOOTSTRAP : Upstream tests RETURN_CODE=0 -PHPUNIT=$(which phpunit) -for PHP_EXEC in php %{?rhel:php54 php55 php56} php70 php71 php72 php73; do +PHPUNIT=$(which %{phpunit_exec}) +for PHP_EXEC in php %{?rhel:php54 php55 php56 php70 php71} php72 php73 php74; do if [ -z "$PHP_EXEC" ] || which $PHP_EXEC; then $PHP_EXEC \ -d auto_prepend_file=%{buildroot}%{phpdir}/Webmozart/Assert/autoload.php \ @@ -146,6 +156,11 @@ exit $RETURN_CODE %changelog +* Sun Feb 23 2020 Shawn Iwinski - 1.7.0-1 +- Update to 1.7.0 (RHBZ #1746998) +- Disable bootstrap so tests run by default +- Conditionally use PHPUnit 7 + * Sun May 19 2019 Shawn Iwinski - 1.4.0-1 - Update to 1.4.0 -- cgit