drupal-composer / preserve-paths

A composer plugin for keeping specified files and directories when installing/updating new composer packages. Can be used to supported nested packages.
28 stars 28 forks source link

Fix deprecated class usage #11

Closed NickDickinsonWilde closed 7 years ago

NickDickinsonWilde commented 7 years ago

As noted in: https://github.com/composer/composer/releases/tag/1.0.0-alpha10 (April 2015), \Composer\Installer\PackageEvent should be used instead of \Composer\Script\PackageEvent

deminy commented 7 years ago

The fix is incomplete. Following error shows up after the patch:

[Symfony\Component\Debug\Exception\FatalThrowableError]
Type error: Argument 1 passed to derhasi\Composer\PluginWrapper::postPackage() must be an instance of Composer\Script\PackageEvent, instance of Composer\Installer\Package
Event given, called in vendor/derhasi/composer-preserve-paths/src/Plugin.php on line 68

deminy commented 7 years ago

I created a new PR (PR #13 ), which includes changes from this PR, along with additional changes for class \derhasi\Composer\PluginWrapper. Tested with Composer 1.3.1 (latest stable release).

derhasi commented 7 years ago

Merged with #17