From 2825ce4ef4ff9178702b8c3561fb99d295f7ac62 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 30 Sep 2022 12:22:10 +0200 Subject: update to 2.0.0 rename to php-doctrine-collections2 install in /usr/share/php/Doctrine/Common/Collections2 raise dependency on PHP 8.1 --- Makefile | 4 ++++ composer.json | 12 +++++++----- php-doctrine-collections2.spec | 44 +++++++++++++++++++++++++----------------- 3 files changed, 37 insertions(+), 23 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + diff --git a/composer.json b/composer.json index d9422dd..209e0e6 100644 --- a/composer.json +++ b/composer.json @@ -33,13 +33,15 @@ ], "homepage": "https://www.doctrine-project.org/projects/collections.html", "require": { - "php": "^7.1.3 || ^8.0", - "doctrine/deprecations": "^0.5.3 || ^1" + "php": "^8.1", + "doctrine/deprecations": "^1" }, "require-dev": { - "doctrine/coding-standard": "^9.0 || ^10.0", - "phpstan/phpstan": "^1.4.8", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5", + "ext-json": "*", + "doctrine/coding-standard": "^10.0", + "phpstan/phpstan": "^1.8", + "phpstan/phpstan-phpunit": "^1.0", + "phpunit/phpunit": "^9.5", "vimeo/psalm": "^4.22" }, "autoload": { diff --git a/php-doctrine-collections2.spec b/php-doctrine-collections2.spec index 71a8507..5bd60d4 100644 --- a/php-doctrine-collections2.spec +++ b/php-doctrine-collections2.spec @@ -1,6 +1,4 @@ -# remirepo spec file for php-doctrine-collections, from: -# -# Fedora spec file for php-doctrine-collections +# remirepo/Fedora spec file for php-doctrine-collections # # Copyright (c) 2013-2022 Shawn Iwinski, Remi Collet # @@ -12,15 +10,17 @@ %global github_owner doctrine %global github_name collections -%global github_version 1.8.0 -%global github_commit 2b44dd4cbca8b5744327de78bafef5945c7e7b5e +%global github_version 2.0.0 +%global github_commit fbc051ebfdb0d11560c86491867cb9268a4d1a8e %global composer_vendor doctrine %global composer_project collections -# "php": "^7.1.3 || ^8.0" -%global php_min_ver 7.1.3 -# "doctrine/deprecations": "^0.5.3 || ^1" +%global major 2 + +# "php": "^8.1" +%global php_min_ver 8.1 +# "doctrine/deprecations": "^1" %global doctrine_depr_min_ver 1 %global doctrine_depr_max_ver 2 @@ -29,10 +29,10 @@ %{!?phpdir: %global phpdir %{_datadir}/php} -Name: php-%{composer_vendor}-%{composer_project} +Name: php-%{composer_vendor}-%{composer_project}%{major} Version: %{github_version} Release: 1%{?github_release}%{?dist} -Summary: Collections abstraction library +Summary: Collections abstraction library, version %{major} License: MIT URL: https://github.com/%{github_owner}/%{github_name} @@ -49,6 +49,7 @@ BuildArch: noarch %global phpunit %{_bindir}/phpunit9 BuildRequires: %{phpunit} BuildRequires: php(language) >= %{php_min_ver} +BuildRequires: php-json # remirepo:1 %if 0%{?fedora} >= 27 || 0%{?rhel} >= 8 BuildRequires: (php-composer(doctrine/deprecations) >= %{doctrine_depr_min_ver} with php-composer(doctrine/deprecations) < %{doctrine_depr_max_ver}) @@ -56,7 +57,7 @@ BuildRequires: (php-composer(doctrine/deprecations) >= %{doctrine_depr_min_ver} %else BuildRequires: php-doctrine-deprecations %endif -## phpcompatinfo (computed from version 1.6.0) +## phpcompatinfo (computed from version 2.0.0) BuildRequires: php-pcre BuildRequires: php-spl %endif @@ -72,7 +73,7 @@ Requires: (php-composer(doctrine/deprecations) >= %{doctrine_depr_min_ver} w %else Requires: php-doctrine-deprecations %endif -# phpcompatinfo (computed from version 1.6.0) +# phpcompatinfo (computed from version 2.0.0) Requires: php-pcre Requires: php-spl # Autoloader @@ -95,12 +96,13 @@ Autoloader: %{phpdir}/Doctrine/Common/Collections/autoload.php %build +mv lib/Doctrine/Common/Collections lib/Doctrine/Common/Collections%{major} : Create autoloader phpab --template fedora \ - --output lib/Doctrine/Common/Collections/autoload.php \ - lib/Doctrine/Common/Collections + --output lib/Doctrine/Common/Collections%{major}/autoload.php \ + lib/Doctrine/Common/Collections%{major} -cat <<'AUTOLOAD' | tee -a lib/Doctrine/Common/Collections/autoload.php +cat <<'AUTOLOAD' | tee -a lib/Doctrine/Common/Collections%{major}/autoload.php \Fedora\Autoloader\Dependencies::required([ '%{phpdir}/Doctrine/Deprecations/autoload.php', ]); @@ -117,13 +119,13 @@ cp -rp lib/* %{buildroot}%{phpdir}/ : Create tests bootstrap cat <<'BOOTSTRAP' | tee bootstrap.php - 2.0.0-1 +- update to 2.0.0 +- rename to php-doctrine-collections2 +- install in /usr/share/php/Doctrine/Common/Collections2 +- raise dependency on PHP 8.1 + * Fri Sep 30 2022 Remi Collet - 1.8.0-1 - update to 1.8.0 -- cgit