This guide contains instructions to upgrade from version v10.0.0 to v11.0.0-dev.
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.
-
check that your code don't use any removed code (#2455)
- Phing property
path.env.test
was removed - function
getCategoriesOrderingData()
from@shopsys/framework/assets/js/admin/components/CategoryTreeSorting.js
was removed, usegetNestedSetData()
instead - method
Shopsys\FrameworkBundle\Controller\Admin\CategoryController::saveOrderAction()
was removed, useapplySortingAction()
instead - method
Shopsys\FrameworkBundle\Model\Category\CategoryFacade::editOrdering()
was removed, usereorderByNestedSetValues()
instead - data transformer
Shopsys\FrameworkBundle\Form\Transformers\ScriptPlacementToBooleanTransformer
was removed as it's not necessary anymore - command
Shopsys\FrameworkBundle\Command\ElFinderPostInstallCommand
was removed, set proper public dir with--docroot
option inelfinder:install
command - class
Shopsys\FrameworkBundle\Component\Csv\CsvReader
was removed, useSplFileObject::fgetcsv()
instead - command
Shopsys\FrameworkBundle\Command\Elasticsearch\ElasticsearchIndexesCreateCommand
was removed, useElasticsearchIndexesMigrateCommand
instead - method
Shopsys\FrameworkBundle\Component\Elasticsearch\IndexDefinition::getLegacyIndexAlias()
was removed - visibility of method
Shopsys\FrameworkBundle\Component\Elasticsearch\IndexFacade::create()
was changed toprotected
- method
Shopsys\FrameworkBundle\Component\Elasticsearch\Exception\ElasticsearchIndexException::indexAlreadyExists()
was removed, useElasticsearchIndexAlreadyExistsException
directly - class
Shopsys\FrameworkBundle\Component\DataFixture\AbstractNativeFixture
was removed - removed constant
Shopsys\FrameworkBundle\Component\Environment\EnvironmentFileSetting\ENVIRONMENTS_CONSOLE
Shopsys\FrameworkBundle\Component\Router\DomainRouterFactory
- property
$configLoader
was removed - property
$container
is no longer nullable - property
$cacheDir
is no longer nullable - method
__construct
changed its interface:public function __construct( $routerConfiguration, - ?LoaderInterface $configLoader, LocalizedRouterFactory $localizedRouterFactory, FriendlyUrlRouterFactory $friendlyUrlRouterFactory, Domain $domain, RequestStack $requestStack, - ?ContainerInterface $container = null, + ContainerInterface $container, - ?string $cacheDir = null + string $cacheDir )
- property
Shopsys\FrameworkBundle\Component\Router\LocalizedRouterFactory
- property
$configLoader
was removed - property
$container
is no longer nullable - property
$cacheDir
is no longer nullable - method
__construct
changed its interface:public function __construct( $localeRoutersResourcesFilepathMask, - ?LoaderInterface $configLoader = null, - ?ContainerInterface $container = null, + ContainerInterface $container, - ?string $cacheDir = null + string $cacheDir )
- property
Shopsys\FrameworkBundle\Model\AdvancedSearch\Filter\ProductCategoryFilter
- property
$domain
was removed - method
__construct
changed its interface:public function __construct( CategoryFacade $categoryFacade, - ?Domain $domain = null, - ?LocalizationAlias $localization = null + Localization $localization )
- property
- class
Shopsys\FrameworkBundle\Model\Breadcrumb\ErrorPageBreadcrumbGenerator
was changed to abstract, don't forget to extend this class and implement following methods:getTranslatedBreadcrumbForNotFoundPage()
getTranslatedBreadcrumbForErrorPage()
- class
Shopsys\FrameworkBundle\Model\Breadcrumb\SimpleBreadcrumbGenerator
was changed to abstract, don't forget to extend this class and implement following methods:getTranslatedBreadcrumbsByRouteNames()
- class
Shopsys\FrameworkBundle\Model\Cart\Watcher\CartWatcherFacade
was changed to abstract, don't forget to extend this class and implement following methods:getMessageForNoLongerAvailableExistingProduct()
getMessageForNoLongerAvailableProduct()
getMessageForChangedProduct()
- class
Shopsys\FrameworkBundle\Model\LegalConditions\LegalConditionsFacade
was changed to abstract, don't forget to extend this class and implement following methods:getTermsAndConditionsDownloadFilename()
- class
Shopsys\FrameworkBundle\Model\Product\Listing\ProductListOrderingModeForBrandFacade
was changed to abstract, don't forget to extend this class and implement following methods:getSupportedOrderingModesNamesById()
- class
Shopsys\FrameworkBundle\Model\Product\Listing\ProductListOrderingModeForListFacade
was changed to abstract, don't forget to extend this class and implement following methods:getSupportedOrderingModesNamesById()
- class
Shopsys\FrameworkBundle\Model\Product\Listing\ProductListOrderingModeForSearchFacade
was changed to abstract, don't forget to extend this class and implement following methods:getSupportedOrderingModesNamesById()
- method
Shopsys\FrameworkBundle\Model\Category\CategoryFacade::getTranslatedAll()
was removed, usegetAllTranslated()
instead - method
Shopsys\FrameworkBundle\Model\Category\CategoryFacade::getTranslatedAllWithoutBranch
was removed, usegetAllTranslatedWithoutBranch()
instead - method
Shopsys\FrameworkBundle\Model\Category\CategoryRepository::getTranslatedAll()
was removed, usegetAllTranslated()
instead - method
Shopsys\FrameworkBundle\Model\Category\CategoryRepository::getTranslatedAllWithoutBranch()
was removed, usegetAllTranslatedWithoutBranch()
instead - method
Shopsys\FrameworkBundle\Model\Category\CategoryRepository::addTranslationPublic()
was removed- use
addTranslation()
, which visibility was changed to public
- use
- method
Shopsys\FrameworkBundle\Model\Category\CategoryRepository::filterBySearchTextPublic()
was removed- use
filterBySearchText()
, which visibility was changed to public
- use
- method
Shopsys\FrameworkBundle\Model\Pricing\PriceConverter::convertPriceWithoutVatToPriceInDomainDefaultCurrency()
was removed, useconvertPriceWithoutVatToDomainDefaultCurrencyPrice()
instead - method
Shopsys\FrameworkBundle\Model\Pricing\PriceConverter::convertPriceWithVatToPriceInDomainDefaultCurrency()
was removed, useconvertPriceWithVatToDomainDefaultCurrencyPrice()
instead - method
Shopsys\FrameworkBundle\Model\Pricing\PriceConverter::__construct()
changed its interface:public function __construct( CurrencyFacade $currencyFacade, Rounding $rounding, - ?Setting $setting = null + Setting $setting )
- method
Shopsys\FrameworkBundle\Model\Pricing\PriceConverter::convertPriceWithoutVatToPriceInDomainDefaultCurrency()
was removed, useconvertPriceWithoutVatToDomainDefaultCurrencyPrice'()
instead - method
Shopsys\FrameworkBundle\Model\Pricing\PriceConverter::convertPriceWithVatToPriceInDomainDefaultCurrency()
was removed, useconvertPriceWithVatToDomainDefaultCurrencyPrice'()
instead - method
Shopsys\FrameworkBundle\Model\Product\ProductFacade::getSellableByUuid
was removed, use method with the same name from theShopsys\FrontendApiBundle\Model\Product
namespace (you have to have shopsys/frontend-api package installed) - method
Shopsys\FrameworkBundle\Model\Product\ProductRepository::getSellableByUuid
was removed, use method with the same name from theShopsys\FrontendApiBundle\Model\Product
namespace (you have to have shopsys/frontend-api package installed) - method
Shopsys\FrameworkBundle\Model\Product\ProductRepository::getListableForBrandQueryBuilderPublic()
was removed- use
getListableForBrandQueryBuilder()
, which visibility was changed to public
- use
Shopsys\FrameworkBundle\Model\Product\ProductOnCurrentDomainElasticFacade
:- method
createListableProductsInCategoryFilterQuery()
was removed, useShopsys\FrameworkBundle\Model\Product\Search\FilterQueryFactory::createListableProductsByCategoryId()
instead - method
createListableProductsForBrandFilterQuery()
was removed, useShopsys\FrameworkBundle\Model\Product\Search\FilterQueryFactory::createListableProductsByBrandId
instead - method
createListableProductsForSearchTextFilterQuery()
was removed, useShopsys\FrameworkBundle\Model\Product\Search\FilterQueryFactory::createListableProductsBySearchText()
instead - method
createFilterQueryWithProductFilterData()
was removed, useShopsys\FrameworkBundle\Model\Product\Search\FilterQueryFactory::createWithProductFilterData()
instead - method
getIndexName()
was removed, useShopsys\FrameworkBundle\Model\Product\Search\FilterQueryFactory::getIndexName()
instead - method
getProductsCountOnCurrentDomain()
was removed, useShopsys\FrontendApiBundle\Model\Product\ProductFacade::getFilteredProductsCountOnCurrentDomain()
(you have to have shopsys/frontend-api package installed) - method
getProductsOnCurrentDomain()
was removed, useShopsys\FrontendApiBundle\Model\Product\ProductFacade::getFilteredProductsOnCurrentDomain()
(you have to have shopsys/frontend-api package installed) - method
getProductsByCategory()
was removed, useShopsys\FrontendApiBundle\Model\Product\ProductFacade::getFilteredProductsByCategory()
(you have to have shopsys/frontend-api package installed)
- method
Shopsys\FrameworkBundle\Model\Product\ProductOnCurrentDomainFacade
- method
getProductsCountOnCurrentDomain()
was removed, useShopsys\FrontendApiBundle\Model\Product\ProductFacade::getFilteredProductsCountOnCurrentDomain()
(you have to have shopsys/frontend-api package installed) - method
getProductsOnCurrentDomain()
was removed, useShopsys\FrontendApiBundle\Model\Product\ProductFacade::getFilteredProductsOnCurrentDomain()
(you have to have shopsys/frontend-api package installed) - method
getProductsByCategory()
was removed, useShopsys\FrontendApiBundle\Model\Product\ProductFacade::getFilteredProductsByCategory()
(you have to have shopsys/frontend-api package installed)
- method
Shopsys\FrameworkBundle\Model\Product\ProductOnCurrentDomainFacadeInterface
:- method
getProductsCountOnCurrentDomain()
was removed - method
getProductsOnCurrentDomain()
was removed - method
getProductsByCategory()
was removed
- method
- constant
Shopsys\FrameworkBundle\Model\Product\BestsellingProduct\BestsellingProductFacade::MAX_RESULTS
was removed - method
Shopsys\FrameworkBundle\Model\Script\ScriptFacade::getAllPagesScriptCodes()
was removed, usegetAllPagesBeforeContentScriptCodes()
instead - all unnecessary service definitions were removed from
services_test.yaml
file - removed
Shopsys\FrameworkBundle\Component\FileUpload\DeleteOldUploadedFilesCronModule
cron definition from shopsys/framework package, add this cron to your project config (it should be already set in cron.yaml if you properly followed all the previous upgrade notes or started your project on at least 9.0.2 version of Shopsys Framework) - removed css class
js-order-sent-page-variables
fromshopsys/framework/src/Resources/views/Admin/Content/Script/detail.html.twig
Shopsys\FrontendApiBundle\Model\Product\ProductFacade
- method
getProductsCountOnCurrentDomain()
was removed, usegetFilteredProductsCountOnCurrentDomain()
instead - method
getProductsOnCurrentDomain()
was removed, usegetFilteredProductsOnCurrentDomain()
instead - method
getProductsByCategory()
was removed, usegetFilteredProductsByCategory()
instead - method
getProductsByCategoryCount()
was removed, usegetFilteredProductsByCategoryCount()
instead - method
getProductsByBrand()
was removed, usegetFilteredProductsByBrand()
instead - method
getProductsByBrandCount()
was removed, usegetFilteredProductsByBrandCount()
instead
- method
- removed parameter
shopsys.var_dir
from shopsys/framework package, add this parameter to your project config (it should be already set in paths.yaml if you properly followed all the previous upgrade notes or started your project on at least 9.0.2 version of Shopsys Framework) Shopsys\FrontendApiBundle\Component\Constraints\ProductCanBeOrderedValidator
- property
$productFacade
was removed - property
$frontendApiProductFacade
is no longer nullable - method
__construct()
changed its interface:public function __construct( - ProductFacade $productFacade, ProductCachedAttributesFacade $productCachedAttributesFacade, Domain $domain, CurrentCustomerUser $currentCustomerUser, - ?FrontendApiProductFacade $frontendApiProductFacade = null + FrontendApiProductFacade $frontendApiProductFacade )
- property
- method
Shopsys\FrameworkBundle\Model\Article\ArticleRepository::getVisibleArticlesByDomainIdAndPlacementSortedByPositionQueryBuilder()
changed its visibility topublic
- method
Shopsys\FrameworkBundle\Model\Article\ArticleRepository::getAllVisibleQueryBuilder
changed its visibility topublic
- method
Shopsys\FrameworkBundle\Model\Article\ArticleRepository::getArticlesByDomainIdQueryBuilder
changed its visibility topublic
Shopsys\FrontendApiBundle\Model\Article\ArticleRepository
- property
$em
was removed - method
__construct()
changed its interface- public function __construct(FrameworkArticleRepository $articleRepository, EntityManagerInterface $em) + public function __construct(FrameworkArticleRepository $articleRepository)
- method
getVisibleArticlesByDomainIdAndPlacementSortedByPositionQueryBuilder()
was removed, use method with the same name from theShopsys\FrameworkBundle\Model\Article\ArticleRepository
class - method
getArticlesByDomainIdQueryBuilder()
was removed, use method with the same name from theShopsys\FrameworkBundle\Model\Article\ArticleRepository
class - method
getAllVisibleQueryBuilder()
was removed, use method with the same name from theShopsys\FrameworkBundle\Model\Article\ArticleRepository
class
- property
Shopsys\FrontendApiBundle\Model\Resolver\Category\CategoryResolver
- property
$domain
is no longer nullable - property
$friendlyUrlFacade
is no longer nullable - method
__construct()
changed its interfacepublic function __construct( CategoryFacade $categoryFacade, - ?Domain $domain = null, + Domain $domain, - ?FriendlyUrlFacade $friendlyUrlFacade = null + FriendlyUrlFacade $friendlyUrlFacade )
- method
resolver
used as resolver with an aliascategory
was removed, useresolveByUuidOrUrlSlug
method and resolver alias instead
- property
- class
Shopsys\FrontendApiBundle\Model\Resolver\Products\ProductResolver
used as resolver with aliasproduct
was removed, useProductDetailResolver
with aliasproductDetail
instead Shopsys\FrontendApiBundle\Model\Resolver\Products\ProductResolverMap
- method
getProductLink()
was removed, use mapping via appropriate classDataMapper\Product*FieldMapper
instead - method
getFlagsForData()
was removed, use mapping via appropriate classDataMapper\Product*FieldMapper
instead - method
getCategoriesForData()
was removed, use mapping via appropriate classDataMapper\Product*FieldMapper
instead - property
$domain
was removed - property
$productCollectionFacade
was removed - property
flagFacade
was removed - property
$categoryFacade
was removed - method
__construct
changed its interfacepublic function __construct( - Domain $domain, - ProductCollectionFacade $productCollectionFacade, - FlagFacade $flagFacade, - CategoryFacade $categoryFacade, - ?ProductEntityFieldMapper $productEntityFieldMapper = null, + ProductEntityFieldMapper $productEntityFieldMapper, - ?ProductArrayFieldMapper $productArrayFieldMapper = null + ProductArrayFieldMapper $productArrayFieldMapper )
- method
Shopsys\FrontendApiBundle\Model\Resolver\Products\ProductsResolver
- constant
EDGE_COUNT
was removed - property
$productOnCurrentDomainFacade
was removed - property
$productFacade
is no longer nullable - property
$productFilterFacade
is no longer nullable - property
$productConnectionFactory
is no longer nullable - method
__construct
changed its interfacepublic function __construct( - ProductOnCurrentDomainFacadeInterface $productOnCurrentDomainFacade, - ?ProductFacade $productFacade = null, + ProductFacade $productFacade, - ?ProductFilterFacade $productFilterFacade = null, + ProductFilterFacade $productFilterFacade, - ?ProductConnectionFactory $productConnectionFactory = null + ProductConnectionFactory $productConnectionFactory )
- constant
- method
Shopsys\ReadModelBundle\Image\ImageViewFacade::getForEntityIds()
was removed, usegetMainImagesByEntityIds()
instead - method
Shopsys\ReadModelBundle\Product\Action\ProductActionViewFacade::getForArray()
was removed, useProductActionViewFactory::createFromArray()
instead Shopsys\ReadModelBundle\Product\Listed\ListedProductViewElasticFacade
- property
$productActionViewFacade
was removed - method
createFromProducts()
was removed, useShopsys\ReadModelBundle\Product\Listed\ListedProductViewFactory::createFromProducts()
instead - method
getIdsForProducts()
was removed, useShopsys\ReadModelBundle\Product\Listed\ListedProductViewFactory::getIdsForProducts()
instead - method
__construct
changed its interfacepublic function __construct( ProductFacade $productFacade, ProductAccessoryFacade $productAccessoryFacade, Domain $domain, CurrentCustomerUser $currentCustomerUser, TopProductFacade $topProductFacade, ProductOnCurrentDomainFacadeInterface $productOnCurrentDomainFacade, ListedProductViewFactory $listedProductViewFactory, - ProductActionViewFacade $productActionViewFacade, ImageViewFacadeInterface $imageViewFacade, - ?ProductActionViewFactory $productActionViewFactory = null, + ProductActionViewFactory $productActionViewFactory, - ?ProductElasticsearchProvider $productElasticsearchProvider = null + ProductElasticsearchProvider $productElasticsearchProvider )
- property
Shopsys\ReadModelBundle\Product\Listed\ListedProductViewFacade
- property
$imageViewFacade
was removed - property
$productActionViewFacade
was removed - method
createFromProducts()
was removed, useShopsys\ReadModelBundle\Product\Listed\ListedProductViewFactory::createFromProducts()
instead - method
getIdsForProducts()
was removed, useShopsys\ReadModelBundle\Product\Listed\ListedProductViewFactory::getIdsForProducts()
instead - method
__construct
changed its interfacepublic function __construct( ProductFacade $productFacade, ProductAccessoryFacade $productAccessoryFacade, Domain $domain, CurrentCustomerUser $currentCustomerUser, TopProductFacade $topProductFacade, ProductOnCurrentDomainFacadeInterface $productOnCurrentDomainFacade, - ListedProductViewFactory $listedProductViewFactory, - ProductActionViewFacade $productActionViewFacade, - ImageViewFacade $imageViewFacade + ListedProductViewFactory $listedProductViewFactory )
- property
Shopsys\ReadModelBundle\Product\Listed\ListedProductViewFactory
- method
getProductPriceFromArrayByPricingGroup()
was removed, useShopsys\FrameworkBundle\Model\Product\Pricing\PriceFactory::createProductPriceFromArrayByPricingGroup()
- method
__construct
changed its interfacepublic function __construct( Domain $domain, ProductCachedAttributesFacade $productCachedAttributesFacade, - ?ImageViewFacadeInterface $imageViewFacade = null, + ImageViewFacadeInterface $imageViewFacade, - ?ProductActionViewFacadeInterface $productActionViewFacade = null, + ProductActionViewFacadeInterface $productActionViewFacade, - ?ProductActionViewFactory $productActionViewFactory = null, + ProductActionViewFactory $productActionViewFactory, - ?CurrentCustomerUser $currentCustomerUser = null, + CurrentCustomerUser $currentCustomerUser, - ?PriceFactory $priceFactory = null + PriceFactory $priceFactory )
- method
- method
Shopsys\FrameworkBundle\Component\Environment\EnvironmentFileSetting::getEnvironment()
changed its interface- public function getEnvironment(?bool $console = null): string + public function getEnvironment(): string
Shopsys\FrameworkBundle\Component\Router\FriendlyUrl\FriendlyUrlFacade
- property
$friendlyUrlCacheKeyProvider
is no longer nullable - property
$mainFriendlyUrlSlugCache
is no longer nullable - method
__construct
changed its interfacepublic function __construct( EntityManagerInterface $em, DomainRouterFactory $domainRouterFactory, FriendlyUrlUniqueResultFactory $friendlyUrlUniqueResultFactory, FriendlyUrlRepository $friendlyUrlRepository, Domain $domain, FriendlyUrlFactoryInterface $friendlyUrlFactory, - ?FriendlyUrlCacheKeyProvider $friendlyUrlCacheKeyProvider = null, + FriendlyUrlCacheKeyProvider $friendlyUrlCacheKeyProvider, - ?CacheInterface $mainFriendlyUrlSlugCache = null + CacheInterface $mainFriendlyUrlSlugCache )
- property
Shopsys\FrameworkBundle\Component\Router\FriendlyUrl\FriendlyUrlGenerator
- property
$friendlyUrlCacheKeyProvider
is no longer nullable - property
$mainFriendlyUrlSlugCache
is no longer nullable - method
__construct
changed its interfacepublic function __construct( RequestContext $context, FriendlyUrlRepository $friendlyUrlRepository, - ?FriendlyUrlCacheKeyProvider $friendlyUrlCacheKeyProvider = null, + FriendlyUrlCacheKeyProvider $friendlyUrlCacheKeyProvider, - ?CacheInterface $mainFriendlyUrlSlugCache = null + CacheInterface $mainFriendlyUrlSlugCache )
- property
- method
Shopsys\FrameworkBundle\Model\Feed\FeedExportFactory::create()
changed its interfacepublic function create( FeedInterface $feed, DomainConfig $domainConfig, - $lastSeekId = null + ?int $lastSeekId = null )
- method
Shopsys\FrameworkBundle\Model\Product\Pricing\PriceFactory::createProductPriceFromArrayByPricingGroup()
changed its return type and now can throwNoProductPriceForPricingGroupException
public function createProductPriceFromArrayByPricingGroup( array $pricesArray, PricingGroup $pricingGroup - ): ?ProductPrice + ): ProductPrice
- method
Shopsys\FrontendApiBundle\Model\Price\PriceFacade::createProductPriceFromArrayForCurrentCustomer()
changed its return type and now can throwNoProductPriceForPricingGroupException
public function createProductPriceFromArrayForCurrentCustomer( array $pricesArray - ): ?ProductPrice + ): ProductPrice
Shopsys\FrameworkBundle\Command\CronCommand
- property
$parameterBag
is no longer nullable - method
__construct
changed its interfacepublic function __construct( CronFacade $cronFacade, MutexFactory $mutexFactory, - ?ParameterBagInterface $parameterBag = null + ParameterBagInterface $parameterBag )
- property
Shopsys\FrameworkBundle\Component\Elasticsearch\AbstractExportChangedCronModule
- property
$eventDispatcher
is no longer nullable - method
__construct
changed its interfacepublic function __construct( AbstractIndex $index, IndexFacade $indexFacade, IndexDefinitionLoader $indexDefinitionLoader, Domain $domain, - ?EventDispatcherInterface $eventDispatcher = null + EventDispatcherInterface $eventDispatcher )
- property
Shopsys\FrameworkBundle\Component\FileUpload\FileUpload
- property
$parameterBag
is no longer nullable - method
__construct
changed its interfacepublic function __construct( FileNamingConvention $fileNamingConvention, MountManager $mountManager, FilesystemInterface $filesystem, - ?ParameterBagInterface $parameterBag = null + ParameterBagInterface $parameterBag )
- property
Shopsys\FrameworkBundle\Component\Image\Config\ImageConfig
- property
$entityNameResolver
is no longer nullable - method
__construct
changed its interfacepublic function __construct( array $imageEntityConfigsByClass, - ?EntityNameResolver $entityNameResolver = null + EntityNameResolver $entityNameResolver )
- property
Shopsys\FrameworkBundle\Component\Image\Config\ImageConfigLoader
- property
$entityNameResolver
is no longer nullable - method
__construct
changed its interfacepublic function __construct( Filesystem $filesystem, - ?EntityNameResolver $entityNameResolver = null + EntityNameResolver $entityNameResolver )
- property
Shopsys\FrameworkBundle\Component\Router\FriendlyUrl\FriendlyUrlRouterFactory
- property
$friendlyUrlCacheKeyProvider
is no longer nullable - property
$mainFriendlyUrlSlugCache
is no longer nullable - method
__construct
changed its interfacepublic function __construct( $friendlyUrlRouterResourceFilepath, LoaderInterface $configLoader, FriendlyUrlRepository $friendlyUrlRepository, - ?FriendlyUrlCacheKeyProvider $friendlyUrlCacheKeyProvider = null, + FriendlyUrlCacheKeyProvider $friendlyUrlCacheKeyProvider, - ?CacheInterface $mainFriendlyUrlSlugCache = null + CacheInterface $mainFriendlyUrlSlugCache )
- property
Shopsys\FrameworkBundle\Controller\Admin\CustomerController
- property
$domain
is no longer nullable - method
__construct
changed its interfacepublic function __construct( CustomerUserDataFactoryInterface $customerUserDataFactory, CustomerUserListAdminFacade $customerUserListAdminFacade, CustomerUserFacade $customerUserFacade, BreadcrumbOverrider $breadcrumbOverrider, AdministratorGridFacade $administratorGridFacade, GridFactory $gridFactory, AdminDomainTabsFacade $adminDomainTabsFacade, OrderFacade $orderFacade, LoginAsUserFacade $loginAsUserFacade, DomainRouterFactory $domainRouterFactory, CustomerUserUpdateDataFactoryInterface $customerUserUpdateDataFactory, - ?Domain $domain = null + Domain $domain )
- property
Shopsys\FrameworkBundle\Model\Customer\User\CustomerUserPasswordFacade
- property
$customerUserRefreshTokenChainFacade
is no longer nullable - method
__construct
changed its interfacepublic function __construct( EntityManagerInterface $em, CustomerUserRepository $customerUserRepository, EncoderFactoryInterface $encoderFactory, ResetPasswordMailFacade $resetPasswordMailFacade, HashGenerator $hashGenerator, - ?CustomerUserRefreshTokenChainFacade $customerUserRefreshTokenChainFacade = null + CustomerUserRefreshTokenChainFacade $customerUserRefreshTokenChainFacade )
- property
Shopsys\FrameworkBundle\Model\Product\ProductDataFactory
- property
$availabilityFacade
is no longer nullable - method
__construct
changed its interfacepublic function __construct( VatFacade $vatFacade, ProductInputPriceFacade $productInputPriceFacade, UnitFacade $unitFacade, Domain $domain, ProductRepository $productRepository, ParameterRepository $parameterRepository, FriendlyUrlFacade $friendlyUrlFacade, ProductAccessoryRepository $productAccessoryRepository, ImageFacade $imageFacade, PluginCrudExtensionFacade $pluginDataFormExtensionFacade, ProductParameterValueDataFactoryInterface $productParameterValueDataFactory, PricingGroupFacade $pricingGroupFacade, - ?AvailabilityFacade $availabilityFacade = null + AvailabilityFacade $availabilityFacade )
- property
Shopsys\FrameworkBundle\Model\Product\Elasticsearch\ProductExportRepository
- property
$categoryFacade
is no longer nullable - property
$productAccessoryFacade
is no longer nullable - property
$brandCachedFacade
is no longer nullable - method
__construct
changed its interfacepublic function __construct( EntityManagerInterface $em, ParameterRepository $parameterRepository, ProductFacade $productFacade, FriendlyUrlRepository $friendlyUrlRepository, Domain $domain, ProductVisibilityRepository $productVisibilityRepository, FriendlyUrlFacade $friendlyUrlFacade, - ?CategoryFacade $categoryFacade = null, + CategoryFacade $categoryFacade, - ?ProductAccessoryFacade $productAccessoryFacade = null, + ProductAccessoryFacade $productAccessoryFacade, - ?BrandCachedFacade $brandCachedFacade = null + BrandCachedFacade $brandCachedFacade )
- property
Shopsys\FrameworkBundle\Twig\UploadedFileExtension
- property
$uploadedFileLocator
is no longer nullable - method
__construct
changed its interfacepublic function __construct( Domain $domain, UploadedFileFacade $uploadedFileFacade, FileThumbnailExtension $fileThumbnailExtension, - ?UploadedFileLocator $uploadedFileLocator = null + UploadedFileLocator $uploadedFileLocator )
- property
Shopsys\FrontendApiBundle\Controller\FrontendApiController
- property
$graphqlConfigurator
is no longer nullable - method
__construct
changed its interfacepublic function __construct( GraphController $graphController, EnabledOnDomainChecker $enabledOnDomainChecker, - ?GraphqlConfigurator $graphqlConfigurator = null + GraphqlConfigurator $graphqlConfigurator )
- property
Shopsys\FrontendApiBundle\Model\Resolver\Image\ImagesResolver
- property
$frontendApiImageFacade
is no longer nullable - method
__construct
changed its interfacepublic function __construct( ImageFacade $imageFacade, ImageConfig $imageConfig, Domain $domain, - ?FrontendApiImageFacade $frontendApiImageFacade = null + FrontendApiImageFacade $frontendApiImageFacade )
- property
Shopsys\FrontendApiBundle\Model\Resolver\Price\PriceResolver
- property
$priceFacade
is no longer nullable - method
__construct
changed its interfacepublic function __construct( ProductCachedAttributesFacade $productCachedAttributesFacade, ProductOnCurrentDomainFacadeInterface $productOnCurrentDomainFacade, PaymentPriceCalculation $paymentPriceCalculation, Domain $domain, CurrencyFacade $currencyFacade, TransportPriceCalculation $transportPriceCalculation, - ?PriceFacade $priceFacade = null + PriceFacade $priceFacade )
- property
Shopsys\FrameworkBundle\Component\Image\ImageFacade
- property
$logger
is no longer nullable - method
__construct
changed its interfacepublic function __construct( $imageUrlPrefix, EntityManagerInterface $em, ImageConfig $imageConfig, ImageRepository $imageRepository, FilesystemInterface $filesystem, FileUpload $fileUpload, ImageLocator $imageLocator, ImageFactoryInterface $imageFactory, MountManager $mountManager, - ?LoggerInterface $logger = null + LoggerInterface $logger )
- property
Shopsys\FrameworkBundle\Model\Mail\Mailer
- property
$logger
is no longer nullable - method
__construct
changed its interfacepublic function __construct( Swift_Mailer $swiftMailer, Swift_Transport $realSwiftTransport, MailTemplateFacade $mailTemplateFacade, - ?LoggerInterface $logger = null + LoggerInterface $logger )
- property
- Phing property
-
Changes in error handling (#2474)
symfony/debug
component was replaced bysymfony/error-handler
component- reflect this change in your
composer.json
- "symfony/debug": "^4.4.0", + "symfony/error-handler": "^4.4.0",
- if you import any classes from
symfony\debug
component, import them fromsymfony/error-handler
- rename
config/routes/dev/twig.yaml
toconfig/routes/dev/framework.yaml
and change its content- # config/routes/dev/twig.yaml + # config/routes/dev/framework.yaml _errors: - resource: '@TwigBundle/Resources/config/routing/errors.xml' + resource: '@FrameworkBundle/Resources/config/routing/errors.xml' prefix: /_error
- reflect this change in your
- Class
Shopsys\FrameworkBundle\Component\Error\ExceptionController
was removed and it's not needed anymore. - Class
App\Controller\Front\ErrorController
was moved toShopsys\FrameworkBundle\Component\Error\ErrorController
- change your config of
error_controller
inconfig/packages/framework.yaml
- error_controller: 'App\Controller\Front\ErrorController::showAction' + error_controller: 'Shopsys\FrameworkBundle\Component\Error::showAction'
- remove config of
ErrorController
inconfig/services.yaml
. It is configured in framework from now on.- App\Controller\Front\ErrorController: - arguments: - $environment: '%kernel.environment%' - $overwriteDomainUrl: '%env(default::OVERWRITE_DOMAIN_URL)%'
- remove
front_error_page
andfront_error_page_format
routes fromconfig/routes/shopsys_front.yaml
. It's handled by framework from now on.- front_error_page: - path: /_error/{code}/ - defaults: - _controller: App\Controller\Front\ErrorController:errorPageAction - requirements: - code: \d+ - front_error_page_format: - path: /_error/{code}/{_format}/ - defaults: - _controller: App\Controller\Front\ErrorController:errorPageAction - requirements: - code: \d+ - _format: css|html|js|json|txt|xml
- see #project-base-diff to update your project
- change your config of
-
remove unnecessary extended ImageExtension from your project, if you don't have any custom changes in the extension
- see #project-base-diff to update your project
-
remove unnecessary
services_acc.yaml
config from your project- create
config/packages/acc/framework.yaml
with configuration for acceptance testing - see #project-base-diff to update your project
- create
-
move
paths.yml
config file into packages subfolder to allow easy override them for different environments- see #project-base-diff to update your project
-
set overwrite domain url to be taken exclusively from environment variable
- see #project-base-diff to update your project
-
set redis host to be taken exclusively from environment variable
- see #project-base-diff to update your project
-
set swift mailer configuration to be taken exclusively from environment variable
- see #project-base-diff to update your project
-
set application secret to be taken exclusively from environment variable
- see #project-base-diff to update your project
-
set doctrine configuration to be taken exclusively from environment variables
- see #project-base-diff to update your project
-
unused translations have been removed
- the following
msgid
entries are no longer available in framework, they should be already added into your project directlyContact
Edit data
Forgotten password
Oops! Error occurred
Page not found
Product <strong>{{ name }}</strong> you had in cart is no longer available. Please check your order.
Product you had in cart is no longer in available. Please check your order.
Registration
Search [noun]
TOP
Terms-and-conditions.html
The price of the product <strong>{{ name }}</strong> you have in cart has changed. Please, check your order.
alphabetically A -> Z
alphabetically Z -> A
from most expensive
from the cheapest
relevance
- the following
-
parameter(_test).yaml.dist
and auto-creation ofparameter(_test).yaml
files was removed- see #project-base-diff to update your project
- you can create
parameters.yaml
manually to locally override some settings (for testing purposes for example) - your custom parameters should be in environment variable (if the value is environment-specific), or in different config file (if the value is project-specific)
-
fix implementations of FileVisitorInterface::visitTwigFile (#2465)
- in the following classes, an interface of
visitTwigFile
was fixed to comply withFileVisitorInterface
ConstraintMessageExtractor
ConstraintMessagePropertyExtractor
ConstraintViolationExtractor
JsFileExtractor
PhpFileExtractor
TwigFileExtractor
- in the following classes, an interface of
-
resolve Symfony 4.4 deprecations (#2468)
- remove Twig deprecation - an "if" condition on a "for" tag
- see the last bullet point in https://twig.symfony.com/doc/2.x/deprecated.html#tags
- see #project-base-diff
- remove deprecated "bundle:controller:action" syntax from twig templates
Shopsys\FrameworkBundle\Component\Error\ExceptionListener
class:- property
$lastException
is renamed to$lastThrowable
, its type is changed to\Throwable|null
, and is strictly typed now - method
onKernelException
changed its interface:
- onKernelException(GetResponseForExceptionEvent $event) + onKernelException(ExceptionEvent $event): void
- method
getLastException
changed its interface and was renamed togetLastThrowable
:
- public function getLastException() + public function getLastThrowable(): ?Throwable
- property
Shopsys\FrontendApiBundle\Model\ErrorErrorHandlerListener
class:- method
onKernelException
changed its interface:
- onKernelException(GetResponseForExceptionEvent $event) + onKernelException(ExceptionEvent $event): void
- method
- remove Twig deprecation - an "if" condition on a "for" tag
-
replace usage of deprecated kernel events (#2482)
- see #project-base-diff to update your project
- see https://github.com/symfony/symfony/blob/5.4/UPGRADE-5.0.md#httpkernel for the full list of replacements for your code
Shopsys\FrameworkBundle\Component\Domain\DomainAwareSecurityHeadersSetter
class:- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
Shopsys\FrameworkBundle\Component\Domain\DomainSubscriber
class:- method
onKernelRequest
changed its interface:
- onKernelRequest(GetResponseEvent $event) + onKernelRequest(RequestEvent $event): void
- method
Shopsys\FrameworkBundle\Component\HttpFoundation\DenyScriptNameInRequestPathListener
class:- method
onKernelRequest
changed its interface:
- onKernelRequest(GetResponseEvent $event) + onKernelRequest(RequestEvent $event): void
- method
Shopsys\FrameworkBundle\Component\HttpFoundation\ResponseListener
class:- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
Shopsys\FrameworkBundle\Component\HttpFoundation\SubRequestListener
class:- method
onKernelController
changed its interface:
- onKernelController(FilterControllerEvent $event) + onKernelController(ControllerEvent $event): void
- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
Shopsys\FrameworkBundle\Component\HttpFoundation\TransactionalMasterRequestListener
class:- method
onKernelRequest
changed its interface:
- onKernelRequest(GetResponseEvent $event) + onKernelRequest(RequestEvent $event): void
- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
onKernelException
changed its interface:
- onKernelException(GetResponseForExceptionEvent $event) + onKernelException(ExceptionEvent $event): void
- method
Shopsys\FrameworkBundle\Component\HttpFoundation\VaryResponseByXRequestedWithHeaderListener
class:- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
Shopsys\FrameworkBundle\Component\Log\SlowLogSubscriber
class:- method
initStartTime
changed its interface:
- initStartTime(GetResponseEvent $event) + initStartTime(RequestEvent $event): void
- method
addNotice
changed its interface:
- addNotice(PostResponseEvent $event) + addNotice(TerminateEvent $event): void
- method
Shopsys\FrameworkBundle\Component\Router\Security\RouteCsrfProtector
class:- method
onKernelController
changed its interface:
- onKernelController(FilterControllerEvent $event) + onKernelController(ControllerEvent $event): void
- method
isProtected
changed its interface:
- isProtected(FilterControllerEvent $event) + isProtected(ControllerEvent $event): bool
- method
Shopsys\FrameworkBundle\Model\Administrator\Security\AdministratorRolesChangedSubscriber
class:- method
onKernelRequest
changed its interface:
- onKernelRequest(GetResponseEvent $event) + onKernelRequest(RequestEvent $event): void
- method
Shopsys\FrameworkBundle\Model\Cart\CartMigrationFacade
class:- method
onKernelController
changed its interface:
- onKernelController(FilterControllerEvent $filterControllerEvent) + onKernelController(ControllerEvent $event): void
- method
Shopsys\FrameworkBundle\Model\Category\CategoryVisibilityRepository
class:- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
Shopsys\FrameworkBundle\Model\Localization\LocalizationListener
class:- method
onKernelRequest
changed its interface:
- onKernelRequest(GetResponseEvent $event) + onKernelRequest(RequestEvent $event): void
- method
Shopsys\FrameworkBundle\Model\Pricing\InputPriceRecalculationScheduler
class:- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
Shopsys\FrameworkBundle\Model\Product\ProductVisibilityFacade
class:- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
Shopsys\FrameworkBundle\Model\Product\Availability\ProductAvailabilityRecalculator
class:- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
Shopsys\FrameworkBundle\Model\Product\Pricing\ProductPriceRecalculator
class:- method
onKernelResponse
changed its interface:
- onKernelResponse(FilterResponseEvent $event) + onKernelResponse(ResponseEvent $event): void
- method
-
remove obsolete path parameters (#2468)
- see #project-base-diff to update your project
- replace parameter
kernel.root_dir
with%kernel.project_dir%/src
in your codebase - parameter
shopsys.framework.javascript_sources_dir
was removed because it's not used anywhere
-
debug data collectors are now future compatible with Symfony 5 (#2484)
Shopsys\FrameworkBundle\Component\Collector\ShopsysFrameworkDataCollector
class:- method
collect
changed its interface:
- collect(Request $request, Response $response, ?Exception $exception = null): void + collect(Request $request, Response $response, ?Throwable $exception = null): void
- method
Shopsys\FrameworkBundle\Component\Elasticsearch\Debug\ElasticsearchCollector
class:- method
collect
changed its interface:
- collect(Request $request, Response $response, ?Exception $exception = null): void + collect(Request $request, Response $response, ?Throwable $exception = null): void
- method
-
remove not used
twig/extensions
package (#2486)- see #project-base-diff to update your project
- see the list of filters and update your code if you use any – https://github.com/twigphp/Twig-extensions
trans
filter is already used from symfony/twig-bridge package
-
resolve
symfony/translations
deprecations (#2487)- see #project-base-diff
- replace usage of
Symfony\Component\Translation\TranslatorInterface
withSymfony\Contracts\Translation\TranslatorInterface
- remove usage of deprecated
Symfony\Component\Translation\MessageSelector
- replace
transchoice
filter withtrans
filter and count parameter- example:
- {% transchoice cart.itemsCount with { '%itemsCount%': cart.itemsCount, '%priceWithVat%': productsPrice.priceWithVat|price } %} - {1} <strong class="cart__state">%itemsCount%</strong> item for <strong class="cart__state">%priceWithVat%</strong>|[2,Inf] <strong class="cart__state">%itemsCount%</strong> items for <strong class="cart__state">%priceWithVat%</strong> - {% endtranschoice %} + {% trans with { '%count%': cart.itemsCount, '%itemsCount%': cart.itemsCount, '%priceWithVat%': productsPrice.priceWithVat|price } %} + {1} <strong class="cart__state">%itemsCount%</strong> item for <strong class="cart__state">%priceWithVat%</strong>|[2,Inf] <strong class="cart__state">%itemsCount%</strong> items for <strong class="cart__state">%priceWithVat%</strong> + {% endtrans %}
transchoice()
method was removed from\Shopsys\FrameworkBundle\Component\Translation\Translator
, usetrans()
withcount
parameter instead- static
tc()
method was removed from\Shopsys\FrameworkBundle\Component\Translation\Translator
, uset()
withcount
parameter instead - static
tc()
function was removed from global namespace, uset()
withcount
parameter instead
-
avoid the session starting in the frontend API (#2497)
- beware, the changes might affect you even if you do not use the FE API in your project
- class
Shopsys\FrameworkBundle\Component\Error\LogoutExceptionSubscriber
:- property
$flashBag
was removed, you can use$this->flashBagProvider->getFlashBag()
to access the implementation ofFlashBagInterface
instead - the constructor changed the interface:
public function __construct( - FlashBagInterface $flashBag, + FlashBagProvider $flashBagProvider,
- property
- class
Shopsys\FrameworkBundle\Model\Cart\Watcher\CartWatcherFacade
:- property
$flashBag
was removed, you can use$this->flashBagProvider->getFlashBag()
to access the implementation ofFlashBagInterface
instead - the constructor changed the interface:
public function __construct( - FlashBagInterface $flashBag, + FlashBagProvider $flashBagProvider,
- property
- replace swiftmailer with symfony/mailer (#2470)
- see #project-base-diff
- from now on, the mail transport is configured using
MAILER_DSN
env variableMAILER_TRANSPORT
,MAILER_HOST
,MAILER_USER
, andMAILER_PASSWORD
env variables had been removed
- the mail spooling functionality has been removed without replacement
- if you need the asynchronous mails, you can implement it using Symfony messenger
Shopsys\FrameworkBundle\Component\Cron\CronFacade
class:$mailer
property has been removed- constructor changed its interface:
public function __construct( Logger $logger, CronConfig $cronConfig, CronModuleFacade $cronModuleFacade, - Mailer $mailer, CronModuleExecutor $cronModuleExecutor
Shopsys\FrameworkBundle\Model\Mail\Exception\EmptyMailException
has been removedShopsys\FrameworkBundle\Model\Mail\Exception\SendMailFailedException
has been removedShopsys\FrameworkBundle\Model\Mail\Mailer
class:- property
$swiftMailer
has been removed - property
$realSwiftTransport
has been removed - property
$mailTemplateFacade
is now strictly typed - constructor changed its interface:
public function __construct( - Swift_Mailer $swiftMailer, - Swift_Transport $realSwiftTransport, + MailerInterface $symfonyMailer, MailTemplateFacade $mailTemplateFacade, LoggerInterface $logger
- method
flushSpoolQueue
has been removed - method
send
is now strictly typed - method
getMessageWithReplacedVariables
is now strictly typed and returns\Symfony\Component\Mime\Email
instead of\Swift_Message
- method
replaceVariables
is now strictly typed
- property
Shopsys\FrameworkBundle\Model\Mail\MessageData
class is now strictly typedShopsys\FrameworkBundle\Twig\MailerSettingExtension
class:- property
$container
has been removed - property
$isDeliveryDisabled
has been removed - property
$mailerMasterEmailAddress
has been removed - property
$twigEnvironment
is now strictly typed - constructor changed its interface:
- public function __construct(ContainerInterface $container, Environment $twigEnvironment) + public function __construct(MailerSettingProvider $mailerSettingProvider, Environment $twigEnvironment)
- property
- translations - the
Unable to send updating email
msgid is no longer available
- update
overblog/graphql-bundle
to^0.14.3
(#2479)- switch implementation of deprecated
Overblog\GraphQLBundle\Definition\Resolver\ResolverInterface
toOverblog\GraphQLBundle\Definition\Resolver\QueryInterface
in your resolvers - change
resolver
expression function toquery
in your types defined in yaml files- Old signature (deprecated):
resolver(string $alias, array $args = []): mixed
- New signature:
query(string $alias, ...$args): mixed
- Example:
- resolve: "@=resolver('categoriesSearch', [args])" + resolve: "@=query('categoriesSearch', args)"
- Old signature (deprecated):
- change
service
expression function toquery
in your types defined in yaml files- it is no longer supported to use private services in @=service function
- for more details check: https://github.com/overblog/GraphQLBundle/blob/master/docs/definitions/expression-language.md#private-services
- Example:
- resolve: '@=service("Shopsys\\FrontendApiBundle\\Model\\Resolver\\Image\\ImagesResolver").resolveByAdvert(value, args["type"], args["size"])' + resolve: '@=query("Shopsys\\FrontendApiBundle\\Model\\Resolver\\Image\\ImagesResolver::resolveByAdvert", value, args["type"], args["size"])'
mutation
expression function signature was changed- Old signature:
mutation(string $alias, array $args = []): mixed
- New signature:
mutation(string $alias, ...$args): mixed
- Example:
- resolve: "@=mutation('create_order', [args, validator])" + resolve: resolve: "@=mutation('create_order', args, validator)"
- Old signature:
- check other changes in GraphQLBundle UPGRADE notes and implement them in your codebase
- switch implementation of deprecated