Support for Quality Patches Tool
Would be nice to have support for the Magento Quality Patches Tool.
Meanwhile, can anyone improve on this for me? It works but I've no idea if it is robust or correct...
(As an aside, does anyone know how the tool keeps track of which patches were applied?)
# Magento Quality Patches Tool
SSHKit.config.command_map[:magento_qp] = "/usr/bin/env php -f vendor/bin/magento-patches --"
set :magento_quality_patches, "ACSD-47079"
# Apply quality patches
namespace :local do
namespace :patches do
task :apply do
if fetch(:magento_quality_patches)
desc "Applying quality patches"
on primary fetch(:magento_deploy_setup_role) do
within release_path do
execute :magento_qp, "apply #{fetch(:magento_quality_patches)} -n"
end
end
end
end
end
end
after "magento:composer:install", "local:patches:apply"
@bluec I'm sure by now Claude Code or the like can help answer this question for you. :)
But for what it's worth, we don't use the magento-patches tool but instead get the patches and apply them using the composer-patches tool: https://gist.github.com/erikhansen/1b18980b39464dc94b9f09282a43ea31#apply-patches-using-the-composer-patches-plugin
@erikhansen thanks for this, I've been successfully using my approach above and also have a separate task for applying composer patches. Never thought of manually downloading and applying the magento quality patches so I'll keep this in mind.