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.
- (low priority) add
product-search-export-products
as a dependency ofbuild-demo
phing target in yourbuild.xml
if you want to have products data exported to Elasticsearch afterbuild-demo
target is run (#824)
- naming of promo code and discount code was unified (#844)
- rename occurrences of
discount code
intopromo code
based on the changes from pull request in following filessrc/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
- rename occurrences of
- 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
- (low priority) remove
- use
Money
class for representing monetary values in the whole application (#821)- we recommend first reading the article How to Work with Money which explains the concept
- you can take a look at what was modified in
shopsys/project-base
during this change (24 files) - you'll find detailed instructions in separate article Upgrade Instructions for Money Class
- you need to provide
$temporaryFilenames
parameter anywhere you useImageFactoryInterface::create()
andImageFacade::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 toconvertToShopFormatAndGetNewFilename()
(#869) - copy all things related to data fixtures to your project, in particular:
- copy
PerformanceDataCommand.php
into project namespaceShopBundle/Command
fromsrc/Shopsys/ShopBundle/Command
of shopsys/project-base repository - add new configuration file to
src/ShopBundle/Resources/config/services/commands.yml
and add Command configuration in it
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 }
- if you used your own data fixtures or you have copied all our data fixtures and changed some of them, you don't need to do next steps
- copy data fixtures into your project namespace
ShopBundle/DataFixtures
fromsrc/Shopsys/ShopBundle/DataFixtures
of shopsys/project-base repository - copy configuration file to
ShopBundle/Resources/config/services/data_fixtures.yml
fromsrc/Shopsys/ShopBundle/Resources/config/services/data_fixtures.yml
of shopsys/project-base repository - import new configuration file in
services.yml
imports: - { resource: forms.yml } - { resource: services/commands.yml } + - { resource: services/data_fixtures.yml }
- change namespaces of data fixtures from
Shopsys\FrameworkBundle\DataFixtures
toShopsys\ShopBundle\DataFixtures
(in tests and *.yml configurations)- check correctness of registered DataFixture services based on the state of services.yml of shopsys/project-base repository
- 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
- copy
- (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
inimages.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
- update