Skip to content

Latest commit

 

History

History
44 lines (36 loc) · 1.92 KB

File metadata and controls

44 lines (36 loc) · 1.92 KB

UPGRADE FROM 3.3.0 TO 4.0.0

  1. replace requirement in composer.json:

    • from
      "threebrs/sylius-zasilkovna-plugin": "^3.3"
    • to
      "threebrs/sylius-packeta-plugin": "^4.0"
  2. replace every occurence of SyliusZasilkovnaPlugin to SyliusPacketaPlugin

    • for example
      imports:
          - { resource: "@ThreeBRSSyliusPacketaPlugin/Resources/config/config.{yml,yaml}" }
  3. replace ThreeBRS\SyliusZasilkovnaPlugin\ThreeBRSSyliusZasilkovnaPlugin::class to ThreeBRS\SyliusPacketaPlugin\ThreeBRSSyliusPacketaPlugin::class in config/bundles.php

  4. replace class names in your code:

  • ThreeBRS\SyliusZasilkovnaPlugin\Model\ZasilkovnaShipmentInterface to ThreeBRS\SyliusZasilkovnaPlugin\Model\ZasilkovnaShipmentTrait
  • ThreeBRS\SyliusPacketaPlugin\Model\PacketaShipmentInterface to ThreeBRS\SyliusPacketaPlugin\Model\PacketaShipmentTrait
  • ThreeBRS\SyliusZasilkovnaPlugin\Model\ZasilkovnaShippingMethodInterface to ThreeBRS\SyliusZasilkovnaPlugin\Model\ZasilkovnaShippingMethodTrait
  • ThreeBRS\SyliusPacketaPlugin\Model\PacketaShippingMethodInterface to ThreeBRS\SyliusPacketaPlugin\Model\PacketaShippingMethodTrait
  1. create SQL migration to rename related table and columns

MySQL

-- MySQL
RENAME TABLE threebrs_zasilkovna_config TO threebrs_packeta_config;
-- PostgreSQL
-- ALTER TABLE threebrs_zasilkovna_config RENAME TO threebrs_packeta_config;

ALTER TABLE sylius_shipment RENAME COLUMN zasilkovna TO packeta;
ALTER TABLE sylius_shipping_method RENAME COLUMN zasilkovna_config TO packeta_config;
  • hint: you can also configure your entities to keep using legacy table name and column names

Note: the @ThreeBRSSyliusZasilkovnaPlugin/Admin/Common/Order/_addresses.html.twig has been removed. All GUI changes are made by Sylius Twig hooks, see twig_hooks.yaml