Removed Fipamo classes from composer autoloading

I didn't like the extra step that had to be taken to register new
classes from the command line using composer's auto dump, so a quick
script was implemented to handle Fipamo loading classes seperately so
composer can manage itself, removing the need for updating it whenever I
add a new classs to the codebase
This commit is contained in:
Ro 2022-09-19 16:52:29 -07:00
parent 73e4243231
commit b092645733
3 changed files with 14 additions and 5 deletions

10
brain/_loader.php Normal file
View file

@ -0,0 +1,10 @@
<?php
spl_autoload_register(function ($className) {
$file = dirname(__DIR__) . '\\' . $className . '.php';
$file = str_replace('\\', DIRECTORY_SEPARATOR, $file);
//echo $file;
if (file_exists($file)) {
include $file;
}
});

View file

@ -9,11 +9,6 @@
"homepage": "https://roiskinda.cool"
}
],
"autoload": {
"psr-4": {
"brain\\": "brain"
}
},
"support": {
"source": "https://code.playvicio.us/Are0h/Fipamo",
"wiki": "https://code.playvicio.us/Are0h/Fipamo/wiki/_pages",

View file

@ -1,7 +1,11 @@
<?php
//load Composer Classes
require '../vendor/autoload.php';
//load Fipamo Classes
require '../brain/_loader.php';
use brain\init\App;
//start app
new App();