Releases: vaimo/composer-patches
Allow comments everywhere
Feature
- forward-port(3.32.0): allow comments on any level and with any keyword as long as it starts with underscore (_)
Halt on fist patch failure by default
This release changes the default behaviour of the module and removed bunch of old environment values that were introduced before 'composer patch' command was available.
Breaking
- logic: installation/update/applying patches fails on first patch failure (used to be activated by COMPOSER_PATCHES_FATAL_FAIL); old default behaviour restorable via setting COMPOSER_PATCHES_GRACEFUL or using --graceful flag
- config: removed COMPOSER_PATCHES_REAPPLY_ALL, COMPOSER_FORCE_PATCH_REAPPLY; replaced by 'composer patch:redo'
- config: removed COMPOSER_PATCHES_FATAL_FAIL, COMPOSER_EXIT_ON_PATCH_FAILURE; replaceb by COMPOSER_PATCHES_GRACEFUL
- config: removed COMPOSER_PATCHES_FROM_SOURCE, COMPOSER_PATCHES_PREFER_OWNER; replaced with --from-source flag on commands (was meant for testing out a patch)
- config: removed COMPOSER_SKIP_PATCH_PACKAGES, COMPOSER_PATCHES_SKIP_PACKAGES; never really used for anything, could be achieved via using patcher configuration
Feature
- allow patch failures to be passed over gracefully with --graceful flag on 'composer patch:*' commands
- allow patch failures to be passed over gracefully with COMPOSER_PATCHES_GRACEFUL flag
- allow patch failures to be passed over gracefully with extra/patcher/graceful configuration in root package
Quit wiping local changes
This release introduces additional mechanism of halting the process of applying patches when targeted package has local changes. Previous release just re-installed the package without prompting nor warning the user.
New standard behaviour is to STOP, when this is encountered to avoid potentially wiping out someone's work.
Command behaviour fixes; atomic dev embedded-info patches
Giving users the option to single out certain embedded-info patches as development-only patches by adding @type tag to them with the value of "dev" or "development".
Also includes fixes to doing partial forced re-apply (with redo) and improvements on handing bundled patches when using the before-mentioned command.
Minor fixes to validation command
The command was not usable in non-root package context when the package owned bundle patches
Validation function
Introduces new function that allows developers to double-check that they did not forget to add any of the patch target information in JSON files after including a certain path to the patch owner package. Also includes several new aliases for embedded targeting info and better sub-command support for 'patch' command that used to have way too much responsibility.
Patches with embedded target info
Major step towards getting rid of forcing user to declare information twice.
Allow users to provide a root folder for where their patches live and resolve the targets from the data that is provided within the patch itself (special tags in the patch header).
custom dependencies
Feature
- allow multiple 'patches-depend' declarations for different kind of patches (bundle VS normal patch)
- allow wildcards to be used in target names when defining multiple patches-depends items
neatness
Feature
- allow multiple patch-base's to be defined based on vendor or full package name
- new definition format that consists of description/filename and version restriction
- allow label to be used as file-name (defined in base-path pattern as {{label}} or {{label-value}})
- allow items without mutations (like {{label}}) to have strip-rules defined against them
- don't display label when file name is directly part of the label
Fix
- array-based values ended up being treated as version constraints (issue with label-version exploder)
- label-version definition exploder not handling a list of multiple versions correctly
- bad data type returned when base-path pattern defined and certain parts of the name did not match with any value-strip rule
- skip flag not correctly moved to the end of the path when using patches-base configuration
- don't append the base-path pattern with custom extras and expect users to take charge of making sure that the file name is part of the path
- trim whitespace, slash, colon when patch source starts with space
3.24.1
debug code removed