summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2022-09-09 08:51:40 +0200
committerRemi Collet <remi@php.net>2022-09-09 08:51:40 +0200
commit98dc7776b3164973ff988565c5525008bb181a8a (patch)
tree67a89571d22e7a26136b76c475617a3176d4990c
parent25702d8c2e195062ca8daa077771b842bb997a9e (diff)
update to 1.7.2
switch to classmap autoloader add dependency on doctrine/deprecations
-rw-r--r--composer.json5
-rw-r--r--php-doctrine-collections.spec51
2 files changed, 39 insertions, 17 deletions
diff --git a/composer.json b/composer.json
index 4409f10..d9422dd 100644
--- a/composer.json
+++ b/composer.json
@@ -33,10 +33,11 @@
],
"homepage": "https://www.doctrine-project.org/projects/collections.html",
"require": {
- "php": "^7.1.3 || ^8.0"
+ "php": "^7.1.3 || ^8.0",
+ "doctrine/deprecations": "^0.5.3 || ^1"
},
"require-dev": {
- "doctrine/coding-standard": "^9.0",
+ "doctrine/coding-standard": "^9.0 || ^10.0",
"phpstan/phpstan": "^1.4.8",
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.1.5",
"vimeo/psalm": "^4.22"
diff --git a/php-doctrine-collections.spec b/php-doctrine-collections.spec
index 2b16c32..9b51f3e 100644
--- a/php-doctrine-collections.spec
+++ b/php-doctrine-collections.spec
@@ -2,7 +2,7 @@
#
# Fedora spec file for php-doctrine-collections
#
-# Copyright (c) 2013-2020 Shawn Iwinski <shawn.iwinski@gmail.com>
+# Copyright (c) 2013-2022 Shawn Iwinski, Remi Collet
#
# License: MIT
# http://opensource.org/licenses/MIT
@@ -12,14 +12,17 @@
%global github_owner doctrine
%global github_name collections
-%global github_version 1.6.9
-%global github_commit 1269d42c03f8a1cc9b56a1b727568423268a191b
+%global github_version 1.7.2
+%global github_commit 3fe77330f5591108bbf1315da7377a7e704ed8a0
%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 doctrine_depr_min_ver 1
+%global doctrine_depr_max_ver 2
# Build using "--without tests" to disable tests
%bcond_without tests
@@ -46,15 +49,29 @@ BuildArch: noarch
%global phpunit %{_bindir}/phpunit9
BuildRequires: %{phpunit}
BuildRequires: php(language) >= %{php_min_ver}
+# 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})
+# remirepo:3
+%else
+BuildRequires: php-doctrine-deprecations
+%endif
## phpcompatinfo (computed from version 1.6.0)
BuildRequires: php-pcre
BuildRequires: php-spl
-# Autoloader
-BuildRequires: php-composer(fedora/autoloader)
%endif
+# Autoloader
+BuildRequires: php-fedora-autoloader-devel
# composer.json
Requires: php(language) >= %{php_min_ver}
+# remirepo:1
+%if 0%{?fedora} >= 27 || 0%{?rhel} >= 8
+Requires: (php-composer(doctrine/deprecations) >= %{doctrine_depr_min_ver} with php-composer(doctrine/deprecations) < %{doctrine_depr_max_ver})
+# remirepo:3
+%else
+Requires: php-doctrine-deprecations
+%endif
# phpcompatinfo (computed from version 1.6.0)
Requires: php-pcre
Requires: php-spl
@@ -79,15 +96,14 @@ Autoloader: %{phpdir}/Doctrine/Common/Collections/autoload.php
%build
: Create autoloader
-cat <<'AUTOLOAD' | tee lib/Doctrine/Common/Collections/autoload.php
-<?php
-/**
- * Autoloader for %{name} and its' dependencies
- * (created by %{name}-%{version}-%{release}).
- */
-require_once '%{phpdir}/Fedora/Autoloader/autoload.php';
-
-\Fedora\Autoloader\Autoload::addPsr4('Doctrine\\Common\\Collections\\', __DIR__);
+phpab --template fedora \
+ --output lib/Doctrine/Common/Collections/autoload.php \
+ lib/Doctrine/Common/Collections
+
+cat <<'AUTOLOAD' | tee -a lib/Doctrine/Common/Collections/autoload.php
+\Fedora\Autoloader\Dependencies::required([
+ '%{phpdir}/Doctrine/Deprecations/autoload.php',
+]);
AUTOLOAD
@@ -107,7 +123,7 @@ BOOTSTRAP
: Upstream tests
SCL_RETURN_CODE=0
-for CMD in "php %{phpunit}" php73 php74 php80 php81; do
+for CMD in "php %{phpunit}" php74 php80 php81 php82; do
if which $CMD; then
set $CMD
$1 ${2:-%{_bindir}/phpunit9} --verbose --bootstrap bootstrap.php \
@@ -132,6 +148,11 @@ exit $SCL_RETURN_CODE
%changelog
+* Fri Sep 9 2022 Remi Collet <remi@remirepo.net> - 1.7.2-1
+- update to 1.7.2
+- switch to classmap autoloader
+- add dependency on doctrine/deprecations
+
* Fri Sep 9 2022 Remi Collet <remi@remirepo.net> - 1.6.9-1
- update to 1.6.9