@@ -15,7 +15,21 @@ It's (kind-of) an alternative to two other great plugins (differences will becom
1515 * [ cweagans/composer-patches] ( https://github.com/cweagans/composer-patches )
1616
1717
18- ## Features
18+ ## Feature comparison table
19+
20+ | Feature | creativestyle/composer-plugin-patchset | cweagans/composer-patches 1.x | netresearch/composer-patches-plugin |
21+ | --------------------------------------------------------- | :---------------------------------------: | :----------------------------: | :---------------------------------: |
22+ | Apply patch collection stored in a composer package | yes | no | no |
23+ | Deduplicate patches | yes | no | TBD |
24+ | Guarantees proper application on the first install | yes | no | TBD |
25+ | Full functional test-suite for all features | yes | no | no tests at all |
26+ | PHP Version Support confirmed by tests | 5.6+ | 5.3+ | no information |
27+ | Apply patches directly from remote locations | no (no support planned) | yes | yes |
28+ | Specify target package version constraints | yes | no | yes |
29+ | Uninstall removed patches in all cases | yes | no | TBD |
30+ | Reapply package patches if order has changed | yes | TBD | TBD |
31+
32+ ### Some feature hilights
1933
2034 - Apply patches from dedicated composer packages (package your patchset!).
2135 - Each patch can have a version constraint (composer semver) checked against the target package.
@@ -36,8 +50,20 @@ It's (kind-of) an alternative to two other great plugins (differences will becom
3650 consistently on the first composer install (e.g. no ` vendor ` dir at all) and the subsequent ones.
3751
3852 Double composer update/install for build is not necessary.
53+
54+ ### Chicken or egg problem
55+
56+ Patching via composer plugin has one big problem - you cannot catch all events on the first install.
57+ Furthermore applying patches on package install/remove is very error prone as you can never predict
58+ conflicts with other plugins. Therefor gathering and applying patches before everything was actually installed
59+ carries the risk of producing invalid state at the end. This plugin takes a different approach - it performs
60+ all actions at once, after the installation/update was performed, just before autoload dump (in case patching changes it).
61+
62+ This guarantees a consistent state as the plugin compares the current state with the desired one and peforms only
63+ the actions necessary to get there.
64+
3965
40- ### What it cannot do
66+ ### No remote patches
4167
4268 This plugin will not download patches from external sources directly (http). I consider this a bad practice and will
4369 never support it. I won't even comment on downloading patches using unencrypted connection without SHA check. Also what
@@ -52,8 +78,6 @@ It's (kind-of) an alternative to two other great plugins (differences will becom
5278 - Patch the root package / files in root directory
5379 - Allow to specify patches in the root composer.json
5480
55-
56-
5781## Running tests
5882
5983Just start ` vendor/bin/phpunit ` .
@@ -63,4 +87,8 @@ vendor/bin/phpunit --debug
6387```
6488
6589It's nice to also add the ` --testdox ` switch then.
66-
90+
91+
92+ ### Notes to myself
93+
94+ - Tests for skipping package aliases (BTW Maybe use localrepo->getCanonicalPackages)
0 commit comments