Home Blog Contact

Shopware v6.6.0.0-rc3: reviewing the diff against v6.5.8.6 and getting familiar with the upcoming technical updates

Feb 26th 2024

Shopware 6.6 GA is almost there! 💪💪💪 It's going to be released by the end of March. So, I'm getting prepared for the project updates from 6.5 to 6.6.

This is a humble blogpost. Please, don't think this is an in-depth feature-by-feature technical review of Shopware 6.6. I had the chance to spend a few hours reviewing the diff and I just want to share my personal journey of comparing releases v6.6.0.0-rc3 against v6.5.8.6. Hopefully the blogpost will give you an initial perspective to what Shopware 6.6 is bringing, technically speaking.

For the code review, I basically cloned the shopware/shopware repository and made comparison between branches v6.6.0.0-rc3 and v6.5.8.6. At first, a lot of binary data was included in the diff file, due to jpeg, png and others. I decided then to filter only by the most used file extensions: php, js, json, ts, twig, xml and yaml. The diff output was around ~22MB, total of ~477,837 lines of code. 🤯

So, let get it started!

PHP 8.2 as minimum requirement

Of course, PHP 8.3 is also supported. 😊

-"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
+"php": "~8.2.0 || ~8.3.0",

Symfony 7

-"symfony/framework-bundle": "~6.4.0",
-"symfony/http-foundation": "~6.4.0",
-"symfony/routing": "~6.4.0",
-"symfony/mime": "~6.4.0"

+"symfony/framework-bundle": "~7.0.0",
+"symfony/http-foundation": "~7.0.0",
+"symfony/routing": "~7.0.0",
+"symfony/mime": "~7.0.0"

Removal of announced deprecations related to 6.5

All the deprecations related to 6.5 were removed. Here are some examples:

-if (!Feature::isActive('v6.6.0.0')) {
-    return new CountryNotFoundException($countryId);
-}
-/**
- * @deprecated tag:v6.6.0 - use ShippingException::shippingMethodNotFound instead
- */
 /**
- * @deprecated tag:v6.6.0 - Will be private
+ * @private
  */

Addition to deprecations to 6.7.0.0

Shopware 6.6.0.0 is not yet released but there are already deprecates to 6.7.0.0 😂. Yes, that's a normal thing in software development... they will keep adding those deprecations warnings, and that's a pretty good thing. Glad that Shopware team let us know in advance their plans to deprecate code.

+Feature::triggerDeprecationOrThrow(
+    'v6.7.0.0',
+    Feature::deprecatedClassMessage(self::class, 'v6.7.0.0', 'use PromotionException::promotionCodeNotFound instead')
+);

From Annotations to PHP 8 Attributes

You will see lots of replaces like that:

-use Symfony\Component\Routing\Annotation\Route;
+use Symfony\Component\Routing\Attribute\Route;
-<import resource="../../Controller/*Controller.php" type="annotation" />
+<import resource="../../Controller/*Controller.php" type="attribute" />
-/**
- * @dataProvider notificationProvider
- */

+#[DataProvider('notificationProvider')]

Annotation from list<...> to array<...>

Also, some updates on the annotations for PHP static analysis tools.

 /**
- * @return list
+ * @return array
  */

Removal of @Event annotation

-/**
- * @Event("Shopware\Core\Framework\DataAbstractionLayer\Event\EntityWrittenEvent")
- */
 final public const ORDER_WRITTEN_EVENT = 'order.written';

-/**
- * @Event("Shopware\Core\Framework\DataAbstractionLayer\Event\EntityDeletedEvent")
- */
 final public const ORDER_DELETED_EVENT = 'order.deleted';

-/**
- * @Event("Shopware\Core\Framework\DataAbstractionLayer\Event\EntityLoadedEvent")
- */
 final public const ORDER_LOADED_EVENT = 'order.loaded';

Change of #[Package('...')]

Some classes had the Package attribute changed.

-#[Package('sales-channel')]
+#[Package('services-settings')]
-#[Package('sales-channel')]
+#[Package('buyers-experience')]

StorefrontResponse was removed

A very popular class has been removed: StorefrontResponse

-/**
- * @deprecated tag:v6.6.0 - Will be removed
- */
-#[Package('storefront')]
-class StorefrontResponse extends Response

Vue.js 3

Vue.js 2 end of life was 2023-12-31

 <sw-password-field
     v-else
-    {% if VUE3 %}
     v-model:value="currentIntegration.secretAccessKey"
-    {% else %}
-    v-model="currentIntegration.secretAccessKey"
-    {% endif %}
     :label="$tc('sw-users-permissions.users.user-detail.modal.secretFieldLabel')"
     :disabled="true"
     :password-toggle-able="false"

JavaScript

An important namespace was renamed:

-@shopware-ag/admin-extension-sdk
+@shopware-ag/meteor-admin-sdk
-import { add } from '@shopware-ag/admin-extension-sdk/es/ui/actionButton';
+import { add } from '@shopware-ag/meteor-admin-sdk/es/ui/actionButton';

node 20 and npm 10 as minimum requirement

The current Node LTS is version 20

-"engines": {
-  "node": "^18.0.0 || ^19.0.0 || ^20.0.0",
-  "npm": "^8.0.0 || ^9.0.0 || ^10.0.0"
-},

+"engines": {
+  "node": "^20.0.0",
+  "npm": "^10.0.0"
+},

MariaDB 10.11 as minimum requirement

The current MariaDB LTS is version 10.11. This version supports the JSON_OVERLAPS function.

Redis 7.0 as minimum requirement

Due to performance improvements and new features Redis was migrated to 7.0.

PHP (composer) and JavaScript dependencies updated

To support PHP 8.2 and node 20, their dependencies were also updated.

all.js is gone! 👋👋👋

As the comment on the code below says: The original JS bundles are used instead of the all.js from ThemeConfigValueAccessor"

Read more: Storefront async JavaScript and all.js removal

 {% block layout_head_javascript_hmr_mode %}
     {% if isHMRMode %}
-        <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-node.js" defer></script>
-        <script type="text/javascript" src="/_webpack_hot_proxy_/js/vendor-shared.js" defer></script>
-        <script type="text/javascript" src="/_webpack_hot_proxy_/js/runtime.js" defer></script>
-        <script type="text/javascript" src="/_webpack_hot_proxy_/js/app.js" defer></script>
-        {# The storefront entry is a combined entry point which contains all plugins & themes #}
-        <script type="text/javascript" src="/_webpack_hot_proxy_/js/storefront.js" defer></script>
+        {% block layout_head_javascript_hmr_dev %}
+            {# Entry point for dev-server CSS #}
+            <script type="text/javascript" src="/_webpack_hot_proxy_/storefront/css.js" defer></script>
+            {% for script in theme_scripts() %}
+                <script type="text/javascript" src="{{ script|replace({'js/': '/_webpack_hot_proxy_/'}) }}" defer></script>
+            {% endfor %}
+        {% endblock %}
     {% else %}
-        {# @deprecated tag:v6.6.0 - The original JS bundles are used instead of the all.js from ThemeConfigValueAccessor #}
-        {% if feature('v6.6.0.0') %}
+        {% block layout_head_javascript_prod %}
             <script>
                 window.themeJsPublicPath = '{{ asset('js/', 'theme') }}';
             </script>
             {% for script in theme_scripts() %}
                 <script type="text/javascript" src="{{ asset(script, 'theme') }}" defer></script>
             {% endfor %}
-        {% else %}
-            {% for file in theme_config('assets.js') %}
-                <script type="text/javascript" src="{{ asset(file, 'theme') }}" defer></script>
-            {% endfor %}
-        {% endif %}
+        {% endblock %}
     {% endif %}
 {% endblock %}

CSS: bootstrap's spacing utility

Read more: Bootstrap - Spacing

-<div class="card-text account-guest-auth-info">
+<div class="card-text account-guest-auth-info mb-3">

Further materials

Final words

Again, this was a very simple blogpost. My idea was to start taking a look into Shopware 6.6. Hope it was worth reading 🙏