Skip to content

Commit

Permalink
[console] Tag 1.0.0-rc20 release. (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmolivas committed May 26, 2017
1 parent 40d3484 commit 4b93841
Show file tree
Hide file tree
Showing 40 changed files with 124 additions and 77 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"require": {
"php": "^5.5.9 || ^7.0",
"drupal/console-en" : "1.0.0-rc19",
"drupal/console-en" : "1.0.0-rc20",
"dflydev/dot-access-configuration": "1.0.1",
"stecman/symfony-console-completion": "~0.7",
"symfony/console": ">=2.7 <3.0",
Expand Down
12 changes: 6 additions & 6 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ private function registerCommandsFromAutoWireConfiguration()
$autoWireForcedCommands = $configuration
->get('application.autowire.commands.forced');

if(!is_array($autoWireForcedCommands)){
if (!is_array($autoWireForcedCommands)) {
return;
}

Expand Down
2 changes: 2 additions & 0 deletions src/Bootstrap/DrupalConsoleCore.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

/**
* Class DrupalConsoleCore
*
* @package Drupal\Console\Core\Bootstrap
*/
class DrupalConsoleCore
Expand All @@ -29,6 +30,7 @@ class DrupalConsoleCore

/**
* DrupalConsole constructor.
*
* @param $root
* @param $appRoot
*/
Expand Down
1 change: 1 addition & 0 deletions src/Command/Chain/ChainDebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

/**
* Class ChainDebugCommand
*
* @package Drupal\Console\Core\Command\Chain
*/
class ChainDebugCommand extends Command
Expand Down
2 changes: 2 additions & 0 deletions src/Command/CheckCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

/**
* Class CheckCommand
*
* @package Drupal\Console\Core\Command
*/
class CheckCommand extends BaseCommand
Expand All @@ -41,6 +42,7 @@ class CheckCommand extends BaseCommand

/**
* CheckCommand constructor.
*
* @param RequirementChecker $requirementChecker
* @param ChainQueue $chainQueue
* @param ConfigurationManager $configurationManager
Expand Down
2 changes: 2 additions & 0 deletions src/Command/Exclude/DrupliconCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* Class DrupliconCommand
*
* @package Drupal\Console\Core\Command\Exclude
*/
class DrupliconCommand extends Command
Expand All @@ -34,6 +35,7 @@ class DrupliconCommand extends Command

/**
* DrupliconCommand constructor.
*
* @param string $appRoot
* @param TwigRenderer $renderer
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Command/Exclude/DrushCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

/**
* Class DrushCommand
*
* @package Drupal\Console\Core\Command\Exclude
*/
class DrushCommand extends Command
Expand All @@ -36,6 +37,7 @@ class DrushCommand extends Command

/**
* DrushCommand constructor.
*
* @param ConfigurationManager $configurationManager
* @param ChainQueue $chainQueue
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Command/Exclude/ElephpantCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* Class ElephpantCommand
*
* @package Drupal\Console\Core\Command\Exclude
*/
class ElephpantCommand extends Command
Expand All @@ -35,6 +36,7 @@ class ElephpantCommand extends Command

/**
* DrupliconCommand constructor.
*
* @param string $appRoot
* @param TwigRenderer $renderer
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Command/Exec/ExecCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

/**
* Class ExecCommand
*
* @package Drupal\Console\Core\Command\Exec
*/
class ExecCommand extends Command
Expand All @@ -32,6 +33,7 @@ class ExecCommand extends Command

/**
* ExecCommand constructor.
*
* @param ShellProcess $shellProcess
*/
public function __construct(ShellProcess $shellProcess)
Expand Down
4 changes: 2 additions & 2 deletions src/Command/HelpCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
private function createDefinition()
{
return new InputDefinition(
array(
[
new InputArgument('command_name', InputArgument::OPTIONAL, $this->trans('commands.help.arguments.command_name'), 'help'),
new InputOption('xml', null, InputOption::VALUE_NONE, $this->trans('commands.help.options.xml')),
new InputOption('raw', null, InputOption::VALUE_NONE, $this->trans('commands.help.options.raw')),
new InputOption('format', null, InputOption::VALUE_REQUIRED, $this->trans('commands.help.options.format'), 'txt'),
)
]
);
}
}
8 changes: 5 additions & 3 deletions src/Command/InitCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

/**
* Class InitCommand
*
* @package Drupal\Console\Core\Command
*/
class InitCommand extends Command
Expand Down Expand Up @@ -64,6 +65,7 @@ class InitCommand extends Command

/**
* InitCommand constructor.
*
* @param ShowFile $showFile
* @param ConfigurationManager $configurationManager
* @param InitGenerator $generator
Expand Down Expand Up @@ -203,10 +205,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
DRUPAL_CONSOLE_CORE
)
);
if (!$this->configParameters['chain']){
if (!$this->configParameters['chain']) {
$finder->exclude('chain');
}
if (!$this->configParameters['sites']){
if (!$this->configParameters['sites']) {
$finder->exclude('sites');
}
$finder->files();
Expand Down Expand Up @@ -237,7 +239,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$executableName = null;
if ($autocomplete) {
$processBuilder = new ProcessBuilder(array('bash'));
$processBuilder = new ProcessBuilder(['bash']);
$process = $processBuilder->getProcess();
$process->setCommandLine('echo $_');
$process->run();
Expand Down
5 changes: 3 additions & 2 deletions src/Command/ListCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* Class ListCommand
*
* @package Drupal\Console\Core\Command
*/
class ListCommand extends Command
Expand Down Expand Up @@ -76,12 +77,12 @@ protected function execute(InputInterface $input, OutputInterface $output)
private function createDefinition()
{
return new InputDefinition(
array(
[
new InputArgument('namespace', InputArgument::OPTIONAL, $this->trans('commands.list.arguments.namespace')),
new InputOption('xml', null, InputOption::VALUE_NONE, $this->trans('commands.list.options.xml')),
new InputOption('raw', null, InputOption::VALUE_NONE, $this->trans('commands.list.options.raw')),
new InputOption('format', null, InputOption::VALUE_REQUIRED, $this->trans('commands.list.options.format'), 'txt'),
)
]
);
}
}
2 changes: 2 additions & 0 deletions src/Command/Settings/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

/**
* Class DebugCommand
*
* @package Drupal\Console\Core\Command\Settings
*/
class DebugCommand extends Command
Expand All @@ -35,6 +36,7 @@ class DebugCommand extends Command

/**
* CheckCommand constructor.
*
* @param ConfigurationManager $configurationManager
* @param NestedArray $nestedArray
*/
Expand Down
2 changes: 2 additions & 0 deletions src/Command/Settings/SetCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

/**
* Class SetCommand
*
* @package Drupal\Console\Core\Command\Settings
*/
class SetCommand extends Command
Expand All @@ -38,6 +39,7 @@ class SetCommand extends Command

/**
* CheckCommand constructor.
*
* @param ConfigurationManager $configurationManager
* @param NestedArray $nestedArray
*/
Expand Down
1 change: 1 addition & 0 deletions src/Command/Shared/ContainerAwareCommandTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* Class CommandTrait
*
* @package Drupal\Console\Core\Command
*/
trait ContainerAwareCommandTrait
Expand Down
1 change: 1 addition & 0 deletions src/Command/Shared/InputTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

/**
* Class InputTrait
*
* @package Drupal\Console\Core\Command
*/
trait InputTrait
Expand Down
14 changes: 7 additions & 7 deletions src/Command/Site/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ protected function execute(InputInterface $input, OutputInterface $output)
// --property argument, allows the user to fetch specific properties of the selected site
$property = $input->getArgument('property');
if ($property) {
$property_keys = explode('.', $property);
$property_keys = explode('.', $property);

$val = $targetConfig;
foreach ($property_keys as $property_key) {
$val = &$val[$property_key];
}
$val = $targetConfig;
foreach ($property_keys as $property_key) {
$val = &$val[$property_key];
}

$io->writeln($val);
return 0;
$io->writeln($val);
return 0;
}

$io->info($target);
Expand Down
3 changes: 2 additions & 1 deletion src/Command/Yaml/DiffCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class DiffCommand extends Command

/**
* DiffCommand constructor.
*
* @param NestedArray $nestedArray
*/
public function __construct(NestedArray $nestedArray)
Expand Down Expand Up @@ -156,7 +157,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
return;
}
// FLAT YAML file to display full yaml to be used with command yaml:update:key or yaml:update:value
$diffFlatten = array();
$diffFlatten = [];
$keyFlatten = '';
$this->nestedArray->yamlFlattenArray($diff, $diffFlatten, $keyFlatten);

Expand Down
1 change: 1 addition & 0 deletions src/Command/Yaml/GetValueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class GetValueCommand extends Command

/**
* GetValueCommand constructor.
*
* @param NestedArray $nestedArray
*/
public function __construct(NestedArray $nestedArray)
Expand Down
34 changes: 17 additions & 17 deletions src/Command/Yaml/MergeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,26 +45,26 @@ protected function execute(InputInterface $input, OutputInterface $output)
$yaml = new Parser();
$dumper = new Dumper();

$final_yaml = array();
$final_yaml = [];
$yaml_destination = realpath($input->getArgument('yaml-destination'));
$yaml_files = $input->getArgument('yaml-files');

if(!$yaml_destination) {
$fs = new Filesystem();
try {
$fs->touch($input->getArgument('yaml-destination'));
$yaml_destination = realpath($input->getArgument('yaml-destination'));
} catch (\Exception $e) {
$io->error(
sprintf(
'%s: %s',
$this->trans('commands.yaml.merge.messages.error-writing'),
$e->getMessage()
)
);
if (!$yaml_destination) {
$fs = new Filesystem();
try {
$fs->touch($input->getArgument('yaml-destination'));
$yaml_destination = realpath($input->getArgument('yaml-destination'));
} catch (\Exception $e) {
$io->error(
sprintf(
'%s: %s',
$this->trans('commands.yaml.merge.messages.error-writing'),
$e->getMessage()
)
);

return;
}
return;
}
}

if (count($yaml_files) < 2) {
Expand Down Expand Up @@ -174,7 +174,7 @@ protected function interact(InputInterface $input, OutputInterface $output)

$yaml_files = $input->getArgument('yaml-files');
if (!$yaml_files) {
$yaml_files = array();
$yaml_files = [];

while (true) {
// Set the string key based on among files provided
Expand Down
Loading

0 comments on commit 4b93841

Please sign in to comment.