Skip to content

Commit

Permalink
Pull request drupal-composer#58: Use includes-dev instead of dev.
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentTorregrosa committed Apr 21, 2018
1 parent 40634f3 commit 88c05bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ of your root `composer.json`.
"includes": [
"sites/default/example.settings.my.php"
],
"dev": [
"includes-dev": [
"my_settings_file_for_development.php"
],
"initial": {
Expand Down Expand Up @@ -72,7 +72,7 @@ update.php
web.config
```

Default dev are provided by the plugin:
Default includes dev are provided by the plugin:
```
.csslintrc
.editorconfig
Expand All @@ -94,7 +94,7 @@ The `initial` hash lists files that should be copied over only if they do not
exist in the destination. The key specifies the path to the source file, and
the value indicates the path to the destination file.

The `dev` hash lists files that should be copied over only if they do not
The `includes-dev` hash lists files that should be copied over only if they do not
exist in the destination and if the dev packages are installed.

## Limitation
Expand Down
10 changes: 5 additions & 5 deletions src/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public function downloadScaffold($dev = FALSE) {
$includes = $this->getIncludes();
// Check dev files if necessary.
if ($dev) {
$includes = array_merge($includes, $this->getDev());
$includes = array_merge($includes, $this->getIncludesDev());
}
$files = array_diff($includes, $this->getExcludes());

Expand Down Expand Up @@ -296,8 +296,8 @@ protected function getIncludes() {
*
* @return array
*/
protected function getDev() {
return $this->getNamedOptionList('dev', 'getDevDefault');
protected function getIncludesDev() {
return $this->getNamedOptionList('includes-dev', 'getIncludesDevDefault');
}

/**
Expand Down Expand Up @@ -338,9 +338,9 @@ protected function getOptions() {
'omit-defaults' => FALSE,
'excludes' => [],
'includes' => [],
'includes-dev' => [],
'initial' => [],
'source' => 'https://cgit.drupalcode.org/drupal/plain/{path}?h={version}',
'dev' => [],
// Github: https://raw.githubusercontent.com/drupal/drupal/{version}/{path}
];
return $options;
Expand Down Expand Up @@ -380,7 +380,7 @@ protected function getIncludesDefault() {
/**
* Holds default dev files list.
*/
protected function getDevDefault() {
protected function getIncludesDevDefault() {
$version = $this->getDrupalCoreVersion($this->getDrupalCorePackage());
list($major, $minor) = explode('.', $version, 3);
$version = "$major.$minor";
Expand Down

0 comments on commit 88c05bd

Please sign in to comment.