Skip to content

Commit 2d78490

Browse files
committed
Add Override.php to autoload files in composer.json
The Override.php class was added and registered in the autoload section of composer.json. This ensures the class is loaded automatically if not already defined,(=PHP 8.0, 8.1)
1 parent 49789de commit 2d78490

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"Ray\\Aop\\": ["src/", "src-php8"],
3333
"Ray\\ServiceLocator\\": ["sl-src/"]
3434
},
35-
"files": ["annotation_loader.php"]
35+
"files": ["annotation_loader.php", "src-class/Override.php"]
3636
},
3737
"autoload-dev": {
3838
"psr-4": {

src-class/Override.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
if (! class_exists('Override', false)) {
6+
#[Attribute]
7+
final class Override
8+
{
9+
}
10+
}

0 commit comments

Comments
 (0)