Skip to content

Php 71 #163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ language: php

matrix:
include:
- php: 5.6
env: COMPOSER_FLAGS="--prefer-lowest"
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
- php: 7.3

before_install:
- composer self-update
Expand Down
34 changes: 17 additions & 17 deletions app/config.php
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<?php

use Colors\Color;
use function DI\object;
use function DI\create;
use function DI\factory;
use Kadet\Highlighter\KeyLighter;
use function PhpSchool\PhpWorkshop\Event\containerListener;
use Interop\Container\ContainerInterface;
use Psr\Container\ContainerInterface;
use League\CommonMark\DocParser;
use League\CommonMark\Environment;
use PhpParser\PrettyPrinter\Standard;
use PhpSchool\CliMenu\Terminal\TerminalFactory;
use PhpSchool\CliMenu\Terminal\TerminalInterface;
use PhpSchool\Terminal\Terminal;
use PhpParser\Parser;
use PhpParser\ParserFactory;
use PhpSchool\PhpWorkshop\Check\CheckRepository;
Expand Down Expand Up @@ -90,7 +90,7 @@
$c->get(CheckRepository::class)
);
},
ResultAggregator::class => object(ResultAggregator::class),
ResultAggregator::class => create(ResultAggregator::class),
CheckRepository::class => function (ContainerInterface $c) {
return new CheckRepository([
$c->get(FileExistsCheck::class),
Expand Down Expand Up @@ -123,7 +123,7 @@
return $colors;
},
OutputInterface::class => function (ContainerInterface $c) {
return new StdOutput($c->get(Color::class), $c->get(TerminalInterface::class));
return new StdOutput($c->get(Color::class), $c->get(Terminal::class));
},

ExerciseRepository::class => function (ContainerInterface $c) {
Expand All @@ -135,7 +135,7 @@
},

EventDispatcher::class => factory(EventDispatcherFactory::class),
EventDispatcherFactory::class => object(),
EventDispatcherFactory::class => create(),

//Exercise Runners
RunnerManager::class => function (ContainerInterface $c) {
Expand Down Expand Up @@ -199,7 +199,7 @@
},

//Listeners
PrepareSolutionListener::class => object(),
PrepareSolutionListener::class => create(),
CodePatchListener::class => function (ContainerInterface $c) {
return new CodePatchListener($c->get(CodePatcher::class));
},
Expand All @@ -216,22 +216,22 @@
$c->get(RunnerManager::class)
);
},
RealPathListener::class => object(),
RealPathListener::class => create(),

//checks
FileExistsCheck::class => object(),
PhpLintCheck::class => object(),
FileExistsCheck::class => create(),
PhpLintCheck::class => create(),
CodeParseCheck::class => function (ContainerInterface $c) {
return new CodeParseCheck($c->get(Parser::class));
},
FunctionRequirementsCheck::class => function (ContainerInterface $c) {
return new FunctionRequirementsCheck($c->get(Parser::class));
},
DatabaseCheck::class => object(),
ComposerCheck::class => object(),
DatabaseCheck::class => create(),
ComposerCheck::class => create(),

//Utils
Filesystem::class => object(),
Filesystem::class => create(),
Parser::class => function () {
$parserFactory = new ParserFactory;
return $parserFactory->create(ParserFactory::PREFER_PHP7);
Expand All @@ -247,11 +247,11 @@
FakerGenerator::class => function () {
return FakerFactory::create();
},
RequestRenderer::class => object(),
RequestRenderer::class => create(),

TerminalInterface::class => factory([TerminalFactory::class, 'fromSystem']),
Terminal::class => factory([TerminalFactory::class, 'fromSystem']),
'menu' => factory(MenuFactory::class),
MenuFactory::class => object(),
MenuFactory::class => create(),
ExerciseRenderer::class => function (ContainerInterface $c) {
return new ExerciseRenderer(
$c->get('appName'),
Expand Down Expand Up @@ -307,7 +307,7 @@ function (CgiResult $result) use ($c) {
return new ResultsRenderer(
$c->get('appName'),
$c->get(Color::class),
$c->get(TerminalInterface::class),
$c->get(Terminal::class),
$c->get(ExerciseRepository::class),
$c->get(KeyLighter::class),
$c->get(ResultRendererFactory::class)
Expand Down
21 changes: 10 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,26 @@
}
],
"require" : {
"php" : ">=5.6",
"php" : ">=7.1",
"ext-pdo_sqlite": "*",
"php-di/php-di": "^5.0",
"php-di/php-di": "^6.0",
"container-interop/container-interop": "^1.0",
"symfony/process": "^3.0",
"symfony/filesystem": "^3.0",
"symfony/process": "^3.0 | ^4.0",
"symfony/filesystem": "^3.0 | ^4.0",
"fzaninotto/faker": "^1.5",
"aydin-hassan/cli-md-renderer": "^2.3",
"php-school/cli-menu": "^2.0",
"beberlei/assert": "^2.4",
"php-school/cli-menu": "dev-master",
"beberlei/assert": "^3.2",
"psr/http-message": "^1.0",
"zendframework/zend-diactoros": "^1.3.6",
"zendframework/zend-diactoros": "^2.1",
"myclabs/php-enum": "^1.4",
"kadet/keylighter": "^0.8.3",
"nikic/php-parser": "^3.0"
"nikic/php-parser": "^4.0"
},
"require-dev": {
"composer/composer": "^1.2",
"phpunit/phpunit": "^5.7.2",
"phpunit/phpunit-mock-objects": "^3.3",
"squizlabs/php_codesniffer": "^2.4"
"phpunit/phpunit": "^7",
"squizlabs/php_codesniffer": "^3.4"
},
"autoload" : {
"psr-4" : {
Expand Down
Loading