for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php declare(strict_types=1);
namespace Shopware\Storefront\Theme;
use Shopware\Core\Framework\Plugin\Exception\DecorationPatternException;
/**
* @package storefront
*
* ThemePathBuilder that does not support seeding,
* this should only be used in projects where recompiling the theme at runtime is not supported (e.g. PaaS) or for testing.
*/
class MD5ThemePathBuilder extends AbstractThemePathBuilder
{
public function assemblePath(string $salesChannelId, string $themeId): string
return md5($themeId . $salesChannelId);
}
public function generateNewPath(string $salesChannelId, string $themeId, string $seed): string
return $this->assemblePath($salesChannelId, $themeId);
public function saveSeed(string $salesChannelId, string $themeId, string $seed): void
// do nothing, as this implementation does not support seeding
public function getDecorated(): AbstractThemePathBuilder
throw new DecorationPatternException(self::class);