Skip to content

Commit 8b789ec

Browse files
authoredFeb 8, 2017
Add console extend plugin example (#17)
* Add console-extend plugin and example dependencies. * Add phpqa configuration. * Update readme file.
1 parent a503bf0 commit 8b789ec

10 files changed

+18
-524
lines changed
 

‎.gitignore

+2-15
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
1-
# deprecation-detector
2-
/.rules
3-
41
# Composer
52
/vendor
63

7-
# Binaries
8-
/box.phar
9-
/console.phar
10-
/composer.phar
11-
/drupal.phar
12-
/drupal.phar.version
13-
14-
# Test
15-
/phpunit.xml
16-
174
# Project
18-
extend.config.yml
19-
extend.services.yml
5+
extend.console.config.yml
6+
extend.console.services.yml

‎README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
# Drupal Console extend
1+
# Drupal Console Extend
22

3-
Instructions to extend Drupal Console adding commands globally.
3+
Composer template and instructions to extend Drupal Console adding commands globally.
44

55
### Create `~/.console/` directory
66
Execute the `init` command and select `/Users/USER_NAME/.console/` when asked for destination.
77
```
88
drupal init
99
```
10-
NOTES:
11-
* For instructions about installing the [Drupal Console Launcher](https://github.com/hechoendrupal/DrupalConsole/#update-drupalconsole-launcher)
10+
NOTES: For instructions about installing the [Drupal Console Launcher](https://github.com/hechoendrupal/DrupalConsole/#update-drupalconsole-launcher).
1211

1312
### Install this project:
1413
```

‎composer.json

+4-18
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drupal/console-extend",
3-
"description": "Drupal Console Extend",
3+
"description": "Drupal Console Extend Template",
44
"license": "GPL-2.0+",
55
"authors": [
66
{
@@ -9,23 +9,9 @@
99
}
1010
],
1111
"require": {
12-
"symfony/yaml": ">=2.7 <3.0",
13-
"symfony/finder": ">=2.7 <3.0"
12+
"drupal/console-extend-plugin":"dev-master",
13+
"drupal/console-extend-example": "dev-master"
1414
},
1515
"minimum-stability": "dev",
16-
"prefer-stable": true,
17-
"autoload": {
18-
"psr-4": {"Drupal\\Console\\Extend\\": "src"}
19-
},
20-
"require-dev": {
21-
"composer/installers": "^1.2"
22-
},
23-
"scripts": {
24-
"post-install-cmd": [
25-
"Drupal\\Console\\Extend\\Plugin\\ScriptHandler::dump"
26-
],
27-
"post-update-cmd": [
28-
"Drupal\\Console\\Extend\\Plugin\\ScriptHandler::dump"
29-
]
30-
}
16+
"prefer-stable": true
3117
}

‎composer.lock

-224
This file was deleted.

‎console.config.yml

-9
This file was deleted.

‎console.services.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#services:
2-
# console.extend_example:
3-
# class: \Drupal\Console\Extend\Command\ExampleCommand
4-
# tags:
5-
# - { name: drupal.command }
1+
services:
2+
console.extend_global:
3+
class: \Drupal\Console\Extend\Command\GlobalCommand
4+
tags:
5+
- { name: drupal.command }

‎phpqa.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ application:
6060
enabled: false
6161
exception: false
6262
phpunit:
63-
enabled: false
63+
enabled: true
6464
exception: true
6565
file:
6666
configuration: phpunit.xml.dist

‎src/Command/ExampleCommand.php ‎src/Command/GlobalCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @file
5-
* Contains \Drupal\Console\Extend\Command\ExampleCommand
5+
* Contains \Drupal\Console\Extend\Command\GlobalCommand
66
*/
77

88
namespace Drupal\Console\Extend\Command;
@@ -18,7 +18,7 @@
1818
*
1919
* @package Drupal\Console\Extend\Command
2020
*/
21-
class ExampleCommand extends Command
21+
class GlobalCommand extends Command
2222
{
2323
use CommandTrait;
2424
/**
@@ -35,7 +35,7 @@ public function __construct()
3535

3636
protected function configure()
3737
{
38-
$this->setName('extend:example')
38+
$this->setName('extend:global')
3939
->setDescription('Drupal Console global example ');
4040
}
4141

0 commit comments

Comments
 (0)