Skip to content

Commit eafddcb

Browse files
authored
Merge pull request #163 from php-school/php-71
Php 71
2 parents 64390ad + 2a55fdc commit eafddcb

File tree

192 files changed

+2660
-2131
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

192 files changed

+2660
-2131
lines changed

.travis.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ language: php
22

33
matrix:
44
include:
5-
- php: 5.6
6-
env: COMPOSER_FLAGS="--prefer-lowest"
7-
- php: 5.6
8-
- php: 7.0
95
- php: 7.1
106
- php: 7.2
7+
- php: 7.3
118

129
before_install:
1310
- composer self-update

app/config.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?php
22

33
use Colors\Color;
4-
use function DI\object;
4+
use function DI\create;
55
use function DI\factory;
66
use Kadet\Highlighter\KeyLighter;
77
use function PhpSchool\PhpWorkshop\Event\containerListener;
8-
use Interop\Container\ContainerInterface;
8+
use Psr\Container\ContainerInterface;
99
use League\CommonMark\DocParser;
1010
use League\CommonMark\Environment;
1111
use PhpParser\PrettyPrinter\Standard;
1212
use PhpSchool\CliMenu\Terminal\TerminalFactory;
13-
use PhpSchool\CliMenu\Terminal\TerminalInterface;
13+
use PhpSchool\Terminal\Terminal;
1414
use PhpParser\Parser;
1515
use PhpParser\ParserFactory;
1616
use PhpSchool\PhpWorkshop\Check\CheckRepository;
@@ -90,7 +90,7 @@
9090
$c->get(CheckRepository::class)
9191
);
9292
},
93-
ResultAggregator::class => object(ResultAggregator::class),
93+
ResultAggregator::class => create(ResultAggregator::class),
9494
CheckRepository::class => function (ContainerInterface $c) {
9595
return new CheckRepository([
9696
$c->get(FileExistsCheck::class),
@@ -123,7 +123,7 @@
123123
return $colors;
124124
},
125125
OutputInterface::class => function (ContainerInterface $c) {
126-
return new StdOutput($c->get(Color::class), $c->get(TerminalInterface::class));
126+
return new StdOutput($c->get(Color::class), $c->get(Terminal::class));
127127
},
128128

129129
ExerciseRepository::class => function (ContainerInterface $c) {
@@ -135,7 +135,7 @@
135135
},
136136

137137
EventDispatcher::class => factory(EventDispatcherFactory::class),
138-
EventDispatcherFactory::class => object(),
138+
EventDispatcherFactory::class => create(),
139139

140140
//Exercise Runners
141141
RunnerManager::class => function (ContainerInterface $c) {
@@ -199,7 +199,7 @@
199199
},
200200

201201
//Listeners
202-
PrepareSolutionListener::class => object(),
202+
PrepareSolutionListener::class => create(),
203203
CodePatchListener::class => function (ContainerInterface $c) {
204204
return new CodePatchListener($c->get(CodePatcher::class));
205205
},
@@ -216,22 +216,22 @@
216216
$c->get(RunnerManager::class)
217217
);
218218
},
219-
RealPathListener::class => object(),
219+
RealPathListener::class => create(),
220220

221221
//checks
222-
FileExistsCheck::class => object(),
223-
PhpLintCheck::class => object(),
222+
FileExistsCheck::class => create(),
223+
PhpLintCheck::class => create(),
224224
CodeParseCheck::class => function (ContainerInterface $c) {
225225
return new CodeParseCheck($c->get(Parser::class));
226226
},
227227
FunctionRequirementsCheck::class => function (ContainerInterface $c) {
228228
return new FunctionRequirementsCheck($c->get(Parser::class));
229229
},
230-
DatabaseCheck::class => object(),
231-
ComposerCheck::class => object(),
230+
DatabaseCheck::class => create(),
231+
ComposerCheck::class => create(),
232232

233233
//Utils
234-
Filesystem::class => object(),
234+
Filesystem::class => create(),
235235
Parser::class => function () {
236236
$parserFactory = new ParserFactory;
237237
return $parserFactory->create(ParserFactory::PREFER_PHP7);
@@ -247,11 +247,11 @@
247247
FakerGenerator::class => function () {
248248
return FakerFactory::create();
249249
},
250-
RequestRenderer::class => object(),
250+
RequestRenderer::class => create(),
251251

252-
TerminalInterface::class => factory([TerminalFactory::class, 'fromSystem']),
252+
Terminal::class => factory([TerminalFactory::class, 'fromSystem']),
253253
'menu' => factory(MenuFactory::class),
254-
MenuFactory::class => object(),
254+
MenuFactory::class => create(),
255255
ExerciseRenderer::class => function (ContainerInterface $c) {
256256
return new ExerciseRenderer(
257257
$c->get('appName'),
@@ -307,7 +307,7 @@ function (CgiResult $result) use ($c) {
307307
return new ResultsRenderer(
308308
$c->get('appName'),
309309
$c->get(Color::class),
310-
$c->get(TerminalInterface::class),
310+
$c->get(Terminal::class),
311311
$c->get(ExerciseRepository::class),
312312
$c->get(KeyLighter::class),
313313
$c->get(ResultRendererFactory::class)

composer.json

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,26 @@
1515
}
1616
],
1717
"require" : {
18-
"php" : ">=5.6",
18+
"php" : ">=7.1",
1919
"ext-pdo_sqlite": "*",
20-
"php-di/php-di": "^5.0",
20+
"php-di/php-di": "^6.0",
2121
"container-interop/container-interop": "^1.0",
22-
"symfony/process": "^3.0",
23-
"symfony/filesystem": "^3.0",
22+
"symfony/process": "^3.0 | ^4.0",
23+
"symfony/filesystem": "^3.0 | ^4.0",
2424
"fzaninotto/faker": "^1.5",
2525
"aydin-hassan/cli-md-renderer": "^2.3",
26-
"php-school/cli-menu": "^2.0",
27-
"beberlei/assert": "^2.4",
26+
"php-school/cli-menu": "dev-master",
27+
"beberlei/assert": "^3.2",
2828
"psr/http-message": "^1.0",
29-
"zendframework/zend-diactoros": "^1.3.6",
29+
"zendframework/zend-diactoros": "^2.1",
3030
"myclabs/php-enum": "^1.4",
3131
"kadet/keylighter": "^0.8.3",
32-
"nikic/php-parser": "^3.0"
32+
"nikic/php-parser": "^4.0"
3333
},
3434
"require-dev": {
3535
"composer/composer": "^1.2",
36-
"phpunit/phpunit": "^5.7.2",
37-
"phpunit/phpunit-mock-objects": "^3.3",
38-
"squizlabs/php_codesniffer": "^2.4"
36+
"phpunit/phpunit": "^7",
37+
"squizlabs/php_codesniffer": "^3.4"
3938
},
4039
"autoload" : {
4140
"psr-4" : {

0 commit comments

Comments
 (0)