blob: 94fae70ee69c6ae47ecdd83fc4f8934a47e9bea1 (
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
42
43
44
45
46
47
48
49
50
51
52
53
|
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
use Symfony\Component\Console\Helper\HelperSet;
@@ -13,17 +14,7 @@ fwrite(
echo PHP_EOL . PHP_EOL;
-$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 ./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());
}
|