From 000b66858127788c1efb0ce48cd40879c3e991ec Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 2 Feb 2026 17:59:40 +0100 Subject: [PATCH 1/2] Add enableHighPerformanceStaticDeploy option in Magento2 application template --- src/ApplicationTemplate/Magento2.php | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/ApplicationTemplate/Magento2.php b/src/ApplicationTemplate/Magento2.php index 54f274d..653f541 100644 --- a/src/ApplicationTemplate/Magento2.php +++ b/src/ApplicationTemplate/Magento2.php @@ -80,4 +80,26 @@ public function setMagentoBackendThemes(array $themes): void $this->setVariable('magento_themes_backend', $themes); $this->setVariable('split_static_deployment', true); } + + /** + * Enable high-performance static content deployment using elgentos/magento2-static-deploy. + * + * This uses a Go-based static content deployer that is 230-380x faster than the native + * Magento setup:static-content:deploy command. It automatically handles both Hyvä themes + * (using fast Go deployment) and Luma themes (dispatching to bin/magento). + * + * Requirements: + * - Themes must be set using setMagentoThemes() with locale mapping (e.g., ['Vendor/theme' => 'nl_NL en_US']) + * + * @param bool $enabled Whether to enable high-performance static deployment (default: true) + * @param string $version Version of magento2-static-deploy to use (default: 'latest') + * @see https://github.com/elgentos/magento2-static-deploy + */ + public function enableHighPerformanceStaticDeploy(bool $enabled = true, string $version = 'latest'): self + { + $this->setVariable('high_performance_static_deploy', $enabled); + $this->setVariable('high_performance_static_deploy_version', $version); + + return $this; + } } From 7929f96153706da2da02024b41be353a1a276437 Mon Sep 17 00:00:00 2001 From: Jonathan Visser Date: Mon, 9 Mar 2026 15:11:22 +0100 Subject: [PATCH 2/2] Remove custom version parameter from enableHighPerformanceStaticDeploy --- src/ApplicationTemplate/Magento2.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ApplicationTemplate/Magento2.php b/src/ApplicationTemplate/Magento2.php index 653f541..4e59424 100644 --- a/src/ApplicationTemplate/Magento2.php +++ b/src/ApplicationTemplate/Magento2.php @@ -92,13 +92,11 @@ public function setMagentoBackendThemes(array $themes): void * - Themes must be set using setMagentoThemes() with locale mapping (e.g., ['Vendor/theme' => 'nl_NL en_US']) * * @param bool $enabled Whether to enable high-performance static deployment (default: true) - * @param string $version Version of magento2-static-deploy to use (default: 'latest') * @see https://github.com/elgentos/magento2-static-deploy */ - public function enableHighPerformanceStaticDeploy(bool $enabled = true, string $version = 'latest'): self + public function enableHighPerformanceStaticDeploy(bool $enabled = true): self { $this->setVariable('high_performance_static_deploy', $enabled); - $this->setVariable('high_performance_static_deploy_version', $version); return $this; }