Skip to content

Commit be2bf62

Browse files
committed
refactor: split autoload into single file
1 parent 7712c24 commit be2bf62

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

autoload.php

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
// Autoload
4+
$files = [
5+
__DIR__ . '/../../autoload.php',
6+
__DIR__ . '/../vendor/autoload.php',
7+
__DIR__ . '/vendor/autoload.php',
8+
];
9+
foreach ($files as $file) {
10+
if (file_exists($file)) {
11+
require_once $file;
12+
break;
13+
}
14+
}

conventional-changelog

+1-12
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,7 @@
44
use ConventionalChangelog\DefaultCommand;
55
use Symfony\Component\Console\Application;
66

7-
// Autoload
8-
$files = [
9-
__DIR__ . '/../../autoload.php',
10-
__DIR__ . '/../vendor/autoload.php',
11-
__DIR__ . '/vendor/autoload.php',
12-
];
13-
foreach ($files as $file) {
14-
if (file_exists($file)) {
15-
require_once $file;
16-
break;
17-
}
18-
}
7+
require_once __DIR__ . '/autoload.php';
198

209
// Report only fatal errors
2110
error_reporting(2039);

0 commit comments

Comments
 (0)