From 112ddc61e003b6a0bbf9cf6d2b31f028d177cd35 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 13 Jun 2024 09:12:49 +0200 Subject: [PATCH 1/2] update to 1.12.0 disable test suite use classmap autoloader (cherry picked from commit 25f4869a2fad3b6017efd4369fc4e3801238e8ee) --- .gitignore | 1 + php-myclabs-deep-copy-autoload.php | 7 ------ php-myclabs-deep-copy.spec | 36 +++++++++++++++++++++--------- sources | 2 +- 4 files changed, 27 insertions(+), 19 deletions(-) delete mode 100644 php-myclabs-deep-copy-autoload.php diff --git a/.gitignore b/.gitignore index 4f553a4..77f505d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ clog /php-myclabs-deep-copy-1.10.3-c6a951b.tgz /php-myclabs-deep-copy-1.11.0-14daed4.tgz /php-myclabs-deep-copy-1.11.1-7284c22.tgz +/php-myclabs-deep-copy-1.12.0-3a6b9a4.tgz diff --git a/php-myclabs-deep-copy-autoload.php b/php-myclabs-deep-copy-autoload.php deleted file mode 100644 index 3ed49e9..0000000 --- a/php-myclabs-deep-copy-autoload.php +++ /dev/null @@ -1,7 +0,0 @@ -= 40 || 0%{?rhel} >= 10 +# Disabled as missing doctrine packages +%bcond_with tests +%else +%bcond_without tests +%endif + +%global gh_commit 3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner myclabs %global gh_project DeepCopy %global c_project deep-copy %global major %nil %global php_home %{_datadir}/php -%bcond_without tests Name: php-myclabs-deep-copy%{major} -Version: 1.11.1 +Version: 1.12.0 Release: 2%{?dist} Summary: Create deep copies (clones) of your objects @@ -26,7 +32,6 @@ URL: https://github.com/%{gh_owner}/%{gh_project} # git snashop to get upstream test suite Source0: php-myclabs-deep-copy-%{version}-%{gh_short}.tgz Source1: makesrc.sh -Source2: php-myclabs-deep-copy-autoload.php BuildArch: noarch %if %{with tests} @@ -37,13 +42,15 @@ BuildRequires: php-spl # From composer.json, "require-dev": { # "doctrine/collections": "^1.6.8", # "doctrine/common": "^2.13.3 || ^3.2.2", +# "phpspec/prophecy": "^1.10", # "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" BuildRequires: (php-composer(doctrine/collections) >= 1.6.8 with php-composer(doctrine/collections) < 2) BuildRequires: (php-composer(doctrine/common) >= 3.2.2 with php-composer(doctrine/common) < 4) +BuildRequires: (php-composer(phpspec/prophecy) >= 1.10 with php-composer(phpspec/prophecy) < 2) BuildRequires: phpunit9 >= 9.5.13 -# Required by autoloader -BuildRequires: php-composer(fedora/autoloader) %endif +# For autoloader +BuildRequires: php-fedora-autoloader-devel # From composer.json, "require": { # "php": "^7.1 || ^8.0" @@ -66,11 +73,12 @@ It is designed to handle cycles in the association graph. %prep %setup -q -n %{gh_project}-%{gh_commit} -cp %{SOURCE2} src/%{gh_project}/autoload.php - %build -# Empty build section, most likely nothing required. +phpab --template fedora --output src/%{gh_project}/autoload.php src/%{gh_project} +cat << 'EOF' | tee -a src/%{gh_project}/autoload.php +require_once __DIR__ . '/deep_copy.php'; +EOF %install @@ -90,11 +98,12 @@ require '%{buildroot}%{php_home}/%{gh_project}%{major}/autoload.php'; \Fedora\Autoloader\Dependencies::required([ '%{php_home}/Doctrine/Common/Collections/autoload.php', '%{php_home}/Doctrine/Common3/autoload.php', + '%{php_home}/Prophecy/autoload.php', ]); EOF ret=0 -for cmd in php php80 php81 php82; do +for cmd in php php81 php82 php83; do if which $cmd; then $cmd -d auto_prepend_file=vendor/autoload.php \ %{_bindir}/phpunit9 --verbose || ret=1 @@ -114,6 +123,11 @@ exit $ret %changelog +* Thu Jun 13 2024 Remi Collet - 1.12.0-2 +- update to 1.12.0 +- disable test suite +- use classmap autoloader + * Fri Jul 21 2023 Fedora Release Engineering - 1.11.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 3479dbf..36b5cab 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-myclabs-deep-copy-1.11.1-7284c22.tgz) = 48b21b396ddf5de684c13304bd938fc959b2c4401808c9c2e0d11aba760c8327acbf5a5ddb619c118a6a1744e1e5f646cd58fa97688b880a7291957a5da0cf2b +SHA512 (php-myclabs-deep-copy-1.12.0-3a6b9a4.tgz) = 1dfcf3191276d042af46cd9e95dc6d0293e7889be54cceb7757cdce6b4440e2f52d2277cc45ac8ad1ab3e4650c87e5c049cc138b942cb498b7b7359a3cd2f9a4 From 5cebbd207483e1481f6895c74bb3c23d70db1ff9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Tue, 12 Nov 2024 10:19:37 +0100 Subject: [PATCH 2/2] v1.12.1 (cherry picked from commit 44e2237a29594eba62bd8641e1e8af66962b6e21) (cherry picked from commit 9c310860f50fcf4552d3788846d0f253e2e77651) --- .gitignore | 1 + php-myclabs-deep-copy.spec | 28 ++++++++++++++-------------- sources | 2 +- 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.gitignore b/.gitignore index 77f505d..d749b7e 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ clog /php-myclabs-deep-copy-1.11.0-14daed4.tgz /php-myclabs-deep-copy-1.11.1-7284c22.tgz /php-myclabs-deep-copy-1.12.0-3a6b9a4.tgz +/php-myclabs-deep-copy-1.12.1-123267b.tgz diff --git a/php-myclabs-deep-copy.spec b/php-myclabs-deep-copy.spec index 094ded5..255d020 100644 --- a/php-myclabs-deep-copy.spec +++ b/php-myclabs-deep-copy.spec @@ -6,14 +6,9 @@ # # Please, preserve the changelog entries # -%if 0%{?fedora} >= 40 || 0%{?rhel} >= 10 -# Disabled as missing doctrine packages -%bcond_with tests -%else %bcond_without tests -%endif -%global gh_commit 3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c +%global gh_commit 123267b2c49fbf30d78a7b2d333f6be754b94845 %global gh_short %(c=%{gh_commit}; echo ${c:0:7}) %global gh_owner myclabs %global gh_project DeepCopy @@ -22,8 +17,8 @@ %global php_home %{_datadir}/php Name: php-myclabs-deep-copy%{major} -Version: 1.12.0 -Release: 2%{?dist} +Version: 1.12.1 +Release: 1%{?dist} Summary: Create deep copies (clones) of your objects @@ -44,8 +39,6 @@ BuildRequires: php-spl # "doctrine/common": "^2.13.3 || ^3.2.2", # "phpspec/prophecy": "^1.10", # "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" -BuildRequires: (php-composer(doctrine/collections) >= 1.6.8 with php-composer(doctrine/collections) < 2) -BuildRequires: (php-composer(doctrine/common) >= 3.2.2 with php-composer(doctrine/common) < 4) BuildRequires: (php-composer(phpspec/prophecy) >= 1.10 with php-composer(phpspec/prophecy) < 2) BuildRequires: phpunit9 >= 9.5.13 %endif @@ -96,17 +89,21 @@ require '%{buildroot}%{php_home}/%{gh_project}%{major}/autoload.php'; \Fedora\Autoloader\Autoload::addPsr4('DeepCopy\\', dirname(__DIR__).'/fixtures/'); \Fedora\Autoloader\Autoload::addPsr4('DeepCopyTest\\', dirname(__DIR__).'/tests/DeepCopyTest/'); \Fedora\Autoloader\Dependencies::required([ - '%{php_home}/Doctrine/Common/Collections/autoload.php', - '%{php_home}/Doctrine/Common3/autoload.php', '%{php_home}/Prophecy/autoload.php', ]); EOF +# disable doctrine related tests +rm -r tests/DeepCopyTest/Matcher/Doctrine \ + tests/DeepCopyTest/Filter/Doctrine + ret=0 -for cmd in php php81 php82 php83; do +for cmd in php php81 php82 php83 php84; do if which $cmd; then $cmd -d auto_prepend_file=vendor/autoload.php \ - %{_bindir}/phpunit9 --verbose || ret=1 + %{_bindir}/phpunit9 \ + --filter '^((?!(test_it_can_apply_two_filters_with_chainable_filter|test_it_can_copy_property_after_applying_doctrine_proxy_filter_with_chainable_filter)).)*$' \ + --verbose || ret=1 fi done exit $ret @@ -123,6 +120,9 @@ exit $ret %changelog +* Tue Nov 12 2024 Remi Collet - 1.12.1-1 +- update to 1.12.1 + * Thu Jun 13 2024 Remi Collet - 1.12.0-2 - update to 1.12.0 - disable test suite diff --git a/sources b/sources index 36b5cab..de3ea4d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (php-myclabs-deep-copy-1.12.0-3a6b9a4.tgz) = 1dfcf3191276d042af46cd9e95dc6d0293e7889be54cceb7757cdce6b4440e2f52d2277cc45ac8ad1ab3e4650c87e5c049cc138b942cb498b7b7359a3cd2f9a4 +SHA512 (php-myclabs-deep-copy-1.12.1-123267b.tgz) = bebe1e171e4924f76ef0bac091e79188ddf0e989c682212cc309c3c2700339cf1e12837bc3ba6673c2d5f47217250af7c719a2bca0f61ab64378715c9483383c