From c55da1fc8d6f3487d89be1ad197a9f54c5e930b8 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 7 Jan 2016 15:04:36 +0100 Subject: Add a warning to the app:check-code if the version is missing --- lib/private/app/codechecker/infochecker.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/private/app/codechecker/infochecker.php b/lib/private/app/codechecker/infochecker.php index 24835d8148f..2589277118b 100644 --- a/lib/private/app/codechecker/infochecker.php +++ b/lib/private/app/codechecker/infochecker.php @@ -83,13 +83,18 @@ class InfoChecker extends BasicEmitter { 'type' => 'duplicateRequirement', 'field' => 'min', ]; + } else if (!isset($info['dependencies']['owncloud']['@attributes']['min-version'])) { + $this->emit('InfoChecker', 'missingRequirement', ['min']); } + if (isset($info['dependencies']['owncloud']['@attributes']['max-version']) && $info['requiremax']) { $this->emit('InfoChecker', 'duplicateRequirement', ['max']); $errors[] = [ 'type' => 'duplicateRequirement', 'field' => 'max', ]; + } else if (!isset($info['dependencies']['owncloud']['@attributes']['max-version'])) { + $this->emit('InfoChecker', 'missingRequirement', ['max']); } foreach ($info as $key => $value) { -- cgit v1.2.3