vendor/sulu/sulu/src/Sulu/Bundle/AdminBundle/Command/DownloadBuildCommand.php line 20

Open in your IDE?
  1. <?php
  2. /*
  3. * This file is part of Sulu.
  4. *
  5. * (c) Sulu GmbH
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Sulu\Bundle\AdminBundle\Command;
  11. use Symfony\Component\Console\Attribute\AsCommand;
  12. use Symfony\Component\Console\Command\Command;
  13. use Symfony\Component\Console\Input\InputInterface;
  14. use Symfony\Component\Console\Output\OutputInterface;
  15. use Symfony\Component\Console\Style\SymfonyStyle;
  16. @trigger_deprecation(
  17. 'sulu/sulu',
  18. '2.0',
  19. 'The "%s" class is deprecated, use "%s" instead.',
  20. DownloadBuildCommand::class,
  21. UpdateBuildCommand::class
  22. );
  23. /**
  24. * @deprecated use the "UpdateBuildCommand" class instead
  25. */
  26. #[AsCommand(name: 'sulu:admin:download-build', description: 'Downloads the current admin application build from the sulu/skeleton repository.')]
  27. class DownloadBuildCommand extends Command
  28. {
  29. protected function execute(InputInterface $input, OutputInterface $output): int
  30. {
  31. $application = $this->getApplication();
  32. if (null === $application) {
  33. $ui = new SymfonyStyle($input, $output);
  34. $ui->error('Could not find application');
  35. return 1;
  36. }
  37. $command = $application->find('sulu:admin:update-build');
  38. return $command->run($input, $output);
  39. }
  40. }