Browse Source

Add Composer v2 compatibility

Eric BELLOT 3 năm trước cách đây
mục cha
commit
637fb19c4b
3 tập tin đã thay đổi với 8 bổ sung5 xóa
  1. 3 2
      composer.json
  2. 1 1
      src/BuildServicesCommand.php
  3. 4 2
      src/Builder.php

+ 3 - 2
composer.json

@@ -19,7 +19,8 @@
   "name": "fgm/drupal_composer_builder",
   "require": {
     "composer-plugin-api": "^1.1 || ^2.0.0",
-    "composer/installers": "^1.2"
+    "composer/installers": "^1.2",
+    "twig/twig":  "^2.12"
   },
   "type": "composer-plugin",
   "require-dev": {
@@ -29,6 +30,6 @@
     "phpunit/phpunit": "^8.5"
   },
   "scripts": {
-    "cs": "phpcs --standard=PSR1,Drupal -v src"
+    "cs": "phpcs --standard=PSR1 -v src"
   }
 }

+ 1 - 1
src/BuildServicesCommand.php

@@ -30,7 +30,7 @@ class BuildServicesCommand extends BaseBuilderCommand {
    */
   protected $eventName;
 
-  protected function UseTemplate() {
+  protected function useTemplate() {
     return FALSE;
   }
 

+ 4 - 2
src/Builder.php

@@ -1,6 +1,6 @@
 <?php
 
-declare(strict_types=1);
+declare(strict_types = 1);
 
 namespace Fgm\Drupal\Composer;
 
@@ -103,12 +103,14 @@ class Builder implements Capable, Capability, EventSubscriberInterface, PluginIn
    * {@inheritdoc}
    */
   public function deactivate(Composer $composer, IOInterface $io) {
-    parent::deactivate($composer, $io);
+    // Do nothing.
   }
 
   /**
    * {@inheritdoc}
    */
   public function uninstall(Composer $composer, IOInterface $io) {
+    // Do nothing.
   }
+
 }