Skip to content

Latest commit

 

History

History
98 lines (88 loc) · 7.72 KB

UPGRADE-v7.0.0.md

File metadata and controls

98 lines (88 loc) · 7.72 KB

This guide contains instructions to upgrade from version v7.0.0-beta6 to v7.0.0.

Before you start, don't forget to take a look at general instructions about upgrading. There you can find links to upgrade notes for other versions too.

Note: instructions marked as "low priority" are not vital, however, we recommend to perform them as well during upgrading as it might ease your work in the future.

Tools

  • (low priority) add product-search-export-products as a dependency of build-demo phing target in your build.xml if you want to have products data exported to Elasticsearch after build-demo target is run (#824)

Application

  • naming of promo code and discount code was unified (#844)
    • rename occurrences of discount code into promo code based on the changes from pull request in following files
      • src/Shopsys/ShopBundle/Controller/Front/PromoCodeController.php
      • src/Shopsys/ShopBundle/Resources/scripts/frontend/promoCode.js
      • src/Shopsys/ShopBundle/Resources/views/Front/Content/Order/PromoCode/index.html.twig
    • dump translations using php phing dump-translations and fill in the translations based on the changes from pull request
  • check whether you extended class or method ImageFacade::copyImages or used it in your project and make sure it works like you intended (#851)
    • (low priority) remove /var/www/html/var/cache folder from your @main_filesystem filesystem storage if exists, set as local filesystem storage in path %kernel.project_dir% by default
  • use Money class for representing monetary values in the whole application (#821)
  • you need to provide $temporaryFilenames parameter anywhere you use ImageFactoryInterface::create() and ImageFacade::uploadImage() functions (#869)
    • the parameter is not nullable now
  • if you're using protected method ImageProcessor::removeFileIfRenamed() in your code, remove the usage due to the method was removed and the code was moved to convertToShopFormatAndGetNewFilename() (#869)
  • copy all things related to data fixtures to your project, in particular:
    services:
        _defaults:
            autowire: true
            autoconfigure: true
            public: false
    
        Shopsys\ShopBundle\Command\:
            resource: '../../../Command'
    • import new configuration file in services.yml
        imports:
            - { resource: forms.yml }
    +       - { resource: services/commands.yml }
        imports:
            - { resource: forms.yml }
            - { resource: services/commands.yml }
    +       - { resource: services/data_fixtures.yml }
    • change namespaces of data fixtures from Shopsys\FrameworkBundle\DataFixtures to Shopsys\ShopBundle\DataFixtures (in tests and *.yml configurations)
    • change the value of data fixtures resource folder in app/config/paths.yml
      -    shopsys.data_fixtures.resources_dir: '%shopsys.framework.root_dir%/src/DataFixtures/resources'
      +    shopsys.data_fixtures.resources_dir: '%shopsys.root_dir%/src/Shopsys/ShopBundle/DataFixtures/resources'
    • add skipping of 4 data fixture files to easy-coding-standards.yml
        skip:
            ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff:
    +           - '*/src/Shopsys/ShopBundle/DataFixtures/*/*DataFixture.php'
    +           - '*/src/Shopsys/ShopBundle/DataFixtures/Demo/ProductDataFixtureLoader.php'
    
                //...
    
            ObjectCalisthenics\Sniffs\Files\ClassTraitAndInterfaceLengthSniff:
                - '*/tests/ShopBundle/Functional/Model/Product/ProductVisibilityRepositoryTest.php'
    +           - '*/src/Shopsys/ShopBundle/DataFixtures/Demo/MultidomainOrderDataFixture.phpFixture.php'
    +           - '*/src/Shopsys/ShopBundle/DataFixtures/Demo/OrderDataFixture.php'
    • if you extended some of data fixtures classes, you have to modify the class directly after you copied data fixtures from shopsys/project-base
    • you can follow #854 for inspiration
  • (low priority) if you want to test behavior of cart with no listable product in it, implement functional test as it is in #852
  • (low priority) to implement default image sizes for individual devices width (#836), you have to
    • update src/Shopsys/ShopBundle/Resources/config/images.yml as has been changed in this commit
    • update all image macros in twig template src/Shopsys/ShopBundle/Resources/views/Front/Content/Advert/box.html.twig as shown below
    {{ image(advert, { size: advert.positionName }) }}
    • in order to show changes properly for section noticer in images.yml you need to create banner in administration as Image with link.
    • remove all images in folders (if a folder with images exists) in order to generate new images
      • web/content/images/product/default
      • web/content/images/product/list
      • web/content/images/sliderItem/default