orakili / composer-drupal-info-file-patch-helper

Composer plugin to help apply patches that modify a Drupal module info file.
4 stars 1 forks source link

Class "cweagans\Composer\PatchEvents" not found #2

Open osopolar opened 1 month ago

osopolar commented 1 month ago

Checking out my current project which uses this plugin and running composer install I get:

  • Installing orakili/composer-drupal-info-file-patch-helper (1.0.1): Extracting archive Install of orakili/composer-drupal-info-file-patch-helper failed

In Plugin.php line 65:

[Error] Class "cweagans\Composer\PatchEvents" not found

Exception trace: at /app/vendor/orakili/composer-drupal-info-file-patch-helper/src/Plugin.php:65

This is the same issue as in #1 . The solution there was:

... the problem was the order, I had to put pantheon-upstreams/upstream-configuration first

As stated in this old composer issue about install order:

the order in which you define your requirements has strictly no influence on the order in whcih packages are installed.

the rule to sort the packages for installations is that dependencies of a package are always installed before the package itself (except if you have a circular dependency in your packages of course as this would be impossible)

Therefore I assume the issue is with the missing dependency declaration. As composer-drupal-info-file-patch-helper/src/Plugin.php uses PatchEvents class shouldn't it declare a dependency on cweagans/composer-patches?

osopolar commented 1 month ago

BTW: An alternative of using this plugin might be following instructions from https://chromatichq.com/insights/patching-info-files-composer/