Skip to content

Commit

Permalink
FriendsOfPHP#161 temporary validator exception about magento/magento2…
Browse files Browse the repository at this point in the history
…ce package which is not provided by packagist
  • Loading branch information
Marco Menzel authored and ocramleznem committed Dec 3, 2016
1 parent dc6c6aa commit 1804b0e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
$messages[$path][] = 'Reference composer package must match the folder name';
}

$packagistUrl = sprintf('https://packagist.org/packages/%s.json', $composerPackage);
// Temporary expception for #161 - magento/magento2ce package is not provided by packagist
if($composerPackage != 'magento/magento2ce') {
$packagistUrl = sprintf('https://packagist.org/packages/%s.json', $composerPackage);

if(404 == explode(' ', get_headers($packagistUrl)[0], 3)[1]) {
$messages[$path][] = sprintf('Invalid composer package');
if (404 == explode(' ', get_headers($packagistUrl)[0], 3)[1]) {
$messages[$path][] = sprintf('Invalid composer package');
}
}
}
}
Expand Down

0 comments on commit 1804b0e

Please sign in to comment.