From f9bb86956eb5f5fd087bc0c05209544a07aa4235 Mon Sep 17 00:00:00 2001 From: TitusPiJean Date: Thu, 20 Oct 2016 19:33:31 +0200 Subject: [PATCH] Remove auto postinstall workaround as beta6 is out --- scripts/install | 2 -- sources/Server.php | 66 ---------------------------------------------- 2 files changed, 68 deletions(-) delete mode 100644 sources/Server.php diff --git a/scripts/install b/scripts/install index bedc712..b167533 100644 --- a/scripts/install +++ b/scripts/install @@ -129,8 +129,6 @@ adminemail=$(ynh_user_get_info $admin mail) sed -i "s%YNH_ADMIN_EMAIL%$adminemail%g" ../sources/configuration.yml sed -i "s@YNH_FORUM_TITLE@$title@g" ../sources/configuration.yml sudo cp ../sources/configuration.yml $final_path -# Workaround, waiting for beta6 -sudo \cp ../sources/Server.php $final_path/vendor/flarum/core/src/Console/Server.php sudo su - www-data -s /bin/bash -c "cd $final_path && php -d memory_limit=-1 flarum install -f configuration.yml" sudo rm $final_path/configuration.yml diff --git a/sources/Server.php b/sources/Server.php deleted file mode 100644 index 9a37e7c..0000000 --- a/sources/Server.php +++ /dev/null @@ -1,66 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Flarum\Console; - -use Flarum\Console\Command\GenerateMigrationCommand; -use Flarum\Debug\Console\CacheClearCommand; -use Flarum\Debug\Console\InfoCommand; -use Flarum\Foundation\AbstractServer; -use Flarum\Install\Console\InstallCommand; -use Flarum\Update\Console\MigrateCommand; -use Symfony\Component\Console\Application; - -class Server extends AbstractServer -{ - public function listen() - { - $console = $this->getConsoleApplication(); - - exit($console->run()); - } - - /** - * @return Application - */ - protected function getConsoleApplication() - - -{ - - $app = $this->getApp(); - $console = new Application('Flarum', $app->version()); - - $app->register('Flarum\Install\InstallServiceProvider'); - - $commands = [ - InstallCommand::class, - MigrateCommand::class, - GenerateMigrationCommand::class, - ]; - - if ($app->isInstalled()) { - $commands = array_merge($commands, [ - InfoCommand::class, - CacheClearCommand::class - ]); - } - - foreach ($commands as $command) { - $console->add($app->make( - $command, - ['config' => $app->isInstalled() ? $app->make('flarum.config') : []] - )); - } - - return $console; - } -}