This guide contains instructions to upgrade from version v7.0.0-alpha2 to v7.0.0-alpha3.
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.
- classes in src/Components were revised, refactored and some of them were moved to model, for upgrading to newer version, you must go through commits done in #272 and reflect the changes of namespaces.
- FriendlyUrlToGenerateRepository: deleted. If you want to define your own data for friendly url generation, do it so by
implementing the FriendlyUrlDataProviderInterface and tag your service with
shopsys.friendly_url_provider
. - check changes in src/Model, all editData.php were merged into its Data.php relatives
- Twig has been updated to version 2.4.8
- access multi-domain attributes of entities via their main entity (instead of the usual entity detail)
- entity domains (eg.
BrandDomain
) should be created, edited and directly accessed only in their main entities (eg.Brand
) - see #165 Different approach to multidomain entities for details
- entity domains (eg.
DomainsType
now uses array of booleans indexed by domain IDs instead of array of domain IDs, original behavior can be restored by adding model data transformerIndexedBooleansToArrayOfIndexesTransformer
CategoryDomain::$hidden
was changed toCategoryDomain::$enabled
along with related methods (with negated value)PaymentDomain
andTransportDomain
are now created even for domains on which the entity should not be visible, check your custom queries that work with payments or transports- instead of using
EntityManagerFacade::clear()
callclear()
directly on theEntityManager
- all *Detail classes were removed:
- use
CategoryWithLazyLoadedVisibleChildren
instead ofLazyLoadedCategoryDetail
- use
CategoryWithLazyLoadedVisibleChildrenFactory::createCategoriesWithLazyLoadedVisibleChildren()
instead ofCategoryDetailFactory::createLazyLoadedDetails()
- use
CategoryFacade::getCategoriesWithLazyLoadedVisibleChildrenForParent()
instead ofCategoryFacade::getVisibleLazyLoadedCategoryDetailsForParent()
- use
CategoryWithPreloadedChildren
instead ofCategoryDetail
- use
CategoryWithPreloadedChildrenFactory::createCategoriesWithPreloadedChildren()
instead ofCategoryDetailFactory::createDetailsHierarchy()
- use
CategoryFacade::getVisibleCategoriesWithPreloadedChildrenForDomain()
instead ofCategoryFacade::getVisibleCategoryDetailsForDomain()
- use
PaymentFacade::getIndependentBasePricesIndexedByCurrencyId()
instead ofPaymentDetail::$basePricesByCurrencyId
- use
TransportFacade::getIndependentBasePricesIndexedByCurrencyId()
instead ofTransportDetail::$basePricesByCurrencyId
ProductDetail::hasContentForDetailBox()
is not available anymore (it was useless)- use
ProductCachedAttributesFacade
for accessing product parameter values and selling price - in templates, use Twig function
getProductParameterValues(product)
instead ofproductDetail.parameters
- in templates, use Twig function
getProductSellingPrice(product)
instead ofproductDetail.sellingPrice
- use
- Twig has been updated to version 2.4.8
- create your custom
easy-coding-standard.yml
in your project root with your ruleset (you can use predefined ruleset as shown below) - in order to run all checks, there is new unified way - execute
php vendor/bin/ecs check /path/to/project
- see EasyCodingStandard docs for more information
#easy-coding-standard.yml
imports:
- { resource: '%vendor_dir%/shopsys/coding-standards/easy-coding-standard.yml' }
parameters:
exclude_files:
- '*/ignored_folder/*'
skip:
ObjectCalisthenics\Sniffs\Files\FunctionLengthSniff:
- '*/src/file.php'
- Twig has been updated to version 2.4.8
- Twig has been updated to version 2.4.8
- Twig has been updated to version 2.4.8
- Twig has been updated to version 2.4.8