New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the cweagans/composer-patches patch to prevent whole /web dir might get deleted #474
Comments
I'm not sure if a fork of cweagans/composer-patches just to apply this patch is the best solution. I think that forcing the patching of that package somehow in the post-create-project-cmd step or maybe also in the pre-install-cmd and pre-update-cmd steps, would be a way more maintainable solution. |
Also note that composer-exit-on-patch-failure is not part of the composer.json in the 7.x branch. |
I know only these ways to patch a package:
Both are not usable for composer pre/post commands. Maybe @cweagans know other ways? |
Yes, this would not be done the 'normal' way... It would be a direct call for composer-patches to patch itself. It would probably require some custom PHP code, but most likely it should not be too complicated. The question is whether that code should be on this project or in composer-patches.. It is somewhat a bug in that package that it is unable to apply a patch to itself on the first install. |
Just for reference the discussion on this is going on at cweagans/composer-patches#42 |
We created this for D7 projects: https://github.com/druidfi/mona-plugin See how it's used in: https://github.com/druidfi/mona/blob/master/composer.json |
Existing D7 site that 6 months ago was converted to Composer. During Not sure how we make sure this not happen again and I am not able to re-create this in dev.
|
I reported an issue with meta packages and overlapping preserve paths like this |
This pull request/issue has been inactive for over a year and is being closed due to inactivity. If the issue still persists or the contribution is still relevant, please feel free to reopen it or create a new one. Thank you for your understanding and your contributions to the project! |
Currently there are two ways to lose /web directory completely:
Apply a patch to Drupal core
We have this code:
drupal-project/composer.json
Lines 76 to 80 in 339c81d
It tries to solve the issue described in drupal-composer/preserve-paths#10
However, this does not work. Explained here: drupal-composer/preserve-paths#10 (comment)
Moreover, current setup is pretty confusing and it can lead to not nice situations. For example, this could happen:
Proposed solution:
Ifcomposer-exit-on-patch-failure
istrue
, and there is an issue with applying a Drupal core patchThe text was updated successfully, but these errors were encountered: