Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Shopware 6.5 - The Dev perspective

Shopware 6.5 - The Dev perspective

A Wrap-Up of the most important changes that were introduced with Shopware 6.5 from a developer perspective.

Jonas Elfering

April 21, 2023
Tweet

More Decks by Jonas Elfering

Other Decks in Programming

Transcript

  1. Shopware 6.5 - The Dev perspective @j_elfering About me •

    Jonas Elfering @keulinho @j_elfering @jonas-elfering • Principal Engineer @ Shopware • Working for ~6 years at Shopware
  2. Shopware 6.5 - The Dev perspective @j_elfering Why are Major

    versions so special? • Major versions planned to be released roughly once a year • Upgrade of all packages and increasing (system) requirements • Removing deprecations • Introducing breaks
  3. @shyim97 You said every year… Other topics prevented us from

    focusing on it: • App Scripts • Performance fixes • Admin Extension SDK Shopware 6.5 - What’s new?
  4. Shopware 6.5 - The Dev perspective @j_elfering How do we

    plan it? • First time on GitHub: shopware/proposal
  5. Shopware 6.5 - The Dev perspective @j_elfering How do we

    plan it? • Shopware had to create issues for their topics • Shopware made it public to all, externals had time to do the same • Anyone was able to vote on issues • Shopware created the board based on votes
  6. Shopware 6.5 - The Dev perspective @j_elfering Where are we

    now? The Timeline so far • Development started on trunk: 21. Nov 2022 • RC1 released: 20. Feb 2023 • RC2 released: 20. Mar 2023 • RC3 released: 24. Mar 2023 • RC4 released: 11. Apr 2023 • Cloud deployment: SoonTM (Done by end of Apr 2023) • Final Release: SoonTM (End of Apr 2023)
  7. Shopware 6.5 - The Dev perspective @j_elfering PHP Dependency Upgrades

    • minimum PHP version: 7.4 -> 8.1 • Symfony: 5.4 -> 6.2 • DBAL: 2.x -> 3.x • Flysystem: 1.x -> 3.x
  8. Shopware 6.5 - The Dev perspective @j_elfering • More Hoster

    friendly due to licensing (AWS, Platform.sh) • Switch to Opensearch SDK, Opensearch DSL • Elasticsearch 7/8 does still work Elasticsearch to Opensearch
  9. Shopware 6.5 - The Dev perspective @j_elfering Symfony Flex by

    default • Allows us to update config files directly with Composer • No more rebasing against our template in your projects • Switched to Symfony Runtime • Decouples the HTTP to Kernel to be able to exchange it (FrankenPHP) • Recipes can be found at GitHub shopware/recipes • Abandoned shopware/development template
  10. Shopware 6.5 - The Dev perspective @j_elfering Symfony Flex by

    default slimmed down shopware/production template
  11. Shopware 6.5 - The Dev perspective @j_elfering Refactor Symfony Messenger

    integration Removal of Enqueue • We are using it since it was marked as experimental • Before: • Custom failure handling / rescheduling • Used enqueue as default transport • Now: • Removed custom code, back to symfony defaults
  12. Shopware 6.5 - The Dev perspective @j_elfering Simplified config •

    MESSENGER_TRANSPORT_DSN=redis:// • MESSENGER_TRANSPORT_DSN=amqp:// • MESSENGER_TRANSPORT_DSN=…. Refactor Symfony Messenger integration
  13. Shopware 6.5 - The Dev perspective @j_elfering • No more

    vendor packing • Automatic composer install on plugin installation • No PHP Class collision anymore Improved Composer support for plugins
  14. Shopware 6.5 - The Dev perspective @j_elfering Change of environment

    variables • Unify names to Symfony defaults • MAILER_URL -> MAILER_DSN • SHOPWARE_ES_HOSTS -> OPENSEARCH_URL • Make sure to adjust your setups!
  15. Shopware 6.5 - The Dev perspective @j_elfering Partial Data Loading

    Includes vs Fields • Includes: • Fetches all data as regular • Hydrates all fields • Serializes only required fields -> Output filter • Fields: • Fetches only required fields • Hydrates only required fields • Serializes only required fields -> Complete stack uses it
  16. Shopware 6.5 - The Dev perspective @j_elfering Partial Data Loading

    Downsides • No types in PHP • New Entity class: PartialEntity • New Events: <entity>.partial_loaded
  17. Shopware 6.5 - The Dev perspective @j_elfering New Updater Old

    Updater • Slim Framework 3 • Similar to Shopware 5 • Zip unpacking on Webspace
  18. Shopware 6.5 - The Dev perspective @j_elfering New Updater •

    Uses Composer and Symfony Flex • One unified way to get Shopware • Separate .phar application, that setups & updates your shop • Thanks to Contao for inspiration • Github is now the source of truth
  19. Shopware 6.5 - The Dev perspective @j_elfering Releases directly on

    GitHub • Changelog only in English • Changelog also on GitHub • No traditional Install/Update zips anymore
  20. Shopware 6.5 - The Dev perspective @j_elfering Lazy Loading &

    Async components • Components can be registered async • Code Splitting active by default for async components • Only required files are loaded • Check your E2E assertions
  21. Shopware 6.5 - The Dev perspective @j_elfering • Generated entity

    schema • Can be generated in your project • Available at NPM: @shopware-ag/entity-schema-types Entity Typescript Definitions
  22. Shopware 6.5 - The Dev perspective @j_elfering Bootstrap 5 •

    No IE11 anymore • Removing jQuery • Webpack 5 Upgrade
  23. Shopware 6.5 - The Dev perspective @j_elfering CSRF Protection removal

    • Easier to develop storefront features • Easier Varnish / Fastly configuration • Rely on Browser Standard SameSite cookies
  24. Shopware 6.5 - The Dev perspective @j_elfering Storefront Store-API-Proxy removal

    • The `_proxy/store-api` route was removed • It was a constant security threat • Promoted bad programming practices • Best practice: Create a custom storefront controller that uses the store-api internally • Use `/checkout/cart.json` route to get the current cart as json as of RC4
  25. Shopware 6.5 - The Dev perspective @j_elfering How can I

    prepare my shop? • Use Symfony flex template • Adapts the new environment variables already • Use different queue than MySQL • Remove all existing deprecations, that are thrown in your plugins
  26. Shopware 6.5 - The Dev perspective @j_elfering Test the RC

    / Webupdater • Report problems using • https://issues.shopware.com • Shopware Slack #rc-6-5-feedback
  27. Shopware 6.5 - The Dev perspective @j_elfering Improve Rector rules

    • Rector rules for Shopware 6.5 -> FriendsOfShopware/shopware-rector • Still in work, feel free to contribute