Skip to content
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

Check for nextcloud version as well #2520

Merged
merged 1 commit into from
Dec 5, 2016
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
2 changes: 1 addition & 1 deletion core/Command/App/CheckCode.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ protected function execute(InputInterface $input, OutputInterface $output) {
});

$infoChecker->listen('InfoChecker', 'missingRequirement', function($minMax) use ($output) {
$output->writeln("<comment>ownCloud $minMax version requirement missing (will be an error in ownCloud 11 and later)</comment>");
$output->writeln("<comment>Nextcloud $minMax version requirement missing (will be an error in Nextcloud 12 and later)</comment>");
});

$infoChecker->listen('InfoChecker', 'duplicateRequirement', function($minMax) use ($output) {
Expand Down
10 changes: 8 additions & 2 deletions lib/private/App/CodeChecker/InfoChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,10 @@ public function analyse($appId) {
'type' => 'duplicateRequirement',
'field' => 'min',
];
} else if (!isset($info['dependencies']['owncloud']['@attributes']['min-version'])) {
} else if (
!isset($info['dependencies']['owncloud']['@attributes']['min-version']) &&
!isset($info['dependencies']['nextcloud']['@attributes']['min-version'])
) {
$this->emit('InfoChecker', 'missingRequirement', ['min']);
}

Expand All @@ -96,7 +99,10 @@ public function analyse($appId) {
'type' => 'duplicateRequirement',
'field' => 'max',
];
} else if (!isset($info['dependencies']['owncloud']['@attributes']['max-version'])) {
} else if (
!isset($info['dependencies']['owncloud']['@attributes']['max-version']) &&
!isset($info['dependencies']['nextcloud']['@attributes']['max-version'])
) {
$this->emit('InfoChecker', 'missingRequirement', ['max']);
}

Expand Down