Skip to content

Commit 6ef2fc4

Browse files
committed
constants: Avoid manual requires
We can just use `files` autoloader and have composer require it automatically.
1 parent 6d69768 commit 6ef2fc4

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

composer.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,10 @@
4949
"spouts\\": "src/spouts/",
5050
"Selfoss\\": "src/",
5151
"Tests\\": "tests/"
52-
}
52+
},
53+
"files": [
54+
"src/constants.php"
55+
]
5356
},
5457
"config": {
5558
"platform": {

phpstan.dist.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ parameters:
99
- run.php
1010

1111
bootstrapFiles:
12-
- src/constants.php
1312
- vendor/bin/.phpunit/phpunit/vendor/autoload.php
1413

1514
stubFiles:

src/common.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
use Symfony\Component\Cache\Psr16Cache;
2121
use Tracy\Debugger;
2222

23-
require __DIR__ . '/constants.php';
24-
2523
function boot_error(string $message): never {
2624
http_response_code(500);
2725
header('Content-Type: text/plain');

tests/bootstrap.php

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

33
declare(strict_types=1);
44

5-
require __DIR__ . '/../src/constants.php';
65
require __DIR__ . '/../vendor/autoload.php';
76

87
date_default_timezone_set('UTC');

0 commit comments

Comments
 (0)