diff --git a/.travis.yml b/.travis.yml index d3c2bdb..193d0c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,9 @@ language: php php: - - 7.0 - 7.1 + - 7.2 + - 7.3 + - 7.4 script: - vendor/bin/phpstan analyse -l 5 src diff --git a/composer.json b/composer.json index d4025d3..a9f7eaa 100644 --- a/composer.json +++ b/composer.json @@ -23,14 +23,14 @@ } ], "require": { - "php": "~7.0", - "nette/application": "^2.2", - "nette/di": "^2.2", - "kdyby/console": "^2.3.2", + "php": "~7.1", + "nette/application": "~2.4.14", + "nette/di": "~2.4.14", + "kdyby/console": "~2.7.1", "supervisorphp/configuration": "~0.2.1" }, "require-dev": { - "phpstan/phpstan": "~0.6.0" + "phpstan/phpstan": "0.12.11" }, "autoload": { "psr-4": { diff --git a/src/Console/RenderCommand.php b/src/Console/RenderCommand.php index 8234932..19c6227 100644 --- a/src/Console/RenderCommand.php +++ b/src/Console/RenderCommand.php @@ -42,6 +42,8 @@ protected function execute(InputInterface $input, OutputInterface $output) */ $configuration = $this->container->getByType(Configuration::class); $output->write($this->getRenderer()->render($configuration->toArray())); + + return 0; } } diff --git a/src/Console/WriteCommand.php b/src/Console/WriteCommand.php index f5108b0..85052dc 100644 --- a/src/Console/WriteCommand.php +++ b/src/Console/WriteCommand.php @@ -57,11 +57,17 @@ protected function execute(InputInterface $input, OutputInterface $output) $loader->load($configuration); } catch (LoaderException $exception) { $output->writeln($exception->getMessage()); + + return 1; } } if ($writer->write($configuration)) { $output->writeln(sprintf('Supervisor configuration has been successfully written to file %s', $filesystemAdapter->applyPathPrefix($file))); + + return 0; } + + return 1; } }