-
Notifications
You must be signed in to change notification settings - Fork 824
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NEW Refactor CLI interaction with Silverstripe app
- Turn sake into a symfony/console app - Avoid using HTTPRequest for CLI interaction - Implement abstract hybrid execution path
- Loading branch information
1 parent
e3508d4
commit d3cb726
Showing
78 changed files
with
2,984 additions
and
1,603 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
Name: cli-config | ||
--- | ||
SilverStripe\Core\Injector\Injector: | ||
Symfony\Contracts\EventDispatcher\EventDispatcherInterface.sake: | ||
class: 'Symfony\Component\EventDispatcher\EventDispatcher' | ||
Symfony\Component\Console\Formatter\OutputFormatterInterface: | ||
class: 'Symfony\Component\Console\Formatter\OutputFormatter' | ||
calls: | ||
- ['setDecorated', [true]] | ||
SilverStripe\Dev\HybridExecution\HtmlOutputFormatter: | ||
constructor: | ||
formatter: '%$Symfony\Component\Console\Formatter\OutputFormatterInterface' |
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
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
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
use SilverStripe\Cli\Sake; | ||
|
||
// Ensure that people can't access this from a web-server | ||
if (!in_array(PHP_SAPI, ['cli', 'cgi', 'cgi-fcgi'])) { | ||
echo 'sake cannot be run from a web request, you have to run it on the command-line.'; | ||
die(); | ||
} | ||
|
||
require_once __DIR__ . '/../src/includes/autoload.php'; | ||
|
||
$sake = new Sake(); | ||
$sake->addCommands([ | ||
// probably do this inside the sake app itself though | ||
// TODO: | ||
// - flush | ||
// - navigate (use HTTPRequest and spin off a "web" request from CLI) | ||
]); | ||
$sake->run(); |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.