From f3a1293134fc309238003f858fc18eef4f46ca3c Mon Sep 17 00:00:00 2001 From: Jacob Dreesen Date: Fri, 25 Feb 2022 16:18:30 +0100 Subject: [PATCH 1/2] Upgrade PHP-CS-Fixer config to v3.x --- .gitignore | 4 ++-- .php_cs.dist => .php-cs-fixer.dist.php | 24 ++++++++---------------- 2 files changed, 10 insertions(+), 18 deletions(-) rename .php_cs.dist => .php-cs-fixer.dist.php (76%) diff --git a/.gitignore b/.gitignore index c4b48bd1..da880c25 100644 --- a/.gitignore +++ b/.gitignore @@ -32,8 +32,8 @@ /public/sitemap*.xml # PHP-CS-Fixer -/.php_cs -/.php_cs.cache +/.php-cs-fixer.php +/.php-cs-fixer.cache # composer /vendor/ diff --git a/.php_cs.dist b/.php-cs-fixer.dist.php similarity index 76% rename from .php_cs.dist rename to .php-cs-fixer.dist.php index 9ec2c410..71f9c83c 100644 --- a/.php_cs.dist +++ b/.php-cs-fixer.dist.php @@ -1,48 +1,40 @@ in([ - __DIR__ . '/app', __DIR__ . '/src', ]) ->exclude([ ]) - - // do not fix views - ->notName('*.html.php') - - // using notPath instead of exclude here as they can be nested (install-profiles) - ->notPath('/var\/config/') - ->notPath('/var\/classes/') ; // do not enable self_accessor as it breaks pimcore models relying on get_called_class() -return PhpCsFixer\Config::create() +return (new PhpCsFixer\Config) ->setRules([ '@PSR1' => true, '@PSR2' => true, 'array_syntax' => ['syntax' => 'short'], // keep aligned = and => operators as they are: do not force aligning, but do not remove it - 'binary_operator_spaces' => ['align_double_arrow' => null, 'align_equals' => null], + 'binary_operator_spaces' => ['operators' => ['=' => null, '=>' => null]], - 'blank_line_before_return' => true, + 'blank_line_before_statement' => ['statements' => ['return']], 'encoding' => true, 'function_typehint_space' => true, - 'hash_to_slash_comment' => true, + 'single_line_comment_style' => ['comment_types' => ['hash']], 'lowercase_cast' => true, 'magic_constant_casing' => true, - 'method_argument_space' => ['ensure_fully_multiline' => false], - 'method_separation' => true, + 'method_argument_space' => ['on_multiline' => 'ignore'], + 'class_attributes_separation' => ['elements' => ['method' => 'one']], 'native_function_casing' => true, 'no_blank_lines_after_class_opening' => true, 'no_blank_lines_after_phpdoc' => true, 'no_empty_comment' => true, 'no_empty_phpdoc' => true, 'no_empty_statement' => true, - 'no_extra_consecutive_blank_lines' => true, + 'no_extra_blank_lines' => true, 'no_leading_import_slash' => true, 'no_leading_namespace_whitespace' => true, 'no_short_bool_cast' => true, From c931d9583b50784f4f19c2d67873bdf2c8ba5da6 Mon Sep 17 00:00:00 2001 From: Jacob Dreesen Date: Fri, 25 Feb 2022 16:20:15 +0100 Subject: [PATCH 2/2] Run PHP-CS-Fixer --- src/Controller/DefaultController.php | 2 + src/Controller/PaymentController.php | 21 +++---- src/Controller/ProductController.php | 56 +++++++++---------- src/Controller/Web2printController.php | 2 + src/Document/Areabrick/Blockquote.php | 1 - .../Areabrick/PersonalizedProductTeaser.php | 25 ++++----- src/Kernel.php | 3 +- src/Model/Product/AccessoryPart.php | 3 +- src/Model/Product/Car.php | 4 +- src/Sitemaps/CategoryGenerator.php | 2 +- src/Sitemaps/NewsGenerator.php | 2 +- src/Sitemaps/ProductGenerator.php | 7 +-- src/Twig/Extension/Country.php | 1 + src/Twig/Extension/NavigationExtension.php | 2 +- src/Twig/Extension/PrintCatalogExtension.php | 2 +- src/Twig/Extension/ProductPageExtension.php | 1 + .../AbstractProductLinkGenerator.php | 2 +- .../LinkGenerator/NewsLinkGenerator.php | 2 +- .../LinkGenerator/ProductLinkGenerator.php | 7 ++- .../Navigation/BreadcrumbHelperService.php | 2 +- 20 files changed, 74 insertions(+), 73 deletions(-) diff --git a/src/Controller/DefaultController.php b/src/Controller/DefaultController.php index fb05e15b..f22beae6 100644 --- a/src/Controller/DefaultController.php +++ b/src/Controller/DefaultController.php @@ -27,6 +27,7 @@ class DefaultController extends BaseController * @Route("/examples", name="examples") * * @param Request $request + * * @return Response */ public function examplesAction(Request $request) @@ -38,6 +39,7 @@ public function examplesAction(Request $request) * @Template * * @param Request $request + * * @return array */ public function defaultAction(Request $request) diff --git a/src/Controller/PaymentController.php b/src/Controller/PaymentController.php index 8bbef8b7..8ff43a26 100644 --- a/src/Controller/PaymentController.php +++ b/src/Controller/PaymentController.php @@ -54,7 +54,7 @@ public function checkoutPaymentAction(Factory $factory, BreadcrumbHelperService $paymentProvider = $checkoutManager->getPayment(); $SDKUrl = ''; - if($paymentProvider instanceof PayPalSmartPaymentButton) { + if ($paymentProvider instanceof PayPalSmartPaymentButton) { $SDKUrl = $paymentProvider->buildPaymentSDKLink(); } @@ -77,24 +77,25 @@ public function checkoutPaymentAction(Factory $factory, BreadcrumbHelperService */ public function startPaymentAction(Request $request, Factory $factory, LoggerInterface $logger) { - $cartManager = $factory->getCartManager(); - $cart = $cartManager->getOrCreateCartByName('cart'); + $cartManager = $factory->getCartManager(); + $cart = $cartManager->getOrCreateCartByName('cart'); - $checkoutManager = Factory::getInstance()->getCheckoutManager($cart); - $paymentInformation = $checkoutManager->initOrderPayment(); - $order = $paymentInformation->getObject(); + $checkoutManager = Factory::getInstance()->getCheckoutManager($cart); + $paymentInformation = $checkoutManager->initOrderPayment(); + $order = $paymentInformation->getObject(); - $config = [ + $config = [ 'return_url' => '', 'cancel_url' => 'https://demo.pimcore.fun/payment-error', 'OrderDescription' => 'My Order ' . $order->getOrdernumber() . ' at pimcore.org', 'InternalPaymentId' => $paymentInformation->getInternalPaymentId() ]; - $paymentConfig = new AbstractRequest($config); + $paymentConfig = new AbstractRequest($config); + + $response = $checkoutManager->startOrderPaymentWithPaymentProvider($paymentConfig); - $response = $checkoutManager->startOrderPaymentWithPaymentProvider($paymentConfig); - return new \Symfony\Component\HttpFoundation\JsonResponse($response->getJsonString(), 200, [], true); + return new \Symfony\Component\HttpFoundation\JsonResponse($response->getJsonString(), 200, [], true); } /** diff --git a/src/Controller/ProductController.php b/src/Controller/ProductController.php index 63055862..af6b886c 100644 --- a/src/Controller/ProductController.php +++ b/src/Controller/ProductController.php @@ -49,9 +49,11 @@ class ProductController extends BaseController * @param Request $request * @param AbstractObject $object * @param UrlSlug $urlSlug + * * @return Response */ - public function productDetailSlugAction(Request $request, AbstractObject $object, UrlSlug $urlSlug) { + public function productDetailSlugAction(Request $request, AbstractObject $object, UrlSlug $urlSlug) + { return $this->forward('App\Controller\ProductController::detailAction', ['product' => $object]); } @@ -78,8 +80,7 @@ public function detailAction( SegmentTrackingHelperService $segmentTrackingHelperService, Concrete $product, ProductLinkGenerator $productLinkGenerator - ) - { + ) { if (!( $product && ($product->isPublished() && (($product instanceof Car && $product->getObjectType() == Car::OBJECT_TYPE_ACTUAL_CAR) || $product instanceof AccessoryPart) || $this->verifyPreviewRequest($request, $product)) ) @@ -89,8 +90,9 @@ public function detailAction( //redirect to main url $generatorUrl = $productLinkGenerator->generate($product); - if($generatorUrl != $request->getPathInfo()) { + if ($generatorUrl != $request->getPathInfo()) { $queryString = $request->getQueryString(); + return $this->redirect($generatorUrl . ($queryString ? '?' . $queryString : '')); } @@ -107,7 +109,6 @@ public function detailAction( $trackingManager->trackProductView($product); if ($product instanceof Car) { - foreach ($product->getAccessories() as $accessory) { $trackingManager->trackProductImpression($accessory, 'crosssells'); } @@ -118,13 +119,13 @@ public function detailAction( // get all compatible products $productList = $ecommerceFactory->getIndexService()->getProductListForCurrentTenant(); $productList->setVariantMode(ProductListInterface::VARIANT_MODE_VARIANTS_ONLY); - if($productList instanceof DefaultMysql) { + if ($productList instanceof DefaultMysql) { $productList->addCondition('o_id IN (' . implode(',', $product->getCompatibleToProductIds()) . ')', 'o_id'); - } else if($productList instanceof AbstractElasticSearch) { + } elseif ($productList instanceof AbstractElasticSearch) { $productList->addCondition(['terms' => ['system.o_id' => $product->getCompatibleToProductIds()]], 'o_id'); } - foreach($productList as $compatibleProduct) { + foreach ($productList as $compatibleProduct) { $trackingManager->trackProductImpression($compatibleProduct, 'crosssells'); } @@ -264,7 +265,7 @@ public function searchAction(Request $request, ListHelper $listHelper, Factory $ $term = strip_tags($request->get('term')); - if($productListing instanceof AbstractElasticSearch) { + if ($productListing instanceof AbstractElasticSearch) { // simple elastic search query - uses multi-match query on all defined search_attributes // $productListing->addQueryCondition($term); @@ -275,22 +276,22 @@ public function searchAction(Request $request, ListHelper $listHelper, Factory $ 'function_score' => [ 'query' => [ 'multi_match' => [ - "query" => $term, - "type" => "cross_fields", - "operator" => "and", - "fields" => [ - "attributes.name^4", - "attributes.name.analyzed", - "attributes.name.analyzed_ngram", - "attributes.manufacturer_name^3", - "attributes.manufacturer_name.analyzed", - "attributes.manufacturer_name.analyzed_ngram", - "attributes.color", - "attributes.color.analyzed", - "attributes.color.analyzed_ngram", - "attributes.carClass", - "attributes.carClass.analyzed", - "attributes.carClass.analyzed_ngram" + 'query' => $term, + 'type' => 'cross_fields', + 'operator' => 'and', + 'fields' => [ + 'attributes.name^4', + 'attributes.name.analyzed', + 'attributes.name.analyzed_ngram', + 'attributes.manufacturer_name^3', + 'attributes.manufacturer_name.analyzed', + 'attributes.manufacturer_name.analyzed_ngram', + 'attributes.color', + 'attributes.color.analyzed', + 'attributes.color.analyzed_ngram', + 'attributes.carClass', + 'attributes.carClass.analyzed', + 'attributes.carClass.analyzed_ngram' ] ] ], @@ -310,8 +311,6 @@ public function searchAction(Request $request, ListHelper $listHelper, Factory $ ]; $productListing->addQueryCondition($query, 'searchTerm'); - - } else { //default mysql search query condition - would also work for elastic search in that way @@ -322,10 +321,8 @@ public function searchAction(Request $request, ListHelper $listHelper, Factory $ $productListing->addQueryCondition($t); } } - } - if (isset($params['autocomplete'])) { $resultset = []; $productListing->setLimit(10); @@ -360,7 +357,6 @@ public function searchAction(Request $request, ListHelper $listHelper, Factory $ $filterDefinition->getPageLimit() ); - $params['results'] = $paginator; $params['paginationVariables'] = $paginator->getPaginationData(); diff --git a/src/Controller/Web2printController.php b/src/Controller/Web2printController.php index 650ce3ab..8f013e30 100644 --- a/src/Controller/Web2printController.php +++ b/src/Controller/Web2printController.php @@ -53,6 +53,7 @@ public function defaultAction(Request $request) /** * * @param Request $request + * * @return Response * * @throws \Exception @@ -87,6 +88,7 @@ public function containerAction(Request $request) /** * @param Request $request + * * @return Response * * @throws \Exception diff --git a/src/Document/Areabrick/Blockquote.php b/src/Document/Areabrick/Blockquote.php index 7ed5b838..cd7f9da9 100644 --- a/src/Document/Areabrick/Blockquote.php +++ b/src/Document/Areabrick/Blockquote.php @@ -43,7 +43,6 @@ public function getEditableDialogBoxConfiguration(Editable $area, ?Editable\Area ] ]); - return $config; } diff --git a/src/Document/Areabrick/PersonalizedProductTeaser.php b/src/Document/Areabrick/PersonalizedProductTeaser.php index 17f4953d..3a17cee4 100644 --- a/src/Document/Areabrick/PersonalizedProductTeaser.php +++ b/src/Document/Areabrick/PersonalizedProductTeaser.php @@ -84,7 +84,7 @@ public function action(Info $info) $allowedSegmentGroups = [SegmentGetter::SEGMENT_GROUP_CAR_CLASS, SegmentGetter::SEGMENT_GROUP_MANUFACTURER]; $segmentCollection = $this->segmentTracker->getFilteredAssignments($this->visitorInfoStorage->getVisitorInfo(), $allowedSegmentGroups, 2); - if(empty($segmentCollection)) { + if (empty($segmentCollection)) { return; } @@ -98,7 +98,6 @@ public function action(Info $info) } $this->addRelationCondition($productList, $values); - } } @@ -112,27 +111,25 @@ public function action(Info $info) } } - protected function addRelationCondition(ProductListInterface $productList, $values) { - - if($productList instanceof DefaultMysql) { + protected function addRelationCondition(ProductListInterface $productList, $values) + { + if ($productList instanceof DefaultMysql) { $productList->addRelationCondition('segments', 'dest IN (' . implode(',', $values) . ')'); - } else if($productList instanceof AbstractElasticSearch) { + } elseif ($productList instanceof AbstractElasticSearch) { $productList->addRelationCondition('segments', ['terms' => ['relations.' . 'segments' => $values]]); } else { - throw new InvalidConfigException("Product List Type not supported"); + throw new InvalidConfigException('Product List Type not supported'); } - } - protected function setRandOrderKey(ProductListInterface $productList) { - - if($productList instanceof DefaultMysql) { + protected function setRandOrderKey(ProductListInterface $productList) + { + if ($productList instanceof DefaultMysql) { $productList->setOrderKey('RAND()'); - } else if($productList instanceof AbstractElasticSearch) { + } elseif ($productList instanceof AbstractElasticSearch) { //not possible } else { - throw new InvalidConfigException("Product List Type not supported"); + throw new InvalidConfigException('Product List Type not supported'); } - } } diff --git a/src/Kernel.php b/src/Kernel.php index 90aea28e..ba3dc928 100644 --- a/src/Kernel.php +++ b/src/Kernel.php @@ -31,9 +31,8 @@ public function registerBundlesToCollection(BundleCollection $collection) // activate bundle for SSO oauth login/register functionality if (class_exists('\Http\HttplugBundle\HttplugBundle')) { - $collection->addBundle( new \Http\HttplugBundle\HttplugBundle()); + $collection->addBundle(new \Http\HttplugBundle\HttplugBundle()); } $collection->addBundle(HWIOAuthBundle::class); - } } diff --git a/src/Model/Product/AccessoryPart.php b/src/Model/Product/AccessoryPart.php index c4e6703d..ceeababc 100644 --- a/src/Model/Product/AccessoryPart.php +++ b/src/Model/Product/AccessoryPart.php @@ -28,7 +28,8 @@ public function getOSName(): ?string return $this->getGeneratedName(); } - public function getProductName($language = null) { + public function getProductName($language = null) + { return ($this->getSeries() ? ($this->getSeries()->getName() . ' ') : '') . ($this->getMainCategory() ? ($this->getMainCategory()->getName($language) . ' ') : '') . diff --git a/src/Model/Product/Car.php b/src/Model/Product/Car.php index 9917a492..80b2df21 100644 --- a/src/Model/Product/Car.php +++ b/src/Model/Product/Car.php @@ -31,7 +31,8 @@ public function getOSName(): ?string return ($this->getManufacturer() ? $this->getManufacturer()->getName() . ' ' : '') . $this->getName(); } - public function getProductName($language = null) { + public function getProductName($language = null) + { return $this->getName($language); } @@ -178,5 +179,4 @@ public function getColorVariants(): array return []; } - } diff --git a/src/Sitemaps/CategoryGenerator.php b/src/Sitemaps/CategoryGenerator.php index af4a5072..af32e5c9 100644 --- a/src/Sitemaps/CategoryGenerator.php +++ b/src/Sitemaps/CategoryGenerator.php @@ -24,7 +24,7 @@ class CategoryGenerator extends AbstractElementGenerator { - function __construct(array $filters = [], array $processors = []) + public function __construct(array $filters = [], array $processors = []) { parent::__construct($filters, $processors); } diff --git a/src/Sitemaps/NewsGenerator.php b/src/Sitemaps/NewsGenerator.php index 8b420fce..eab26ac3 100644 --- a/src/Sitemaps/NewsGenerator.php +++ b/src/Sitemaps/NewsGenerator.php @@ -15,6 +15,7 @@ namespace App\Sitemaps; +use Pimcore\Localization\LocaleServiceInterface; use Pimcore\Model\DataObject\News; use Pimcore\Model\Document; use Pimcore\Sitemap\Element\AbstractElementGenerator; @@ -22,7 +23,6 @@ use Presta\SitemapBundle\Service\UrlContainerInterface; use Presta\SitemapBundle\Sitemap\Url\UrlConcrete; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Pimcore\Localization\LocaleServiceInterface; class NewsGenerator extends AbstractElementGenerator { diff --git a/src/Sitemaps/ProductGenerator.php b/src/Sitemaps/ProductGenerator.php index 9f488169..5cdce5c9 100644 --- a/src/Sitemaps/ProductGenerator.php +++ b/src/Sitemaps/ProductGenerator.php @@ -15,15 +15,14 @@ namespace App\Sitemaps; +use Pimcore\Bundle\EcommerceFrameworkBundle\Factory; +use Pimcore\Bundle\EcommerceFrameworkBundle\IndexService\ProductList\ProductListInterface; use Pimcore\Model\DataObject\Car; use Pimcore\Sitemap\Element\AbstractElementGenerator; use Pimcore\Sitemap\Element\GeneratorContext; use Presta\SitemapBundle\Service\UrlContainerInterface; use Presta\SitemapBundle\Sitemap\Url\UrlConcrete; use Symfony\Component\Routing\Generator\UrlGeneratorInterface; -use Pimcore\Bundle\EcommerceFrameworkBundle\Factory; -use Pimcore\Bundle\EcommerceFrameworkBundle\IndexService\ProductList\ProductListInterface; - class ProductGenerator extends AbstractElementGenerator { @@ -38,7 +37,7 @@ public function populate(UrlContainerInterface $urlContainer, string $section = $indexService = Factory::getInstance()->getIndexService(); $productListing = $indexService->getProductListForCurrentTenant(); - $productListing->addCondition("carClass IS NOT NULL", 'carClass'); + $productListing->addCondition('carClass IS NOT NULL', 'carClass'); $productListing->setVariantMode(ProductListInterface::VARIANT_MODE_VARIANTS_ONLY); $list = $productListing; diff --git a/src/Twig/Extension/Country.php b/src/Twig/Extension/Country.php index f0581f6a..95487551 100644 --- a/src/Twig/Extension/Country.php +++ b/src/Twig/Extension/Country.php @@ -28,6 +28,7 @@ public function getFilters() if (!empty($code)) { return Countries::getName($code, $displayLocale); } + return null; }) ]; diff --git a/src/Twig/Extension/NavigationExtension.php b/src/Twig/Extension/NavigationExtension.php index 8c65b7be..f128ecbd 100644 --- a/src/Twig/Extension/NavigationExtension.php +++ b/src/Twig/Extension/NavigationExtension.php @@ -76,7 +76,7 @@ public function getDataLinks(Document $document, Document $startNode) $navigation = $this->navigationHelper->build([ 'active' => $document, 'root' => $startNode, - 'pageCallback' => function($page, $document) { + 'pageCallback' => function ($page, $document) { if ($document->getProperty(self::NAVIGATION_EXTENSION_POINT_PROPERTY) == 'category' && $rootCategory = $document->getProperty(AbstractProductLinkGenerator::ROOT_CATEGORY_PROPERTY_NAME)) { foreach ($rootCategory->getChildren() as $category) { $categoryPage = new NavDocument([ diff --git a/src/Twig/Extension/PrintCatalogExtension.php b/src/Twig/Extension/PrintCatalogExtension.php index d6ddaf93..90d10aa2 100644 --- a/src/Twig/Extension/PrintCatalogExtension.php +++ b/src/Twig/Extension/PrintCatalogExtension.php @@ -24,8 +24,8 @@ use Pimcore\Model\DataObject\ClassDefinition\Data\Multiselect; use Pimcore\Model\DataObject\ClassDefinition\Data\Select; use Pimcore\Model\Element\AbstractElement; -use Pimcore\Twig\Extension\Templating\Placeholder; use Pimcore\Translation\Translator; +use Pimcore\Twig\Extension\Templating\Placeholder; use Twig\Extension\AbstractExtension; use Twig\TwigFunction; diff --git a/src/Twig/Extension/ProductPageExtension.php b/src/Twig/Extension/ProductPageExtension.php index 60c1950c..b4908070 100644 --- a/src/Twig/Extension/ProductPageExtension.php +++ b/src/Twig/Extension/ProductPageExtension.php @@ -62,6 +62,7 @@ public function getFilters() /** * @param ProductInterface $product + * * @return string */ public function generateLink(ProductInterface $product): string diff --git a/src/Website/LinkGenerator/AbstractProductLinkGenerator.php b/src/Website/LinkGenerator/AbstractProductLinkGenerator.php index a10a29f3..7d04dfe6 100644 --- a/src/Website/LinkGenerator/AbstractProductLinkGenerator.php +++ b/src/Website/LinkGenerator/AbstractProductLinkGenerator.php @@ -57,7 +57,7 @@ public function __construct(DocumentResolver $documentResolver, RequestStack $re public function getNavigationPath(?Category $category, ?Category $rootCategory = null) { if (empty($rootCategory)) { - if(!$this->document) { + if (!$this->document) { try { $this->document = $this->documentResolver->getDocument($this->requestStack->getCurrentRequest()); } catch (\Exception $e) { diff --git a/src/Website/LinkGenerator/NewsLinkGenerator.php b/src/Website/LinkGenerator/NewsLinkGenerator.php index 507fd733..ca544a76 100644 --- a/src/Website/LinkGenerator/NewsLinkGenerator.php +++ b/src/Website/LinkGenerator/NewsLinkGenerator.php @@ -90,7 +90,7 @@ public function generate(Concrete $object, array $params = []): string $fullPath = substr($document->getFullPath(), strlen($localeUrlPart)); } - if($document && !$fullPath) { + if ($document && !$fullPath) { $fullPath = $document->getProperty('news_default_document') ? substr($document->getProperty('news_default_document')->getFullPath(), strlen($localeUrlPart)) : ''; } diff --git a/src/Website/LinkGenerator/ProductLinkGenerator.php b/src/Website/LinkGenerator/ProductLinkGenerator.php index 3e27bb08..a5b1e470 100644 --- a/src/Website/LinkGenerator/ProductLinkGenerator.php +++ b/src/Website/LinkGenerator/ProductLinkGenerator.php @@ -48,21 +48,24 @@ public function generate(Concrete $object, array $params = []): string /** * @param ProductInterface $object * @param array $params + * * @return string */ - public function generateWithMockup(ProductInterface $object, array $params = []): string { + public function generateWithMockup(ProductInterface $object, array $params = []): string + { return $this->doGenerate($object, $params); } /** * @param $object * @param $params + * * @return string */ protected function doGenerate($object, $params): string { return ForceInheritance::run(function () use ($object, $params) { - if(!empty($object->getUrlSlug())) { + if (!empty($object->getUrlSlug())) { return current($object->getUrlSlug())->getSlug(); } diff --git a/src/Website/Navigation/BreadcrumbHelperService.php b/src/Website/Navigation/BreadcrumbHelperService.php index e316c959..2aa650b1 100644 --- a/src/Website/Navigation/BreadcrumbHelperService.php +++ b/src/Website/Navigation/BreadcrumbHelperService.php @@ -21,8 +21,8 @@ use Pimcore\Model\DataObject\AbstractObject; use Pimcore\Model\DataObject\News; use Pimcore\Model\Document; -use Pimcore\Twig\Extension\Templating\Placeholder; use Pimcore\Translation\Translator; +use Pimcore\Twig\Extension\Templating\Placeholder; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\Routing\Generator\UrlGeneratorInterface;