Command ContainerLoader

This commit is contained in:
Juan Pablo Vial
2024-08-27 14:50:45 -04:00
parent 4604a9af48
commit 095c33e8aa
3 changed files with 37 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<?php
function loadCommands(&$app): void {
/*function loadCommands(&$app): void {
$files = new FilesystemIterator($app->getContainer()->get('folders')->commands);
foreach ($files as $file) {
if ($file->isDir()) {
@ -8,4 +8,6 @@ function loadCommands(&$app): void {
include_once $file->getRealPath();
}
}
loadCommands($app);
loadCommands($app);*/
$app->setCommandLoader($app->getContainer()->get(Symfony\Component\Console\CommandLoader\CommandLoaderInterface::class));
$app->setDefaultCommand('run:full');