-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #662 from tighten/jbk/service-providers
Refactor container bootstrapping to use service providers
- Loading branch information
Showing
25 changed files
with
617 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use TightenCo\Jigsaw\Console\BuildCommand; | ||
use TightenCo\Jigsaw\Console\InitCommand; | ||
use TightenCo\Jigsaw\Console\ServeCommand; | ||
use TightenCo\Jigsaw\Jigsaw; | ||
|
||
require_once(__DIR__ . '/jigsaw-core.php'); | ||
|
||
$app = new Symfony\Component\Console\Application('Jigsaw', '1.4.0'); | ||
$app->add($container[InitCommand::class]); | ||
$app->add(new BuildCommand($container)); | ||
$app->add(new ServeCommand($container)); | ||
Jigsaw::addUserCommands($app, $container); | ||
$app->run(); | ||
define('JIGSAW_START', microtime(true)); | ||
|
||
if (file_exists(__DIR__ . '/vendor/autoload.php')) { | ||
require __DIR__ . '/vendor/autoload.php'; | ||
} | ||
|
||
if (file_exists(getcwd() . '/vendor/autoload.php')) { | ||
require getcwd() . '/vendor/autoload.php'; | ||
} | ||
|
||
$app = new TightenCo\Jigsaw\Container; | ||
|
||
$app->bootstrapWith([]); | ||
|
||
$application = new Symfony\Component\Console\Application('Jigsaw', '1.4.0'); | ||
$application->add($app[TightenCo\Jigsaw\Console\InitCommand::class]); | ||
$application->add(new TightenCo\Jigsaw\Console\BuildCommand($app)); | ||
$application->add(new TightenCo\Jigsaw\Console\ServeCommand($app)); | ||
|
||
TightenCo\Jigsaw\Jigsaw::addUserCommands($application, $app); | ||
|
||
$application->run(); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.