The endpoint now selects the document file type based on the Accept header.
When no Accept header is set or with */*, PDF will be returned. (PR #12944)
Shopware is now fully compatible with PHP 8.5.
The sw-states and sw-currency handling is deprecated, which means by default the HTTP-Cache will also be active for logged in customers or when the cart is filled in the next major version.
You can opt in to the new behaviour by activating either the v6.8.0.0 (all upcoming breaking changes), PERFORMANCE_TWEAKS (all performance related breaks) or CACHE_REWORK (only the HTTP-Cache related breaks) feature flag.
Due to the rework of the contained rules in the cache hash, this becomes efficiently possible. The complete caching behaviour is now controlled by the sw-cache-hash cookie.
You should rework you extensions to also work with enabled cache for logged in customers and when the cart is filled. To modify the default behaviour there are several extension points you can hook into, for a detailed explanation please take a look at the caching docs.
The following classes and constants were deprecated as they will not be used anymore:
\Shopware\Core\Framework\Adapter\Cache\Http\CacheStateValidator\Shopware\Core\Framework\Adapter\Cache\CacheStateSubscriber\Shopware\Core\Framework\Adapter\Cache\Http\HttpCacheKeyGenerator::SYSTEM_STATE_COOKIE\Shopware\Core\Framework\Adapter\Cache\Http\HttpCacheKeyGenerator::INVALIDATION_STATES_HEADER\Shopware\Core\Framework\Adapter\Cache\Http\HttpCacheKeyGenerator::CURRENCY_COOKIE\Shopware\Core\Framework\Adapter\Cache\CacheStateSubscriber::STATE_LOGGED_IN\Shopware\Core\Framework\Adapter\Cache\CacheStateSubscriber::STATE_CART_FILLED
Additionally, the following configuration was deprecated:
shopware.cache.invalidation.http_cache
A new method assignRecursive has been added to Shopware\Core\Framework\Struct\AssignArrayTrait. Along with it, the new Shopware\Core\Framework\Struct\AssignArrayInterface has been introduced.
To make full use of assignRecursive, every class using AssignArrayTrait must also implement the new AssignArrayInterface.
The assignRecursive method enables deeply nested, JSON-serialized data structures - for example, a fully serialized ProductEntity including associations such as properties - to be converted back into a fully populated ProductEntity instance, including all nested Struct and Collection objects.
Note: assignRecursive uses reflection and creates nested struct instances, so it is noticeably slower than the classic shallow assign and is intended for import/export and (re-)hydration scenarios rather than tight, performance-critical loops.
We don't synchronously fetch and generate the SEO-Urls for all child categories anymore. Instead, we rely on the CategoryIndexer to trigger the re-index of children asynchronously. This prevents cases where SEO-Urls were generated multiple times for the same category, and thus it considerably improves the performance of category indexing.
The domain part of email addresses may now contain internationalized domain names (IDN). The Storefront validation will properly check these domains. The form validation in PHP may still deny IDN emails addresses, but the default Shopware forms already allow them.
A new config option shopware.staging.extensions.disable was added to allow configuring extensions that should be automatically disabled when the staging mode gets activated via system:setup:staging command.
shopware:
staging:
extensions:
disable: ["TheExtensionName", "AnotherExtensionName"]The tax-free detection logic if the cart changed to handle B2B and B2C customers separately. Previously, enabling "Tax-free for B2C" in the country settings also affected B2B customers. Now, tax rules are applied correctly based on the customer type.
The rendering of the robots.txt file has been changed to support custom User-agent blocks and the full robots.txt standard.
For a detailed guide on how to use the new features and extend the functionality, please refer to our documentation guide Extend robots.txt configuration.
A new scheduled task media.cleanup_corrupted_media has been introduced.
It detects and removes corrupted media records, such as entries created by interrupted or failed file uploads that have no corresponding file on the filesystem.
When you want to specify which indexer should run, you can add the EntityIndexerRegistry::EXTENSION_INDEXER_ONLY extension to the context as follows:
$context->addExtension(EntityIndexerRegistry::EXTENSION_INDEXER_ONLY,
new ArrayEntity([
ProductIndexer::STOCK_UPDATER // Only execute STOCK_UPDATER.
]),
);When making a call to the Sync API, specify the required indexer in the header:
curl -X POST "http://localhost:8000/api/_action/sync" \
-H "indexing-only: product.stock" \
#...The IndexerQueuer now runs automatically during plugin install, update and uninstall events.
This ensures that registered indexers are executed when plugin migrations have run.
The OpenAPI schema generator for Store API endpoints now includes descriptions for entity fields, making it easier for developers to understand the available fields and their purposes.
Additionally, available associations for each entity are now automatically listed in the OpenAPI operation descriptions, showing developers which relationships can be loaded.
To add descriptions to fields in your custom entity definitions, use the setDescription() method:
(new ManyToOneAssociationField('group', 'customer_group_id',
CustomerGroupDefinition::class, 'id', false))
->addFlags(new ApiAware())
->setDescription('Customer group determining pricing and permissions')It's now possible to overwrite the wrapperClass of the Doctrine\DBAL\Connection instance.
This is useful if you want to use e.g. Doctrine MySQL Comeback to automatically reconnect if the MySQL connection is lost.
composer require facile-it/doctrine-mysql-come-back ^3.0Then specify the wrapperClass in the .env file:
DATABASE_URL=mysql://root:root@database/shopware?driverOptions[x_reconnect_attempts]=5&wrapperClass=Facile\DoctrineMySQLComeBack\Doctrine\DBAL\ConnectionA new Shopware\Storefront\Page\Robots\Parser\RobotsDirectiveParser has been introduced to parse robots.txt files. This new service provides improved error tracking and adds new events for better extensibility.
As part of this change, the constructor for Shopware\Storefront\Page\Robots\Struct\DomainRuleStruct is now deprecated for string parameters. You should use the new parser to create a ParsedRobots object to pass to the constructor instead.
Added new Shopware\Core\Framework\JWT\SalesChannel\JWTGenerator and Shopware\Core\Framework\JWT\Struct\JWTStruct to build general structure for encoding and decoding JWT.
The new dependency symfony/polyfill-php85 was added, to make it possible to already use PHP 8.5 features, like array_first and array_last
As we changed how we process and generate changelogs the "old" changelog files are no longer needed.
Therefore, we removed all the internal code used to generate and validate them.
The whole Shopware\Core\Framework\Changelog namespace was removed.
The code is not needed anymore, you should adjust the RELEASE_INFO and UPGRADE files manually instead.
Refection has significantly improved in particular since PHP 8.1, therefore the Shopware\Core\Framework\Test\TestCaseHelper\ReflectionHelper was deprecated and will be removed in the next major release.
See below for the explicit replacements:
- $property = ReflectionHelper->getProperty(MyClass::class, 'myProperty');
+ $property = \ReflectionProperty(MyClass::class, 'myProperty');- $method = ReflectionHelper->getMethod(MyClass::class, 'myMethod');
+ $method = \ReflectionMethod(MyClass::class, 'myMethod');- $propertyValue = ReflectionHelper->getPropertyValue($object, 'myProperty');
+ $propertyValue = \ReflectionProperty(MyClass::class, 'myProperty')->getValue($object);- $fileName = ReflectionHelper->getFileName(MyClass::class);
+ $fileName = \ReflectionClass(MyClass::class)->getFileName();The new constraint \Shopware\Core\Framework\Routing\Validation\Constraint\RouteNotBlocked checks if a route is available or already taken by another part of the application.
With the feature flag REPEATED_PAYMENT_FINALIZE, the /payment-finalize endpoint can now be called multiple times using the same payment token.
This behaviour will be the default in the next major release.
If the token has already been consumed, the user will be redirected directly to the finish page instead of triggering a PaymentException.
To support this behavior, a new consumed flag has been added to the payment token struct, which indicates if the token has already been processed.
Payment tokens are no longer deleted immediately after use. A new scheduled task automatically removes expired tokens to keep the payment_token table clean.
Added sanitized HTML tag support for app snippets. App developers can now use HTML tags for better formatting within their snippets. The sanitizing uses the basic set of allowed HTML tags from the html_sanitizer config, ensuring that security-related tags such as script are automatically removed.
The behaviour creating associations with custom entities in apps changed. Now an exception will be thrown if the referenced table does not exist, instead of creating a reference to the non-existing table.
To allow the schema updater to skip creating associations if the referenced table does not exist, improving flexibility and robustness during schema updates, a new optional attribute ignore-missing-reference was added to association types (one-to-one, one-to-many, many-to-one, many-to-many).
Example usage:
<one-to-many name="custom_entity" reference="quote_comment" ignore-missing-reference="true" store-api-aware="false" on-delete="set-null" />The link property of the product manufacturer entity is now translatable.
When creating a SEO URL for a product or category, the URL is now checked for availability. Before it was possible to override existing URLs like account or maintenance with SEO URLs. Existing URLs are now blocked to be used as SEO URLs.
We now use the <mt-select> instead administration/src/module/sw-newsletter-recipient/component/sw-newsletter-recipient-filter-switch.
Because of that, we deprecate these twig blocks:
sw_newsletter_recipient_list_sidebar_filter_status_not_setsw_newsletter_recipient_list_sidebar_filter_status_directsw_newsletter_recipient_list_sidebar_filter_status_opt_insw_newsletter_recipient_list_sidebar_filter_status_opt_out
These blocks will be removed in v6.8.0.0 without replacement. Use the parent blocks instead.
We also deprecate
administration/src/module/sw-newsletter-recipient/component/sw-newsletter-recipient-filter-switch which will be removed with v6.8.0.0 and
administration/src/module/sw-newsletter-recipient/page/sw-newsletter-recipient-list/index.js which will be private in v6.8.0.0.
New extensible Twig blocks layout_header_actions_language_widget_content_inner and layout_header_actions_languages_widget_form_items_flag_inner have been added to the language selector to allow custom flag implementations.
The context.token variable is no longer available in twig rendering context to prevent potential security vulnerabilities. If you need to access the token, consider using alternative methods that do not expose it in the rendered HTML.
Usually inside the Twig storefront there is no need to handle the context token manually, as it is handled automatically via the session handling in the Storefront.
The page_checkout_cart_add_product* blocks inside @Storefront/storefront/page/checkout/cart/index.html.twig are deprecated and a new template @Storefront/storefront/component/checkout/add-product-by-number.html.twig was added.
Instead of overwriting any of the page_checkout_cart_add_product* blocks inside @Storefront/storefront/page/checkout/cart/index.html.twig,
extend the new @Storefront/storefront/component/checkout/add-product-by-number.html.twig file using the same blocks.
Change:
{% sw_extends '@Storefront/storefront/page/checkout/_page.html.twig' %}
{% block page_checkout_cart_add_product %}
{# Your content #}
{% endblock %}to:
{% sw_extends '@Storefront/storefront/component/checkout/add-product-by-number.html.twig' %}
{% block page_checkout_cart_add_product %}
{# Your content #}
{% endblock %}A new sales-channel:replace:url command was added to replace the url of a sales channel.
bin/console sales-channel:replace:url <previous_url> <new_url>The CACHE_CONTEXT_HASH_RULES_OPTIMIZATION feature flag was renamed to CACHE_REWORK to better reflect its purpose, as more changes will be toggled by that flag, to enable the new cache behaviour.
To enable the new cache behaviour, set the CACHE_REWORK feature flag to 1 in your .env file:
Before:
CACHE_CONTEXT_HASH_RULES_OPTIMIZATION=1Now:
CACHE_REWORK=1To not break plugins that might check for the old flag unnecessarily, the old flag will be kept until the next major release, however, the flag has no effect anymore.
The disabled delivery check in MailSender now checks for the Staging Mode core.staging, the shopware.staging.mailing.disable_delivery configuration and the config setting shopware.mailing.disable_delivery.
Regardless of mode the config setting shopware.mailing.disable_delivery always allows disabling mail delivery.
The database column product.weight now uses DECIMAL(15,6) instead of DECIMAL(10,3) to keep gram-based measurements accurate when values are stored in kilograms.
The default values for plugin config fields are now parsed according to the type of the field.
This means default values for checkbox and bool fields are parsed as boolean values, int fields are parsed as integer values, and float fields are parsed as float values.
Everything else is parsed as string values. With this the default values are now consistent based on the type of the field and the type does not depend on the actual value.
This makes it more consistent as otherwise the types could change when they are configured in the Administration.
The exceptions
\Shopware\Core\System\SystemConfig\Exception\InvalidDomainException\Shopware\Core\System\SystemConfig\Exception\InvalidKeyException\Shopware\Core\System\SystemConfig\Exception\InvalidSettingValueException
are now deprecated and will be removed in v6.8.0.0.
Use the respective factory methods in \Shopware\Core\System\SystemConfig\SystemConfigException instead.
The methods \Shopware\Core\System\SystemConfig\SystemConfigService::trace() and \Shopware\Core\System\SystemConfig\SystemConfigService::getTrace() are deprecated and will be removed.
The tracing is not needed anymore since the cache rework for 6.7.0.0.
For now the methods are still available, but they do nothing.
If a price definition should be filterable, explicitly implement the Shopware\Core\Checkout\Cart\Price\Struct\FilterableInterface, which defines the required getFilter() method.
With this change, Vimeo and YouTube videos now use separate cookie consent entries and load immediately when cookies are accepted, improving user experience and GDPR compliance.
Links to open the cookie offcanvas that are loaded dynamically (e.g., within the navigation offcanvas) now work correctly.
The CookieConfiguration plugin now uses event delegation instead of direct event listeners.
If you have extended the CookieConfiguration plugin and override _registerEvents(), you may need to update your
implementation to use event delegation as well.
American English can now be downloaded in the installer and can become the default shop language like any other language in Shopware.
No plugin is needed anymore to install languages available from the Shopware translation platform. The entire plugin has been built into the core. Simply fetch and activate the language of your choice via the new bin/console commands. Later, this feature will become available in the administration.
However, for any other language pack not available from the Shopware translation platform, you will still need a plugin.
You can fetch Shopware translations from the Shopware translation platform, which are stored on Github. You can even help provide translations and use them in your shop a short time later!
Please note: As these are community-provided translations, we cannot guarantee that everything is translated 100% correctly.
Good news: The Language Pack plugin will continue to be maintained under our usual release policy.
Please see the ADR for more details.
Working with language codes in Shopware, such as en-GB (a combination of language and country), generally works well. However, this approach can be quite maintenance-heavy: using multiple dialects, for example, British and American English, always leads to duplicated language snippets and can quickly become frustrating for translators.
To address this, we introduced an additional translation layer that reduces dialects to patch files, limiting duplication to only a small portion of the snippets.
Read the full story in this ADR. You can also find a detailed concept document for further reference.
See the type of blocks directly when working with it as an editor. This is especially useful if using third party plugins. Thanks to @amenk!
Slider viewers are now rendered in respect to their visibility modus. This gives us a bit of more performance. Thanks to @ffrank913 😉
Thanks to this pull request, queries on product.categories shall run ways faster than before: See shopware#12657 by @vienthuong
Checkout & Promotions: More reliable shipping price matrix, credit notes, and promotion discount calculations
shopware#12560 by @untilu29 actually fixes Shipping method cannot be applied to products below 1 EUR due to “Cart price from” default by @cramytech.
shopware#12589 by @ennasus4sun fixes Credit notes are created cumulatively by @swagTKA.
shopware#12603 by @socrec fixes Fixed Price delivery promotions cannot be excluded by janobi
shopware#12682 by ffrank913 fixes Incorrect model focus in SW6 standard CMS by himself
shopware#12654 by ffrank913 fixes Incorrect frontend display of 3D glb files in SW6 standard CMS by MaximilianFo
- Framework & API: Store-API cookie groups, new route exception handling, cleaner query parsing
- Platform ops / DX: Environment variable improvements, cache directory configurability, profiler disabled by default in production
- Build tooling: Admin build target updated to ES2023 (plugin authors should check compatibility)
- Deprecations / Breaking changes:
- Removal of
controllerNameandcontrollerActionvariables in templates - Deprecation of
Shopware\Core\System\SalesChannel\SalesChannel\SalesChannelContextSwitcher
- Removal of
- Upgrade notes: DB migration for the new category index, admin build target upgrade, profiler defaults