From a73449abb90660b7e150adf586a438aa056aab33 Mon Sep 17 00:00:00 2001 From: overtrue Date: Thu, 28 Dec 2017 17:07:39 +0800 Subject: [PATCH] Bugfix #27 --- composer.json | 8 ++++---- src/Command/LintCommand.php | 3 +-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index ff22ac3f..3e168fb7 100644 --- a/composer.json +++ b/composer.json @@ -17,10 +17,10 @@ ], "require": { "php": ">=5.5.9", - "symfony/console": "^3.0", - "symfony/finder": "^3.0", - "symfony/process": "^3.0", - "symfony/yaml": "^3.0" + "symfony/console": "^3.0|^4.0", + "symfony/finder": "^3.0|^4.0", + "symfony/process": "^3.0|^4.0", + "symfony/yaml": "^3.0|^4.0" }, "autoload": { "psr-4": { diff --git a/src/Command/LintCommand.php b/src/Command/LintCommand.php index 38429503..a4c2724b 100644 --- a/src/Command/LintCommand.php +++ b/src/Command/LintCommand.php @@ -20,7 +20,6 @@ use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Terminal; -use Symfony\Component\Finder\SplFileInfo; use Symfony\Component\Yaml\Exception\ParseException; use Symfony\Component\Yaml\Yaml; @@ -213,7 +212,7 @@ protected function executeLint($linter, $input, $output, $fileCount) $maxColumns = floor((new Terminal())->getWidth() / 2); $verbosity = $output->getVerbosity(); - $linter->setProcessCallback(function ($status, SplFileInfo $file) use ($output, $verbosity, $fileCount, $maxColumns) { + $linter->setProcessCallback(function ($status, \SplFileInfo $file) use ($output, $verbosity, $fileCount, $maxColumns) { static $i = 1; $percent = floor(($i / $fileCount) * 100);