summaryrefslogtreecommitdiffstats
path: root/php-doctrine-orm-bin.patch
diff options
context:
space:
mode:
Diffstat (limited to 'php-doctrine-orm-bin.patch')
-rw-r--r--php-doctrine-orm-bin.patch41
1 files changed, 33 insertions, 8 deletions
diff --git a/php-doctrine-orm-bin.patch b/php-doctrine-orm-bin.patch
index 4b6ffa5..94fae70 100644
--- a/php-doctrine-orm-bin.patch
+++ b/php-doctrine-orm-bin.patch
@@ -1,15 +1,14 @@
-diff --git a/bin/doctrine.php b/bin/doctrine.php
-index 842c5493f..e1ccb7506 100755
---- a/bin/doctrine.php
-+++ b/bin/doctrine.php
+diff -up ./bin/doctrine.php.rpm1 ./bin/doctrine.php
+--- ./bin/doctrine.php.rpm1 2022-09-23 11:23:08.000000000 +0200
++++ ./bin/doctrine.php 2022-09-23 11:30:54.541647836 +0200
@@ -1,3 +1,4 @@
+#!/usr/bin/env php
<?php
- /*
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-@@ -20,17 +21,7 @@
+
use Symfony\Component\Console\Helper\HelperSet;
- use Doctrine\ORM\Tools\Console\ConsoleRunner;
+@@ -13,17 +14,7 @@ fwrite(
+
+ echo PHP_EOL . PHP_EOL;
-$autoloadFiles = [
- __DIR__ . '/../vendor/autoload.php',
@@ -26,3 +25,29 @@ index 842c5493f..e1ccb7506 100755
$directories = [getcwd(), getcwd() . DIRECTORY_SEPARATOR . 'config'];
+diff -up ./lib/Doctrine/ORM/Tools/Setup.php.rpm1 ./lib/Doctrine/ORM/Tools/Setup.php
+--- ./lib/Doctrine/ORM/Tools/Setup.php.rpm1 2022-09-23 11:30:54.542647834 +0200
++++ ./lib/Doctrine/ORM/Tools/Setup.php 2022-09-23 11:32:10.791505590 +0200
+@@ -54,7 +54,9 @@ class Setup
+ public static function registerAutoloadDirectory($directory)
+ {
+ if (! class_exists('Doctrine\Common\ClassLoader', false)) {
+- if (file_exists($directory . '/Doctrine/Common/ClassLoader.php')) {
++ if (file_exists($directory . "/Doctrine/Common3/ClassLoader.php")) {
++ require_once $directory . "/Doctrine/Common3/ClassLoader.php";
++ } elseif (file_exists($directory . '/Doctrine/Common/ClassLoader.php')) {
+ require_once $directory . '/Doctrine/Common/ClassLoader.php';
+ } elseif (file_exists(dirname($directory) . '/src/ClassLoader.php')) {
+ require_once dirname($directory) . '/src/ClassLoader.php';
+diff -up ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm1 ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php
+--- ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm1 2022-09-23 11:23:08.000000000 +0200
++++ ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php 2022-09-23 11:30:54.542647834 +0200
+@@ -54,7 +54,7 @@ class SetupTest extends TestCase
+
+ public function testDirectoryAutoload(): void
+ {
+- Setup::registerAutoloadDirectory(__DIR__ . '/../../../../../vendor/doctrine/common/lib');
++ Setup::registerAutoloadDirectory("/usr/share/php");
+
+ self::assertCount($this->originalAutoloaderCount + 2, spl_autoload_functions());
+ }