Skip to content

Commit 45bfb22

Browse files
committed
Fix: Autoload with Composer only
1 parent d6a1d6d commit 45bfb22

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@
4646
"autoload": {
4747
"psr-0": { "JsonSchema": "src/" }
4848
},
49+
"autoload-dev": {
50+
"psr-0": { "JsonSchema": "tests/" }
51+
},
4952
"bin": ["bin/validate-json"],
5053
"extra": {
5154
"branch-alias": {

tests/bootstrap.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,3 @@
1919

2020
// Include the Composer generated autoloader
2121
require_once $autoloadFile;
22-
23-
spl_autoload_register(function ($class)
24-
{
25-
if (0 === strpos($class, 'JsonSchema\\Tests')) {
26-
$classFile = str_replace('\\', '/', $class) . '.php';
27-
require __DIR__ . '/' . $classFile;
28-
}
29-
});

0 commit comments

Comments
 (0)