public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/php-mockery] rawhide: update to 1.6.15
@ 2026-08-25 10:23 Remi Collet
  0 siblings, 0 replies; only message in thread
From: Remi Collet @ 2026-08-25 10:23 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/php-mockery
            Branch : rawhide
            Commit : cca7d7f9730fb0ad0a1e886292920bad0b9e3d5d
            Author : Remi Collet <remi@fedoraproject.org>
            Date   : 2026-08-25T12:23:42+02:00
            Stats  : +63/-37 in 4 file(s)
            URL    : https://src.fedoraproject.org/rpms/php-mockery/c/cca7d7f9730fb0ad0a1e886292920bad0b9e3d5d?branch=rawhide

            Log:
            update to 1.6.15

allow hamcrest/hamcrest-php 3.0

---
diff --git a/.gitignore b/.gitignore
index 094cc27..a02afed 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,3 +25,4 @@ clog
 /php-mockery-1.6.10-47065d1.tgz
 /php-mockery-1.6.11-81a161d.tgz
 /php-mockery-1.6.12-1f4efdd.tgz
+/php-mockery-1.6.15.tgz

diff --git a/makesrc.sh b/makesrc.sh
index 87a1c0b..59cf430 100755
--- a/makesrc.sh
+++ b/makesrc.sh
@@ -4,25 +4,24 @@ NAME=$(basename $PWD)
 OWNER=$(sed   -n '/^%global gh_owner/{s/.* //;p}'   $NAME.spec)
 PROJECT=$(sed -n '/^%global gh_project/{s/.* //;p}' $NAME.spec)
 VERSION=$(sed -n '/^Version:/{s/.* //;p}'           $NAME.spec)
-COMMIT=$(sed  -n '/^%global gh_commit/{s/.* //;p}'  $NAME.spec)
-SHORT=${COMMIT:0:7}
 
-echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION, Commit=$COMMIT\n"
+if [ -f $NAME-$VERSION.tgz ]; then
+	echo "$NAME-$VERSION.tgz already there"
+else
+	echo -e "\nCreate git snapshot\nName=$NAME, Owner=$OWNER, Project=$PROJECT, Version=$VERSION	\n"
 
-echo "Cloning..."
-git clone --recursive https://github.com/$OWNER/$PROJECT.git $PROJECT-$COMMIT
+	echo "Cloning..."
+	rm -rf $PROJECT-$VERSION
+	git clone https://github.com/$OWNER/$PROJECT.git --depth 1 --branch $VERSION $PROJECT-$VERSION || exit 1
 
-echo "Getting commit..."
-pushd $PROJECT-$COMMIT
-git checkout $COMMIT
-cp composer.json ../composer.json
-popd
+	echo "Getting composer..."
+	cp $PROJECT-$VERSION/composer.json composer.json
 
-echo "Archiving..."
-tar czf $NAME-$VERSION-$SHORT.tgz --exclude-vcs $PROJECT-$COMMIT
+	echo "Archiving..."
+	tar czf $NAME-$VERSION.tgz --exclude-vcs --exclude tools $PROJECT-$VERSION
 
-echo "Cleaning..."
-rm -rf $PROJECT-$COMMIT
-
-echo "Done."
+	echo "Cleaning..."
+	rm -rf $PROJECT-$VERSION
 
+	echo "Done."
+fi

diff --git a/php-mockery.spec b/php-mockery.spec
index b352c8e..c99f64a 100644
--- a/php-mockery.spec
+++ b/php-mockery.spec
@@ -8,21 +8,19 @@
 #
 %bcond_without       tests
 
-%global gh_commit    1f4efdd7d3beafe9807b08156dfcb176d18f1699
-%global gh_short     %(c=%{gh_commit}; echo ${c:0:7})
 %global gh_owner     mockery
 %global gh_project   mockery
 %global ns_project   Mockery
 %global major        1
 
 Name:           php-mockery
-Version:        1.6.12
-Release:        6%{?dist}
+Version:        1.6.15
+Release:        1%{?dist}
 Summary:        Mockery is a simple but flexible PHP mock object framework
 
 License:        BSD-3-Clause
 URL:            https://github.com/%{gh_owner}/%{gh_project}
-Source0:        %{name}-%{version}-%{gh_short}.tgz
+Source0:        %{name}-%{version}.tgz
 Source1:        makesrc.sh
 
 # Use our autoloader
@@ -32,11 +30,11 @@ BuildArch:      noarch
 %if %{with tests}
 BuildRequires:  php(language) >= 7.3
 # From composer.json, "require-dev": {
-#        "phpunit/phpunit": "^8.5 || ^9.6.17",
-#        "symplify/easy-coding-standard": "^12.1.4"
+#        "phpunit/phpunit": "^9.6.36",
+#        "symplify/easy-coding-standard": "^13.2.17"
 %global phpunit %{_bindir}/phpunit9
-BuildRequires: phpunit9 >= 9.6.17
-BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3)
+BuildRequires: phpunit9 >= 9.6.36
+BuildRequires: (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 4)
 BuildRequires:  php-pdo
 # Autoloader
 %endif
@@ -44,10 +42,9 @@ BuildRequires:  php-fedora-autoloader-devel
 
 # From composer.json, "require": {
 #        "php": ">=7.3",
-#        "lib-pcre": ">=7.0",
-#        "hamcrest/hamcrest-php": "~2.0"
+#        "hamcrest/hamcrest-php": "^2.0 || ^3.0"
 Requires:       php(language) >= 7.3
-Requires:      (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 3)
+Requires:      (php-composer(hamcrest/hamcrest-php) >= 2.0.1 with php-composer(hamcrest/hamcrest-php) < 4)
 # From phpcompatinfo report for version 1.4.2
 Requires:       php-pcre
 Requires:       php-spl
@@ -67,7 +64,7 @@ Autoloader: %{_datadir}/php/%{ns_project}%{major}/autoload.php
 
 
 %prep
-%setup -q -n %{gh_project}-%{gh_commit}
+%setup -q -n %{gh_project}-%{version}
 
 mv library/*.php library/%{ns_project}/
 phpab --template fedora --output library/%{ns_project}/autoload.php library
@@ -75,7 +72,10 @@ phpab --template fedora --output library/%{ns_project}/autoload.php library
 cat << 'EOF' | tee -a library/%{ns_project}/autoload.php
 
 \Fedora\Autoloader\Dependencies::required([
-    '/usr/share/php/Hamcrest2/autoload.php',
+    [
+        '/usr/share/php/Hamcrest3/autoload.php',
+        '/usr/share/php/Hamcrest2/autoload.php',
+    ],
     __DIR__ . '/helpers.php',
 ]);
 EOF
@@ -96,18 +96,40 @@ cp -rp library/%{ns_project} %{buildroot}/%{_datadir}/php/%{ns_project}%{major}
 
 %check
 %if %{with tests}
-: Use installed tree and our autoloader
-export COMPOSER_VENDOR_DIR=%{buildroot}%{_datadir}/php/%{ns_project}%{major}
-
-phpab --output tests/classmap.php --exclude */SemiReservedWordsAsMethods.php tests/Mockery tests/Fixture
+mkdir vendor
+phpab --output vendor/classmap.php \
+  tests/Unit \
+  tests/Fixture/PHP73 \
+  tests/Fixture/PHP74 \
+  tests/Fixture/PHP80 \
+  tests/Fixture/PHP81 \
+  tests/Fixture/PHP82 \
+  tests/Fixture/PHP83 \
+  tests/Fixture/PHP84 \
+  tests/Fixture/PHP85 \
+  tests/Fixture/PHP86 \
+  tests/Fixture/Namespaced
+
+cat << 'EOF' | tee vendor/autoload.php
+<?php
+require_once "%{buildroot}/%{_datadir}/php/%{ns_project}%{major}/autoload.php";
+require_once __DIR__ . "/classmap.php";
+require_once __DIR__ . "/../tests/Bootstrap.php";
+EOF
 
 : Run upstream test suite
 ret=0
 
 # need investigation
-rm tests/Mockery/MockeryCanMockClassesWithSemiReservedWordsTest.php
+rm tests/Unit/Mockery/HamcrestExpectationTest.php
+
+# Simple ooutput
+sed -e '/testdox/d' phpunit.xml.dist >phpunit.xml
 
-for cmd in php php81 php82 php83; do
+# For PHP 8.6
+sed -e '/Deprecations/d' -i phpunit.xml
+
+for cmd in php php82 php83 php84 php85 php86; do
   if which $cmd; then
     $cmd %{_bindir}/phpunit9 \
       --no-coverage \
@@ -127,6 +149,10 @@ exit $ret
 
 
 %changelog
+* Tue Aug 25 2026 Remi Collet <remi@remirepo.net> - 1.6.15-1
+- update to 1.6.15
+- allow hamcrest/hamcrest-php 3.0
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.6.12-6
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

diff --git a/sources b/sources
index dbf35b7..ab39e49 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (php-mockery-1.6.12-1f4efdd.tgz) = ae7279d730160e516586f56edfaf7bca63ece0b0f4e5dfd5764f1f8765242490d79a36b7486edac1f3bfd93dce214e5c2e06bb84849793c966e74c2dce418f51
+SHA512 (php-mockery-1.6.15.tgz) = de727ac0b66556d423ae242c7c9f02df5e5d2ef51a7ae0d65e3bc5376a59c8f29fb303c41a2c3cbbbd9a0d4382089038470aaef92f4babc2cebfa8a5918b0cdc

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-25 10:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-25 10:23 [rpms/php-mockery] rawhide: update to 1.6.15 Remi Collet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox