-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
If you like me got overwhelmed by trying to use laravel-modules first and then went to use this package, it will fail trying to read the bootstrap/modules.php file as this follows a different format if you've used laravel-modules.
Simple fix to get around is to just php artisan optimize:clear before trying to install modular to clear out the bootstrap/cache directory.
If you already installed it, just rm bootstrap/cache/modules.php to get it working again.
But this could probably be sanitized in ModuleRegistry by adding this:
protected function loadModules(): Collection
{
if (file_exists($this->cache_path)) {
return Collection::make(require $this->cache_path)
->mapWithKeys(function(array $cached) {
if (! isset($cached['name'], $cached['base_path'], $cached['namespaces'])) {
return null;
}
$config = new ModuleConfig($cached['name'], $cached['base_path'], new Collection($cached['namespaces']));
return [$config->name => $config];
});
}
granada-pride-co, DiarQoroviqi, omnicolor and nathanaeld01
Metadata
Metadata
Assignees
Labels
No labels