Skip to content

Commit a8d7001

Browse files
authored
Merge pull request #14 from php-school/match-made-in-heaven
Match made in heaven
2 parents e199818 + e6270be commit a8d7001

17 files changed

+460
-70
lines changed

.github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
php: [7.3, 7.4, 8.0]
15+
php: [8.0]
1616

1717
name: PHP ${{ matrix.php }}
1818
steps:
@@ -32,7 +32,7 @@ jobs:
3232
- name: Run phpunit tests
3333
run: |
3434
mkdir -p build/logs
35-
vendor/bin/simple-phpunit --coverage-clover ./build/logs/clover.xml
35+
vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml
3636
- name: Run phpcs
3737
run: composer cs
3838

.phpstorm.meta.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
\DI\Container::get('') => [
66
"" == "@",
77
],
8-
\Interop\Container\ContainerInterface::get('') => [
8+
\Psr\Container\ContainerInterface::get('') => [
99
"" == "@",
1010
],
1111
];
12-
}
12+
}

app/bootstrap.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
throw new RuntimeException('Unable to locate Composer autoloader; please run "composer install".');
2020
}
2121

22+
use PhpSchool\PHP8Appreciate\Exercise\AMatchMadeInHeaven;
2223
use PhpSchool\PhpWorkshop\Application;
2324

2425
$app = new Application('PHP8 Appreciate', __DIR__ . '/config.php');
2526

26-
//$app->addExercise(...);
27-
//$app->addExercise(...);
27+
$app->addExercise(AMatchMadeInHeaven::class);
2828

2929
$art = <<<ART
3030
_ __ _
@@ -37,7 +37,7 @@
3737
ART;
3838

3939
$app->setLogo($art);
40-
$app->setFgColour('green');
41-
$app->setBgColour('black');
40+
$app->setFgColour('white');
41+
$app->setBgColour('61');
4242

4343
return $app;

app/config.php

+9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
<?php
22

3+
use PhpSchool\PHP8Appreciate\AstService;
4+
use PhpSchool\PHP8Appreciate\Exercise\AMatchMadeInHeaven;
5+
use Psr\Container\ContainerInterface;
6+
use function DI\create;
37
use function DI\factory;
48
use function DI\object;
59

610
return [
11+
'basePath' => __DIR__ . '/../',
12+
713
//Define your exercise factories here
14+
AMatchMadeInHeaven::class => function (ContainerInterface $c) {
15+
return new AMatchMadeInHeaven($c->get(PhpParser\Parser::class));
16+
},
817
];

composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
],
2222
"require": {
2323
"php": "^8.0",
24-
"php-school/php-workshop": "^3.0"
24+
"php-school/php-workshop": "dev-master"
2525
},
2626
"require-dev": {
2727
"phpunit/phpunit": "^9",
@@ -47,11 +47,11 @@
4747
"unit-tests": "phpunit",
4848
"cs": [
4949
"phpcs src --standard=PSR12",
50-
"phpcs test --standard=PSR12"
50+
"phpcs test --standard=PSR12 --ignore='test/solutions'"
5151
],
5252
"cs-fix": [
5353
"phpcbf src --standard=PSR12 --encoding=UTF-8",
54-
"phpcbf test --standard=PSR12 --encoding=UTF-8"
54+
"phpcbf test --standard=PSR12 --encoding=UTF-8 --ignore='test/solutions'"
5555
],
5656
"static": "phpstan --ansi analyse --level max src"
5757
},

0 commit comments

Comments
 (0)