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.patch44
1 files changed, 21 insertions, 23 deletions
diff --git a/php-doctrine-orm-bin.patch b/php-doctrine-orm-bin.patch
index 37e0e16..93d6e84 100644
--- a/php-doctrine-orm-bin.patch
+++ b/php-doctrine-orm-bin.patch
@@ -1,7 +1,6 @@
-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.rpm ./bin/doctrine.php
+--- ./bin/doctrine.php.rpm 2021-02-24 11:42:32.000000000 +0100
++++ ./bin/doctrine.php 2021-02-24 11:43:44.654144234 +0100
@@ -1,3 +1,4 @@
+#!/usr/bin/env php
<?php
@@ -26,27 +25,14 @@ index 842c5493f..e1ccb7506 100755
$directories = [getcwd(), getcwd() . DIRECTORY_SEPARATOR . 'config'];
-diff -up a/tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm b/tests/Doctrine/Tests/ORM/Tools/SetupTest.php
---- a/tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm 2019-09-30 08:35:50.547638239 +0200
-+++ b/tests/Doctrine/Tests/ORM/Tools/SetupTest.php 2019-09-30 08:37:02.769360851 +0200
-@@ -43,7 +43,7 @@ class SetupTest extends OrmTestCase
-
- public function testDirectoryAutoload()
- {
-- Setup::registerAutoloadDirectory(__DIR__ . "/../../../../../vendor/doctrine/common/lib");
-+ Setup::registerAutoloadDirectory("/usr/share/php");
-
- $this->assertEquals($this->originalAutoloaderCount + 2, count(spl_autoload_functions()));
- }
-
diff -up ./lib/Doctrine/ORM/Tools/Setup.php.rpm ./lib/Doctrine/ORM/Tools/Setup.php
---- ./lib/Doctrine/ORM/Tools/Setup.php.rpm 2020-05-27 11:28:24.144920624 +0200
-+++ ./lib/Doctrine/ORM/Tools/Setup.php 2020-05-27 11:29:14.330733814 +0200
-@@ -45,7 +45,11 @@ class Setup
+--- ./lib/Doctrine/ORM/Tools/Setup.php.rpm 2021-02-24 11:43:44.654144234 +0100
++++ ./lib/Doctrine/ORM/Tools/Setup.php 2021-02-24 11:45:51.890721815 +0100
+@@ -54,7 +54,11 @@ class Setup
public static function registerAutoloadDirectory($directory)
{
- if (!class_exists('Doctrine\Common\ClassLoader', false)) {
-- require_once $directory . "/Doctrine/Common/ClassLoader.php";
+ if (! class_exists('Doctrine\Common\ClassLoader', false)) {
+- require_once $directory . '/Doctrine/Common/ClassLoader.php';
+ if (file_exists($directory . "/Doctrine/Common3/ClassLoader.php")) {
+ require_once $directory . "/Doctrine/Common3/ClassLoader.php";
+ } else {
@@ -54,4 +40,16 @@ diff -up ./lib/Doctrine/ORM/Tools/Setup.php.rpm ./lib/Doctrine/ORM/Tools/Setup.p
+ }
}
- $loader = new ClassLoader("Doctrine", $directory);
+ $loader = new ClassLoader('Doctrine', $directory);
+diff -up ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php
+--- ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php.rpm 2021-02-24 11:43:44.654144234 +0100
++++ ./tests/Doctrine/Tests/ORM/Tools/SetupTest.php 2021-02-24 11:45:10.370859668 +0100
+@@ -55,7 +55,7 @@ class SetupTest extends OrmTestCase
+
+ public function testDirectoryAutoload(): void
+ {
+- Setup::registerAutoloadDirectory(__DIR__ . '/../../../../../vendor/doctrine/common/lib');
++ Setup::registerAutoloadDirectory("/usr/share/php");
+
+ $this->assertEquals($this->originalAutoloaderCount + 2, count(spl_autoload_functions()));
+ }