Skip to content

Commit 0f0580a

Browse files
committed
Add deprecation error to \DrupalComposer\DrupalScaffold\Plugin::scaffold
1 parent 8d05f72 commit 0f0580a

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

src/DrupalScaffoldCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ protected function configure() {
1515
parent::configure();
1616
$this
1717
->setName('drupal:scaffold')
18-
->setAliases(['drupal-scaffold'])
1918
->setDescription('Update the Drupal scaffold files.');
2019
}
2120

src/Plugin.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,4 +86,21 @@ public function postCmd(\Composer\Script\Event $event) {
8686
$this->handler->onPostCmdEvent($event);
8787
}
8888

89+
/**
90+
* Script callback for putting in composer scripts to download the
91+
* scaffold files.
92+
*
93+
* @param \Composer\Script\Event $event
94+
*
95+
* @deprecated since version 2.5.0, to be removed in 3.0. Use the command
96+
* "composer drupal:scaffold" instead.
97+
*/
98+
public static function scaffold(\Composer\Script\Event $event) {
99+
@trigger_error('\DrupalComposer\DrupalScaffold\Plugin::scaffold is deprecated since version 2.5.0 and will be removed in 3.0. Use "composer drupal:scaffold" instead.', E_USER_DEPRECATED);
100+
$handler = new Handler($event->getComposer(), $event->getIO());
101+
$handler->downloadScaffold();
102+
// Generate the autoload.php file after generating the scaffold files.
103+
$handler->generateAutoload();
104+
}
105+
89106
}

0 commit comments

Comments
 (0)