All it takes to start is to add your PatchPub repository to your "composer.json", run "composer update", that's it.
"repositories": [ { "type": "composer", "url": "{your-project-url}" } ]
"repositories": [ { "type": "composer", "url": "https://repo.patchpub.com/{your-project-url}" } ]
Modify anything the way your project needs.
Validate and check all patches immediately.
PatchPub keeps it simple by default, yet powerful for managing complex changes.
What already exists, and what's to come...
PatchPub is designed to work seamlessly with CI/CD pipelines. Since patches are applied directly on the target distribution zip file, way before composer is run, all patched dependencies are fetched like any other dependency by Composer.
This means that your CI/CD pipeline will always use the patched versions of the dependencies, ensuring consistency across environments.
You can easily disable a patch or a whole project of patches without deleting them. This allows you to keep your patches organized and ready to be re-enabled when needed.
Simply toggle the active state of the patch or project in the PatchPub interface, and it will not be applied during the Composer install/update process.
PatchPub does not apply patches from remote sources directly. Instead, it allows you import and review those patches before applying.
Once a patch is imported it won't be automatically imported again (yet, maybe another feature requests?)
Yes, you can create multiple patches for the same dependency, each targeting different versions for different projects. This allows you to manage changes for specific versions of a dependency without affecting others.
PatchPub allows you to modify the "composer.json" file of a dependency. This means you can change the version constraints, add or remove dependencies, and even modify scripts or autoloading configurations. These changes are applied during the Composer install/update process, ensuring that your project uses the modified version of the dependency.
To make sure your changes are applied correctly without corrupting the composer.json file, PatchPub validates the changes before saving them. This validation ensures that the modified composer.json is still a valid and readable JSON file.
If a patch fails to apply automatically on a new version release, you will receive an error notification via email. You can then review the patch and make necessary adjustments to ensure it works with the current version of the dependency.
If you are just creating a patch, you can also validate it immediately to ensure it works with the current version of the dependency.
PatchPub works way before any other patching packages kick in, like "vaimo/composer-patches" or "cweagans/composer-patches".
It applies patches directly on the distributed dist file or a dependency version, ensuring that your changes are applied before any other patching tools are executed.
Therefore, it does not conflict with other patching tools, and you can use it alongside them if needed.
PatchPub does not handle circular dependencies directly. However, it allows you to manage patches for each dependency individually.
If you have circular dependencies, you can create patches for each dependency separately and apply them as needed.
Composer will handle the circular dependencies as usual, and PatchPub will apply your patches accordingly.
I've been working with third-party components in PHP projects for over 20 years.
When Composer came along in 2013, it was a huge blessing. But it also brought challenges when patching dependencies.
PatchPub was created to patch dependencies in a simple, reliable, and centralized way.