Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change DrupalInstaller locations to use contrib folder #294

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ is not needed to install packages with these frameworks:
| Croogo | `croogo-plugin`<br>`croogo-theme`
| DokuWiki | `dokuwiki-plugin`<br>`dokuwiki-template`
| Dolibarr | `dolibarr-module`
| Drupal | <b>`drupal-core`<br>`drupal-module`<br>`drupal-theme`</b><br>`drupal-library`<br>`drupal-profile`<br>`drupal-drush`
| Drupal | **`drupal-core`<br>`drupal-module`<br>`drupal-theme`**<br>`drupal-library`<br>`drupal-profile`<br>`drupal-theme-engine`<br>`drupal-drush`<br>`drupal-custom-module`<br>`drupal-custom-theme`<br>`drupal-custom-profile`<br>`drupal-custom-theme-engine`
| Elgg | `elgg-plugin`
| FuelPHP v1.x | `fuel-module`<br>`fuel-package`<br/>`fuel-theme`
| FuelPHP v2.x | `fuelphp-component`
Expand Down
23 changes: 13 additions & 10 deletions src/Composer/Installers/DrupalInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@

class DrupalInstaller extends BaseInstaller
{
protected $locations = array(
'core' => 'core/',
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
'library' => 'libraries/{$name}/',
'profile' => 'profiles/{$name}/',
'drush' => 'drush/{$name}/',
'custom-theme' => 'themes/custom/{$name}/',
'custom-module' => 'modules/custom/{$name}',
);
protected $locations = array(
'core' => 'core/',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drupal-core, drupal-module, and drupal-theme were bold in the readme... Which it states they are stable and install paths will not be changed.

'drush' => 'drush/{$name}/',
'module' => 'modules/contrib/{$name}/',
'custom-module' => 'modules/custom/{$name}/',
'library' => 'libraries/{$name}/',
'theme' => 'themes/contrib/{$name}/',
'custom-theme' => 'themes/custom/{$name}/',
'profile' => 'profiles/contrib/{$name}/',
'custom-profile' => 'profiles/custom/{$name}/',
'theme-engine' => 'themes/engines/contrib/{$name}/',
'custom-theme-engine' => 'themes/engines/custom/{$name}/',
);
}
11 changes: 8 additions & 3 deletions tests/Composer/Installers/Test/InstallerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,10 +223,15 @@ public function dataForTestInstallPath()
array('dokuwiki-plugin', 'lib/plugins/someplugin/', 'author/someplugin'),
array('dokuwiki-template', 'lib/tpl/sometemplate/', 'author/sometemplate'),
array('dolibarr-module', 'htdocs/custom/my_module/', 'shama/my_module'),
array('drupal-module', 'modules/my_module/', 'shama/my_module'),
array('drupal-theme', 'themes/my_module/', 'shama/my_module'),
array('drupal-profile', 'profiles/my_module/', 'shama/my_module'),
array('drupal-drush', 'drush/my_module/', 'shama/my_module'),
array('drupal-module', 'modules/contrib/my_module/', 'shama/my_module'),
array('drupal-custom-module', 'modules/custom/my_module/', 'shama/my_module'),
array('drupal-theme', 'themes/contrib/my_module/', 'shama/my_module'),
array('drupal-custom-theme', 'themes/custom/my_module/', 'shama/my_module'),
array('drupal-profile', 'profiles/contrib/my_module/', 'shama/my_module'),
array('drupal-custom-profile', 'profiles/custom/my_module/', 'shama/my_module'),
array('drupal-theme-engine', 'themes/engines/contrib/my_module/', 'shama/my_module'),
array('drupal-custom-theme-engine', 'themes/engines/custom/my_module/', 'shama/my_module'),
array('elgg-plugin', 'mod/sample_plugin/', 'test/sample_plugin'),
array('fuel-module', 'fuel/app/modules/module/', 'fuel/module'),
array('fuel-package', 'fuel/packages/orm/', 'fuel/orm'),
Expand Down