distributed patching with composer

16
Netresearch GmbH & Co. KG - Nonnenstraße 11d - 04229 Leipzig - www.netresearch.de - [email protected] Distributed patching with composer Christian Opitz

Upload: christianopitz

Post on 12-Jul-2015

419 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Distributed patching with composer

Netresearch GmbH & Co. KG - Nonnenstraße 11d - 04229 Leipzig - www.netresearch.de - [email protected]

Distributed patching with composer

Christian Opitz

Page 2: Distributed patching with composer

Why?

Page 3: Distributed patching with composer

• 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!⇒

Why?

Page 4: Distributed patching with composer

How?

Page 5: Distributed patching with composer

• 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

How?

Page 6: Distributed patching with composer

What?

Page 7: Distributed patching with composer

• 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

What?

Page 8: Distributed patching with composer

• 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

What?

Page 9: Distributed patching with composer

Showcase

Page 10: Distributed patching with composer

Showcase

Page 11: Distributed patching with composer

Roadmap / ideas

Page 12: Distributed patching with composer

• 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

Roadmap / ideas

Page 13: Distributed patching with composer

By the way

Page 14: Distributed patching with composer

• 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?

By the way

Page 15: Distributed patching with composer

Composer packages (available from packagist):

•netresearch/composer-patches-plugin• https://packagist.org/packages/netresearch/composer-

patches-plugin

•netresearch/composer-installers• https://packagist.org/packages/netresearch/composer-

installers

Use it

Page 16: Distributed patching with composer

Thank you for your attention!