Skip to content

Commit

Permalink
Remove Startup class
Browse files Browse the repository at this point in the history
  • Loading branch information
odan committed Oct 6, 2019
1 parent 1b8a82f commit e022b48
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 36 deletions.
4 changes: 1 addition & 3 deletions bin/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@
exit (1);
}

require_once __DIR__ . '/../vendor/autoload.php';

$container = \App\Startup::boostrap()->getContainer();
$container = (require __DIR__ . '/../config/bootstrap.php')->ge;

$commands = (array)$container->get(Configuration::class)->get('commands');
$application = new Application();
Expand Down
3 changes: 1 addition & 2 deletions config/phinx.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<?php

use App\Startup;
use App\Utility\Configuration;

$app = Startup::boostrap();
$app = require __DIR__ . '/../config/bootstrap.php';

$container = $app->getContainer();
$pdo = $container->get(PDO::class);
Expand Down
6 changes: 1 addition & 5 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
<?php

use App\Startup;

require_once __DIR__ . '/../vendor/autoload.php';

Startup::boostrap()->run();
(require __DIR__ . '/../config/bootstrap.php')->run();
24 changes: 0 additions & 24 deletions src/Startup.php

This file was deleted.

3 changes: 1 addition & 2 deletions tests/TestCase/ContainerTestTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace App\Test\TestCase;

use App\Startup;
use League\Container\Container;
use Psr\Container\ContainerInterface;
use RuntimeException;
Expand All @@ -26,7 +25,7 @@ trait ContainerTestTrait
*/
protected function bootApp(): void
{
$this->app = Startup::boostrap();
$this->app = require __DIR__ . '/../../config/bootstrap.php';
$this->container = $this->app->getContainer();
}

Expand Down

0 comments on commit e022b48

Please sign in to comment.