In this talk I present a composer plugin for installing, uninstalling and updating patches on any composer packages and how to provide them within packages or from a server. Also I'll talk about our new TYPO3 composer installer.
3. Why?
• We are dedicated to open source technologies and using
them in our everydays business
• Open source projects:
• A lot of stakeholders involved
• Great for the vitality of the projects and for the dynamic of
the development
• Also challenging as you never know if the development
will match your requirements
• If your requirements aren’t met, you can go various but
stony ways…
⇒ We want an easy and flexible way!
5. How?
• If your requirements aren’t met, you can go various but
stony ways:
• working around if possible - that’s what we do all day
• patching: full flexibility but hard to keep track of and maintain especially across projects
• waiting until a change/bugfix did it to the release - conformist but
potentially deadly for your project
• forking - also fully flexible but completely separates you from the
project by all means
• switching to another product - well...
• As a first step, we want to reduce the drawbacks of
patching, make it easier and reliable
7. What?
• We’ve developed a composer plugin that allows packages to
provide patches for other packages
• Patches are applied/reverted when both of those are
installed/updated
• Before update or uninstallation of one of the packages
(patch or patched) the patches will be reverted
• The plugin tests all patches before it applies them
• When one patch would fail, current behaviour is that:
• All already applied patches will be reverted
• The installation won’t fail as the plugin applies the patches after the
complete installation/update
8. What?
• Patch packages can provide the patches configuration
(JSON) completely via composer.json or include them
completely or partly from an URL
• Patches are referred to via URLs - works also with local files
(within the patch packages)
• The patches are strictly bound to a version - if the package
to patch is not installed in a supported version it won’t be
patched
12. Roadmap / ideas
• Make the patching process interactive (f.i. ask whether to
stop on patch failure)
• Implement a reporting feature to allow agencies or patch
distributors to keep track of which installations have which
patches installed
(could f.e. be used to collect usages of TYPO3 patches to
indicate their relevance and quality)
• Implement a patch management backend - either as web
app on Flow basis or as satis extension
14. By the way
• Along with the composer patches plugin we’ve developed
another composer typo3 installer which
• enables installation of TYPO3 in the preferred way
(with symlinks to vendor or with direct copies, when symlinking is not
possible)
• implements the common update procedure
• Is there interest to make an official typo3/cms package on
packagist that uses f.i. this installer?
15. Use it
Composer packages (available from packagist):
•netresearch/composer-patches-plugin
• https://packagist.org/packages/netresearch/composerpatches-plugin
•netresearch/composer-installers
• https://packagist.org/packages/netresearch/composerinstallers