3.7 KiB
UPGRADE FROM v1.7.4 TO v1.7.5
We've brought back the attribute types templates to SyliusAttributeBundle after BC break in v1.7.0.
UPGRADE FROM v1.6.X TO v1.7.0
-
Require upgraded Sylius version using Composer:
composer require sylius/sylius:~1.7.0 --update-with-dependenciesYou might need to adjust your
config.platform.phpsetting incomposer.json, because Sylius 1.7 requires PHP 7.3 or higher. -
Update your
package.jsonin order to add new dependencies:{ "dependencies": { + "chart.js": "^2.9.3", + "slick-carousel": "^1.8.1", }, "devDependencies": { + "@symfony/webpack-encore": "^0.28.0", + "sass-loader": "^7.0.1", } ... }Run
yarn install && yarn buildto use them. -
Remove not needed bundles from your list of used bundles in
config/bundles.phpif you are not using it apart from Sylius:- Sonata\CoreBundle\SonataCoreBundle::class => ['all' => true], - Sonata\IntlBundle\SonataIntlBundle::class => ['all' => true], - Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['all' => true],You should remove
config/packages/sonata_core.yamlas well. -
Remove
config/packages/twig_extensions.yamlfile if you are not using thetwig/extensionspackage in your application. -
Add the following snippet to
config/packages/twig.yamlto enableTwig\Extra\Intl\IntlExtension:services: _defaults: public: false autowire: true autoconfigure: true Twig\Extra\Intl\IntlExtension: ~ -
Copy migration files into
src/Migrations:Run
bin/console doctrine:migrations:migrateto use them. -
Clear cache by
bin/console cache:clear.
Template events
Sylius\Bundle\UiBundle\Block\BlockEventListenerhas been deprecated, usesylius_uiconfiguration instead.
Breaking changes
Those are excluded from our BC promise:
Sylius\Bundle\ShopBundle\EventListener\UserMailerListenerhas been removed and replaced withSylius\Bundle\CoreBundle\EventListener\MailerListener
Templates moved
We've moved the following templates:
@SyliusAttribute/Types/*.html.twig
You should search forSyliusAttribute/TypesandSyliusAttributeBundle:Typesin your templates and make the changes accordingly:- in the Admin area:
@SyliusAdmin/Product/Show/Types/*.html.twig - in the Shop area:
@SyliusShop/Product/Show/Types/*.html.twig
- in the Admin area:
Billing and shipping addresses have been switched with one another
Until now shipping address used to be the default address of an Order. We have changed that, so now the billing address became the default address during checkout. It is an important change in our checkout process, please have that in mind.
⚠️ This change also implies that the Tax calculation is now done on the billing address and not on the shipping address anymore.
Postgres support
In case when you are using Postgres in your project, function DATE_FORMAT should be overridden.
Adjust configuration in config/packages/doctrine.yaml to change DATE_FORMAT implementation:
doctrine:
orm:
entity_managers:
default:
dql:
string_functions:
DATE_FORMAT: App\Doctrine\DQL\DateFormat # OR any other path to your implementation