Skip to content

Commit 6b01513

Browse files
author
Cliff Odijk
committed
Add recursive find for an autoloader
1 parent 2e3123b commit 6b01513

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/DependencyInjection/Compiler/AutoRegister.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
66
use Symfony\Component\DependencyInjection\ContainerBuilder;
77

8-
/**
9-
* @author Kevin Bond <kevinbond@gmail.com>
10-
*/
118
final class AutoRegister implements CompilerPassInterface
129
{
1310
private $tagName;

tests/bootstrap.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
use Doctrine\Common\Annotations\AnnotationRegistry;
44

5-
require __DIR__ . '/../vendor/autoload.php';
5+
foreach ([__DIR__ . '/../vendor/autoload.php', __DIR__ . '/../../../vendor/autoload.php'] as $file) {
6+
if (file_exists($file)) {
7+
require $file;
8+
break;
9+
}
10+
}
611

712
AnnotationRegistry::registerLoader('class_exists');

0 commit comments

Comments
 (0)