shyim
11/19/2019 - 2:46 PM

Shopware 5.7 Update Prepare Guide

Shopware 5.7 Update Prepare Guide

List of compability issues with Shopware 5.7

Updates

  • Symfony 3.4 => Symfony 4.4
  • Guzzle 5 => Guzzle 6.4 (Consider using PSR18 Http Client)
  • Monolog 1 => Monolog 2

Breaking things

Symfony services and parameters are case sensitive now

This can be done also in versions before. Check all service ids and parameters

Symfony services are private by default

With the update you can only use public services. With following code can you override the public default back to true

<services>
<defaults public="true" />

<service id="......

Services inside container has to be objects

It's not allowed to have arrays or strings inside the container anymore

$form->isValid() calling without calling first isSubmitted throws an error

Change

if ($form->isValid()) {

to

if ($form->isSubmitted() && $form->isValid()) {

Don't use deprecated Monolog methods

https://github.com/rectorphp/rector/blob/master/config/set/monolog/monolog20.yaml#L5-L16

Removeals of unused packages

  • egulias/email-validator
  • symfony/translation
  • php-http/curl-client
  • psr/link
  • symfony/polyfill-ctype
  • symfony/polyfill-iconv
  • symfony/polyfill-iconv
  • symfony/polyfill-php56
  • symfony/polyfill-php70
  • symfony/polyfill-php71
  • symfony/polyfill-php72