Skip to content

Commit

Permalink
Fix installers
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan Thompson committed Feb 15, 2021
1 parent c71778c commit 4adb3c8
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions src/Installer/Command/GetInstallers.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
<?php namespace Anomaly\InstallerModule\Installer\Command;
<?php

namespace Anomaly\InstallerModule\Installer\Command;

use Anomaly\Streams\Platform\Console\Kernel;
use Anomaly\Streams\Platform\Installer\Installer;
use Anomaly\Streams\Platform\Installer\InstallerCollection;
use Anomaly\Streams\Platform\Application\ApplicationRepository;
use Anomaly\Streams\Platform\Entry\Command\AutoloadEntryModels;
use Anomaly\Streams\Platform\Application\Command\ReloadEnvironmentFile;
use Anomaly\Streams\Platform\Console\Kernel;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadApplicationInstallers;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadModuleSeeders;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadBaseMigrations;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadCoreInstallers;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadExtensionInstallers;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadExtensionSeeders;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadModuleInstallers;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadModuleSeeders;
use Anomaly\Streams\Platform\Installer\Installer;
use Anomaly\Streams\Platform\Installer\InstallerCollection;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadExtensionInstallers;
use Anomaly\Streams\Platform\Installer\Console\Command\LoadApplicationInstallers;

/**
* Class GetInstallers
Expand All @@ -24,8 +26,6 @@
class GetInstallers
{

use DispatchesJobs;

/**
* Handle the command.
*
Expand All @@ -35,11 +35,11 @@ public function handle()
{
$installers = new InstallerCollection();

$this->dispatch(new LoadCoreInstallers($installers));
$this->dispatch(new LoadApplicationInstallers($installers));
dispatch_now(new LoadCoreInstallers($installers));
dispatch_now(new LoadApplicationInstallers($installers));

$this->dispatch(new LoadModuleInstallers($installers));
$this->dispatch(new LoadExtensionInstallers($installers));
dispatch_now(new LoadModuleInstallers($installers));
dispatch_now(new LoadExtensionInstallers($installers));

$installers->push(
new Installer(
Expand All @@ -48,14 +48,15 @@ function (Kernel $console) {

$console->call('env:set', ['line' => 'INSTALLED=true']);

$this->dispatch(new ReloadEnvironmentFile());
dispatch_now(new ReloadEnvironmentFile());
dispatch_now(new AutoloadEntryModels());
}
)
);

$this->dispatch(new LoadBaseMigrations($installers));
$this->dispatch(new LoadModuleSeeders($installers));
$this->dispatch(new LoadExtensionSeeders($installers));
dispatch_now(new LoadBaseMigrations($installers));
dispatch_now(new LoadModuleSeeders($installers));
dispatch_now(new LoadExtensionSeeders($installers));

$installers->push(
new Installer(
Expand Down

0 comments on commit 4adb3c8

Please sign in to comment.