ProhibitsCommand.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Command;
  12. use Symfony\Component\Console\Input\InputInterface;
  13. use Symfony\Component\Console\Output\OutputInterface;
  14. /**
  15. * @author Niels Keurentjes <niels.keurentjes@omines.com>
  16. */
  17. class ProhibitsCommand extends BaseDependencyCommand
  18. {
  19. /**
  20. * Configure command metadata.
  21. */
  22. protected function configure()
  23. {
  24. parent::configure();
  25. $this
  26. ->setName('prohibits')
  27. ->setAliases(array('why-not'))
  28. ->setDescription('Shows which packages prevent the given package from being installed')
  29. ->setHelp(<<<EOT
  30. Displays detailed information about why a package cannot be installed.
  31. <info>php composer.phar prohibits composer/composer</info>
  32. EOT
  33. )
  34. ;
  35. }
  36. /**
  37. * Execute the function.
  38. *
  39. * @param InputInterface $input
  40. * @param OutputInterface $output
  41. * @return int|null
  42. */
  43. protected function execute(InputInterface $input, OutputInterface $output)
  44. {
  45. return parent::doExecute($input, $output, true);
  46. }
  47. }