Skip to content
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

Feature/post install patching #2

Merged
merged 40 commits into from
Dec 3, 2016
Merged

Conversation

allanpaiste
Copy link
Contributor

@allanpaiste allanpaiste commented Sep 1, 2016

Background

Currently the patches are applied right after package install which means that developer has no way to add patches via packages due to not being able to define reverse-dependencies to some packages to dictate installation order.

This means that we currently don't have a way to move away from project-level patch management to something more granular that would be easy to maintain in larger scale (so that we could push certain patches to every project).

This branch is addressing the issue by moving the "apply instantly" logic to the moment of "apply when every package is installed".

Package patches

Extra changes to allow packages to have proper paths that are relative to the package root.

Another thing changed is the logic on how the patches are stored as multiple modules might end up overwriting each-others patches just because they have same description. Flipped this around so that the thing that has to be unique is the vendor path which will guarantee that you never end up being unpleasantly surprised.

Installation

aja project add-module cweagans/composer-patches:dev-feature/post-install-patching

Allan Paiste added 30 commits August 30, 2016 18:57
…ts for keys that already exist (by not replacing them and rather appending them and converting type to array)
…istry differs, but patches are actually he same
Added more hints on the usage
Added more notes about enabling patching
Added alternative approach for defining patches in case load order is…
@cweagans
Copy link
Contributor

This is a whole lot of cool stuff! I noticed the activity in the GH contribution graph, so thought I'd come take a look.

Before you get too much further into this, you should be aware of the 2.x branch of the plugin. I feel very strongly that a lot of this would be much easier to implement in 2.x, and I'd love to help get it in if you're interested.

@allanpaiste
Copy link
Contributor Author

hey :) sorry for not answering earlier, but have been rushing through the changes so that we could start grouping patches with packages. anyhow - now I'm kind of regretting that I did not start with 2.x :( any kind of help would be greatly appreciated of course :) I'd probably could look into it over the weekend as well :)

@cweagans
Copy link
Contributor

cweagans commented Oct 5, 2016

I'm unfortunately going to be completely unavailable until ~10/23, but after that point, I'm more than happy to assist. In the mean time, if you want to take a look at 2.x and see where/how your changes could fit in, that would be awesome!

Note that 2.x is not entirely functional as of yet. It's more or less a rewrite. It has 100% test coverage so far though :)

@allanpaiste allanpaiste merged commit 700505a into master Dec 3, 2016
@allanpaiste allanpaiste deleted the feature/post-install-patching branch March 13, 2017 12:49
@ucola ucola mentioned this pull request Aug 30, 2018
ruudk added a commit to ruudk/composer-patches that referenced this pull request Dec 12, 2021
Fixes this notice on PHP 8.1:
```
Deprecation Notice: explode(): Passing null to parameter vaimo#2 ($string) of type string is deprecated in vendor/vaimo/composer-patches/src/Patch/SourceLoaders/PatchesSearch.php:234
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants