generator-razor 14.0.30 → 14.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
declare(strict_types=1);
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
* This file is part of the TYPO3 CMS project.
|
|
7
|
+
*
|
|
8
|
+
* It is free software; you can redistribute it and/or modify it under
|
|
9
|
+
* the terms of the GNU General Public License, either version 2
|
|
10
|
+
* of the License, or any later version.
|
|
11
|
+
*
|
|
12
|
+
* For the full copyright and license information, please read the
|
|
13
|
+
* LICENSE.txt file that was distributed with this source code.
|
|
14
|
+
*
|
|
15
|
+
* The TYPO3 project - inspiring people to share!
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
namespace RZ\Razorbootstrap\Command;
|
|
19
|
+
|
|
20
|
+
use Symfony\Component\Console\Attribute\AsCommand;
|
|
21
|
+
use Symfony\Component\Console\Command\Command;
|
|
22
|
+
use Symfony\Component\Console\Input\InputInterface;
|
|
23
|
+
use Symfony\Component\Console\Output\OutputInterface;
|
|
24
|
+
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
25
|
+
use TYPO3\CMS\Core\Attribute\AsNonSchedulableCommand;
|
|
26
|
+
use TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException;
|
|
27
|
+
use TYPO3\CMS\Extensionmanager\Remote\RemoteRegistry;
|
|
28
|
+
|
|
29
|
+
#[AsCommand(
|
|
30
|
+
name: 'razorbootstrap:ter:update',
|
|
31
|
+
description: 'Updates the TYPO3 Extension Repository extension list'
|
|
32
|
+
)]
|
|
33
|
+
#[AsNonSchedulableCommand]
|
|
34
|
+
final class UpdateTerCommand extends Command
|
|
35
|
+
{
|
|
36
|
+
public function __construct(
|
|
37
|
+
private readonly RemoteRegistry $remoteRegistry
|
|
38
|
+
) {
|
|
39
|
+
parent::__construct();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
protected function execute(
|
|
43
|
+
InputInterface $input,
|
|
44
|
+
OutputInterface $output
|
|
45
|
+
): int {
|
|
46
|
+
$io = new SymfonyStyle($input, $output);
|
|
47
|
+
|
|
48
|
+
$io->text('Updating TER extension list...');
|
|
49
|
+
|
|
50
|
+
try {
|
|
51
|
+
foreach ($this->remoteRegistry->getListableRemotes() as $remote) {
|
|
52
|
+
$remote->getAvailablePackages(true);
|
|
53
|
+
}
|
|
54
|
+
} catch (ExtensionManagerException $exception) {
|
|
55
|
+
$io->error($exception->getMessage());
|
|
56
|
+
|
|
57
|
+
return Command::FAILURE;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
$io->success('TER extension list successfully updated.');
|
|
61
|
+
|
|
62
|
+
return Command::SUCCESS;
|
|
63
|
+
}
|
|
64
|
+
}
|