Skip to content

Commit b5ef663

Browse files
hjuarez20jmolivas
authored andcommitted
[console] Extend command base (#3458)
* [console] Extend base commands. (#3457) * [console] Extend base commands
1 parent 9bc4c88 commit b5ef663

File tree

144 files changed

+170
-521
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

144 files changed

+170
-521
lines changed

src/Command/Cache/TagInvalidateCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,15 @@
77

88
namespace Drupal\Console\Command\Cache;
99

10-
use Drupal\Console\Core\Command\Shared\CommandTrait;
1110
use Drupal\Console\Core\Style\DrupalStyle;
1211
use Drupal\Core\Cache\CacheTagsInvalidatorInterface;
13-
use Symfony\Component\Console\Command\Command;
12+
use Drupal\Console\Core\Command\Command;
1413
use Symfony\Component\Console\Input\InputArgument;
1514
use Symfony\Component\Console\Input\InputInterface;
1615
use Symfony\Component\Console\Output\OutputInterface;
1716

1817
class TagInvalidateCommand extends Command
1918
{
20-
use CommandTrait;
21-
2219
/**
2320
* @var CacheTagsInvalidatorInterface
2421
*/

src/Command/Config/DeleteCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,14 @@
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Output\OutputInterface;
1212
use Symfony\Component\Yaml\Exception\RuntimeException;
13-
use Symfony\Component\Console\Command\Command;
13+
use Drupal\Console\Core\Command\Command;
1414
use Drupal\Core\Config\StorageInterface;
1515
use Drupal\Core\Config\CachedStorage;
1616
use Drupal\Core\Config\ConfigFactory;
17-
use Drupal\Console\Core\Command\Shared\CommandTrait;
1817
use Drupal\Console\Core\Style\DrupalStyle;
1918

2019
class DeleteCommand extends Command
2120
{
22-
use CommandTrait;
23-
2421
protected $allConfig = [];
2522

2623
/**

src/Command/Config/DiffCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,13 @@
1212
use Symfony\Component\Console\Input\InputInterface;
1313
use Symfony\Component\Console\Input\InputOption;
1414
use Symfony\Component\Console\Output\OutputInterface;
15-
use Symfony\Component\Console\Command\Command;
15+
use Drupal\Console\Core\Command\Command;
1616
use Drupal\Core\Config\CachedStorage;
1717
use Drupal\Core\Config\ConfigManager;
18-
use Drupal\Console\Core\Command\Shared\CommandTrait;
1918
use Drupal\Console\Core\Style\DrupalStyle;
2019

2120
class DiffCommand extends Command
2221
{
23-
use CommandTrait;
24-
2522
/**
2623
* @var CachedStorage
2724
*/

src/Command/Config/EditCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,12 @@
1717
use Drupal\Component\Serialization\Yaml;
1818
use Drupal\Core\Config\CachedStorage;
1919
use Drupal\Core\Config\ConfigFactory;
20-
use Symfony\Component\Console\Command\Command;
21-
use Drupal\Console\Core\Command\Shared\CommandTrait;
20+
use Drupal\Console\Core\Command\Command;
2221
use Drupal\Console\Core\Style\DrupalStyle;
2322
use Drupal\Console\Core\Utils\ConfigurationManager;
2423

2524
class EditCommand extends Command
2625
{
27-
use CommandTrait;
28-
2926
/**
3027
* @var ConfigFactory
3128
*/

src/Command/Config/ExportCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,13 @@
1414
use Symfony\Component\Console\Input\InputInterface;
1515
use Symfony\Component\Console\Input\InputOption;
1616
use Symfony\Component\Console\Output\OutputInterface;
17-
use Symfony\Component\Console\Command\Command;
17+
use Drupal\Console\Core\Command\Command;
1818
use Symfony\Component\Filesystem\Filesystem;
19-
use Drupal\Console\Core\Command\Shared\CommandTrait;
2019
use Drupal\Console\Core\Style\DrupalStyle;
2120
use Drupal\Core\Config\ConfigManager;
2221

2322
class ExportCommand extends Command
2423
{
25-
use CommandTrait;
26-
2724
/**
2825
* @var ConfigManager
2926
*/

src/Command/Config/ExportContentTypeCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,15 @@
1212
use Symfony\Component\Console\Input\InputOption;
1313
use Symfony\Component\Console\Input\InputInterface;
1414
use Symfony\Component\Console\Output\OutputInterface;
15-
use Symfony\Component\Console\Command\Command;
15+
use Drupal\Console\Core\Command\Command;
1616
use Drupal\Core\Config\CachedStorage;
1717
use Drupal\Core\Entity\EntityTypeManagerInterface;
18-
use Drupal\Console\Core\Command\Shared\CommandTrait;
1918
use Drupal\Console\Core\Style\DrupalStyle;
2019
use Drupal\Console\Command\Shared\ExportTrait;
2120
use Drupal\Console\Extension\Manager;
2221

2322
class ExportContentTypeCommand extends Command
2423
{
25-
use CommandTrait;
2624
use ModuleTrait;
2725
use ExportTrait;
2826

src/Command/Config/ExportSingleCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,16 @@
1212
use Symfony\Component\Console\Input\InputInterface;
1313
use Symfony\Component\Console\Input\InputOption;
1414
use Symfony\Component\Console\Output\OutputInterface;
15-
use Symfony\Component\Console\Command\Command;
15+
use Drupal\Console\Core\Command\Command;
1616
use Drupal\Core\Entity\EntityTypeManagerInterface;
1717
use Drupal\Core\Config\CachedStorage;
1818
use Drupal\Console\Core\Style\DrupalStyle;
19-
use Drupal\Console\Core\Command\Shared\CommandTrait;
2019
use Drupal\Console\Command\Shared\ExportTrait;
2120
use Drupal\Console\Extension\Manager;
2221
use Webmozart\PathUtil\Path;
2322

2423
class ExportSingleCommand extends Command
2524
{
26-
use CommandTrait;
2725
use ExportTrait;
2826

2927
/**

src/Command/Config/ExportViewCommand.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
use Symfony\Component\Console\Input\InputOption;
1212
use Symfony\Component\Console\Input\InputInterface;
1313
use Symfony\Component\Console\Output\OutputInterface;
14-
use Symfony\Component\Console\Command\Command;
15-
use Drupal\Console\Core\Command\Shared\CommandTrait;
14+
use Drupal\Console\Core\Command\Command;
1615
use Drupal\Console\Command\Shared\ModuleTrait;
1716
use Drupal\Core\Entity\EntityTypeManagerInterface;
1817
use Drupal\Core\Config\CachedStorage;
@@ -22,7 +21,6 @@
2221

2322
class ExportViewCommand extends Command
2423
{
25-
use CommandTrait;
2624
use ModuleTrait;
2725
use ExportTrait;
2826

src/Command/Config/ImportCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
use Symfony\Component\Console\Input\InputOption;
1010
use Symfony\Component\Console\Input\InputInterface;
1111
use Symfony\Component\Console\Output\OutputInterface;
12-
use Symfony\Component\Console\Command\Command;
12+
use Drupal\Console\Core\Command\Command;
1313
use Drupal\Core\Config\CachedStorage;
1414
use Drupal\Core\Config\ConfigManager;
15-
use Drupal\Console\Core\Command\Shared\CommandTrait;
1615
use Drupal\Console\Core\Style\DrupalStyle;
1716
use Drupal\Core\Config\ConfigImporterException;
1817
use Drupal\Core\Config\ConfigImporter;
@@ -21,8 +20,6 @@
2120

2221
class ImportCommand extends Command
2322
{
24-
use CommandTrait;
25-
2623
/**
2724
* @var CachedStorage
2825
*/

src/Command/Config/ImportSingleCommand.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@
77
namespace Drupal\Console\Command\Config;
88

99
use Drupal\config\StorageReplaceDataWrapper;
10-
use Drupal\Console\Core\Command\Shared\CommandTrait;
1110
use Drupal\Console\Core\Style\DrupalStyle;
1211
use Drupal\Core\Config\CachedStorage;
1312
use Drupal\Core\Config\ConfigImporter;
1413
use Drupal\Core\Config\ConfigImporterException;
1514
use Drupal\Core\Config\ConfigManager;
1615
use Drupal\Core\Config\StorageComparer;
17-
use Symfony\Component\Console\Command\Command;
16+
use Drupal\Console\Core\Command\Command;
1817
use Symfony\Component\Console\Input\InputInterface;
1918
use Symfony\Component\Console\Input\InputOption;
2019
use Symfony\Component\Console\Output\OutputInterface;
@@ -23,8 +22,6 @@
2322

2423
class ImportSingleCommand extends Command
2524
{
26-
use CommandTrait;
27-
2825
/**
2926
* @var CachedStorage
3027
*/

0 commit comments

Comments
 (0)