summaryrefslogtreecommitdiffstats
path: root/php-doctrine-orm-bin.patch
blob: 77992f0dd2974a6b2295f650d1a201357d9f78c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
diff --git a/bin/doctrine.php b/bin/doctrine.php
index 842c5493f..e1ccb7506 100755
--- a/bin/doctrine.php
+++ b/bin/doctrine.php
@@ -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;
 
-$autoloadFiles = [
-    __DIR__ . '/../vendor/autoload.php',
-    __DIR__ . '/../../../autoload.php'
-];
-
-foreach ($autoloadFiles as $autoloadFile) {
-    if (file_exists($autoloadFile)) {
-        require_once $autoloadFile;
-        break;
-    }
-}
+require_once '__PHPDIR__/Doctrine/ORM/autoload.php';
 
 $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
@@ -45,7 +45,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()));
     }