public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Remi Collet <remi@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/php-mockery] f43: refresh patch
Date: Tue, 25 Aug 2026 10:33:31 GMT [thread overview]
Message-ID: <178765401108.1.9348682935441928704.rpms-php-mockery-9a184899ae92@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/php-mockery
Branch : f43
Commit : 9a184899ae92f0de1e0e04b42ec961dc7bf540d9
Author : Remi Collet <remi@fedoraproject.org>
Date : 2026-08-25T12:33:24+02:00
Stats : +49/-16 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/php-mockery/c/9a184899ae92f0de1e0e04b42ec961dc7bf540d9?branch=f43
Log:
refresh patch
(cherry picked from commit c6f29165fc956f569e0bc5efb6806143ef079194)
---
diff --git a/mockery-tests.patch b/mockery-tests.patch
index 3019204..8c63032 100644
--- a/mockery-tests.patch
+++ b/mockery-tests.patch
@@ -1,18 +1,51 @@
diff -up ./tests/Bootstrap.php.rpm ./tests/Bootstrap.php
---- ./tests/Bootstrap.php.rpm 2018-05-08 10:54:48.000000000 +0200
-+++ ./tests/Bootstrap.php 2018-05-13 10:39:38.471383840 +0200
-@@ -50,11 +50,9 @@ if (!file_exists($autoloadPath)) {
-
- require_once $autoloadPath;
-
--$hamcrestRelativePath = 'hamcrest/hamcrest-php/hamcrest/Hamcrest.php';
--if (DIRECTORY_SEPARATOR !== '/') {
-- $hamcrestRelativePath = str_replace('/', DIRECTORY_SEPARATOR, $hamcrestRelativePath);
--}
--$hamcrestPath = $composerVendorDirectory . DIRECTORY_SEPARATOR . $hamcrestRelativePath;
-+require_once __DIR__ . '/classmap.php';
-+
-+$hamcrestPath = '/usr/share/php/Hamcrest2/Hamcrest.php';
-
- require_once $hamcrestPath;
+--- ./tests/Bootstrap.php.rpm 2026-08-25 11:01:39.000000000 +0200
++++ ./tests/Bootstrap.php 2026-08-25 11:39:03.724218665 +0200
+@@ -46,47 +46,3 @@ if (! \function_exists('vdd')) {
+ }
+ }
+-(static function (string $rootDir): void {
+- $classLoader = require \implode(DIRECTORY_SEPARATOR, [$rootDir, 'vendor', 'autoload.php']);
+- if (! $classLoader instanceof ClassLoader) {
+- throw new RuntimeException('Unable to load ' . ClassLoader::class);
+- }
+-
+- $hamcrestPath = \implode(
+- DIRECTORY_SEPARATOR,
+- [$rootDir, 'vendor', 'hamcrest', 'hamcrest-php', 'hamcrest', 'Hamcrest.php']
+- );
+- if (\file_exists($hamcrestPath)) {
+- require_once $hamcrestPath;
+- }
+-
+- $testsDir = \implode(DIRECTORY_SEPARATOR, [$rootDir, 'tests']);
+- if (! \is_dir($testsDir)) {
+- throw new RuntimeException('Unable to find tests directory: ' . $testsDir);
+- }
+-
+- $fixtureDir = \implode(DIRECTORY_SEPARATOR, [$testsDir, 'Fixture']);
+- if (! \is_dir($fixtureDir)) {
+- throw new RuntimeException('Unable to find fixture directory: ' . $fixtureDir);
+- }
+-
+- // Add autoloading for the fixture classes
+- $classLoader->add('', $fixtureDir . DIRECTORY_SEPARATOR . 'Namespaced');
+- $versions = ['PHP73', 'PHP74', 'PHP80', 'PHP81', 'PHP82', 'PHP83', 'PHP84', 'PHP85', 'PHP86'];
+- foreach ($versions as $version) {
+- $classLoader->addPsr4($version . '\\', $fixtureDir . DIRECTORY_SEPARATOR . $version);
+- }
+- // $classLoader->addPsr4('Tests\\Unit\\', $testsDir . DIRECTORY_SEPARATOR . 'Unit');
+-
+- $debug = false;
+- // If debug is enabled, set up a loader for Mockery to use for generated mock classes
+- if ($debug) {
+- $mocksDirectory = \implode(DIRECTORY_SEPARATOR, [$testsDir, '_mocks']);
+-
+- if (! \file_exists($mocksDirectory)) {
+- \mkdir($mocksDirectory, 0777, true);
+- }
+-
+- Mockery::setLoader(new RequireLoader($mocksDirectory));
+- }
+-})(\dirname(__DIR__));
reply other threads:[~2026-08-25 10:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178765401108.1.9348682935441928704.rpms-php-mockery-9a184899ae92@fedoraproject.org \
--to=remi@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox