Skip to content

Commit 587c1b3

Browse files
committed
Add tutorial type workshops
1 parent 65ba8a5 commit 587c1b3

File tree

5 files changed

+287
-173
lines changed

5 files changed

+287
-173
lines changed

app/config.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
use PhpSchool\PhpWorkshop\Patch;
3333
use PhpSchool\PhpWorkshop\ResultAggregator;
3434
use PhpSchool\PSX\Factory as PsxFactory;
35+
use PhpSchool\PhpWorkshop\WorkshopType;
3536
use PhpSchool\PSX\SyntaxHighlighter;
3637
use PhpSchool\PhpWorkshop\Check\FileExistsCheck;
3738
use PhpSchool\PhpWorkshop\Check\FunctionRequirementsCheck;
@@ -46,7 +47,6 @@
4647
use PhpSchool\PhpWorkshop\CommandRouter;
4748
use PhpSchool\PhpWorkshop\ExerciseRenderer;
4849
use PhpSchool\PhpWorkshop\ExerciseRepository;
49-
use PhpSchool\PhpWorkshop\ExerciseRunner;
5050
use PhpSchool\PhpWorkshop\Factory\MarkdownCliRendererFactory;
5151
use PhpSchool\PhpWorkshop\MarkdownRenderer;
5252
use PhpSchool\PhpWorkshop\ResultRenderer\ResultsRenderer;
@@ -58,7 +58,8 @@
5858

5959
return [
6060
'appName' => basename($_SERVER['argv'][0]),
61-
ExerciseDispatcher::class => function (ContainerInterface $c) {
61+
WorkshopType::class => WorkshopType::STANDARD(),
62+
ExerciseDispatcher::class => factory(function (ContainerInterface $c) {
6263
$dispatcher = new ExerciseDispatcher(
6364
$c->get(RunnerFactory::class),
6465
$c->get(ResultAggregator::class),
@@ -71,7 +72,7 @@
7172
$dispatcher->requireCheck(PhpLintCheck::class);
7273
$dispatcher->requireCheck(CodeParseCheck::class);
7374
return $dispatcher;
74-
},
75+
}),
7576
ResultAggregator::class => object(ResultAggregator::class),
7677
CheckRepository::class => function (ContainerInterface $c) {
7778
return new CheckRepository([

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"fzaninotto/faker": "^1.5",
2626
"aydin-hassan/cli-md-renderer": "^2.0",
2727
"php-school/psx": "~1.0",
28-
"php-school/cli-menu": "^1.0.3",
28+
"php-school/cli-menu": "^1.2.0",
2929
"beberlei/assert": "^2.4",
3030
"psr/http-message": "^1.0",
3131
"zendframework/zend-diactoros": "^1.1.3",

0 commit comments

Comments
 (0)