Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pimcore X] make compatible and fix deprecation notes #1511

Merged
merged 76 commits into from
Dec 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
c157b63
[]Pimcore 7] make compatible and fix deprecation notes
dpfaffenbauer Nov 2, 2020
ecf0ed5
Merge branch 'master' into pimcore7
dpfaffenbauer Nov 2, 2020
631b62c
[Pimcore 7] make compatible and fix deprecation notes
dpfaffenbauer Nov 2, 2020
9fda6c3
[Theme] migrate to sylius/theme-bundle
dpfaffenbauer Nov 2, 2020
f67a451
[Pimcore7] fix resource-loader
dpfaffenbauer Nov 2, 2020
9427b15
stan fixes
dpfaffenbauer Nov 2, 2020
5247fea
Merge branch 'master' into features/sylius-theme
dpfaffenbauer Nov 10, 2020
93d93cf
[StoreBundle] fix profiler store-collector
dpfaffenbauer Nov 12, 2020
9d3e4fb
[Pimcore] Support 6.9 and 7.0
dpfaffenbauer Nov 12, 2020
d9f22b3
[Pimcore] add missing dir
dpfaffenbauer Nov 12, 2020
7ebccce
[Pimcore] fix translator contract
dpfaffenbauer Nov 12, 2020
89d0cce
[Pimcore7] stan issues and doctrine deprecations
dpfaffenbauer Nov 12, 2020
a3e3a40
[Pimcore7] stan issues and doctrine deprecations
dpfaffenbauer Nov 12, 2020
bf3367d
[Pimcore7] fix traversable
dpfaffenbauer Nov 12, 2020
17d8b1e
[Pimcore7] stan issues and doctrine deprecations
dpfaffenbauer Nov 12, 2020
6c3c8b2
[Pimcore7] fix warning in installer
dpfaffenbauer Nov 12, 2020
3657f28
[Pimcore7] fix doctrine deprecations
dpfaffenbauer Nov 12, 2020
c1a4ffa
[Pimcore7] bc fix
dpfaffenbauer Nov 12, 2020
23befc9
[Behat] fix tests
dpfaffenbauer Nov 12, 2020
73c1e00
[Behat] fixes
dpfaffenbauer Nov 12, 2020
3259c8c
[Behat] fixes
dpfaffenbauer Nov 12, 2020
d244780
[Behat] fixes
dpfaffenbauer Nov 13, 2020
353f446
[Behat] fixes
dpfaffenbauer Nov 13, 2020
06e41b7
[Behat] fixes
dpfaffenbauer Nov 13, 2020
56f49fa
[Behat] fixes
dpfaffenbauer Nov 13, 2020
525f53b
[Pimcore7] remove bc stuff and deprecate object/asset/document twig h…
dpfaffenbauer Nov 13, 2020
a5f15ed
[Pimcore7] fix controller and route setup for new structure
dpfaffenbauer Nov 23, 2020
394d465
[Pimcore7] remove doctrine-bundle -> comes from Pimcore
dpfaffenbauer Nov 23, 2020
a476b38
Merge branch 'features/sylius-theme' into pimcore7
dpfaffenbauer Nov 23, 2020
115aee7
[Pimcore7] fixes for Symfony 5
dpfaffenbauer Nov 23, 2020
c32fad9
[Pimcore7] test fixes
dpfaffenbauer Nov 23, 2020
61abfda
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
54ebba8
Merge branch 'master' into pimcore7
dpfaffenbauer Dec 8, 2020
b16bf46
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
c3a09db
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
ee0ad1a
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
6797228
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
ede54d7
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
7a78c3c
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
805a7ad
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
fc2a53c
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
06b4da9
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
73bc959
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
1db6802
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
58420c9
[PimcoreX] more fixes
dpfaffenbauer Dec 8, 2020
b88f1c2
[PimcoreX] remove php 8 support by now, the dependencies of pimcore d…
dpfaffenbauer Dec 11, 2020
d4c618d
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
e7eb09d
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
b488e0f
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
f56030e
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
63476ff
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
40711bc
[PimcoreX] remove doctrine cache bundle
dpfaffenbauer Dec 11, 2020
4e71732
[PimcoreX] remove doctrine cache bundle
dpfaffenbauer Dec 11, 2020
bba1d04
[PimcoreX] fixes for OrderBundle
dpfaffenbauer Dec 11, 2020
456c821
[PimcoreX] introduce type declarations in CoreShop
dpfaffenbauer Dec 11, 2020
0d3af22
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
f5145d3
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
2cb1654
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
635707b
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
420456a
[PimcoreX] mink debug
dpfaffenbauer Dec 11, 2020
58e142f
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
53c838c
[PimcoreX] mink debug
dpfaffenbauer Dec 11, 2020
3627b4a
[PimcoreX] fixes
dpfaffenbauer Dec 11, 2020
6b591a1
[PimcoreX] fixes
dpfaffenbauer Dec 12, 2020
3cc53fc
[PimcoreX] fixes
dpfaffenbauer Dec 14, 2020
93853a1
[PimcoreX] UI Tests
dpfaffenbauer Dec 15, 2020
c5a7f92
[PimcoreX] flex structure
dpfaffenbauer Dec 15, 2020
4961066
[PimcoreX] flex structure
dpfaffenbauer Dec 15, 2020
e747083
[PimcoreX] flex structure
dpfaffenbauer Dec 15, 2020
f6ac404
[PimcoreX] flex structure
dpfaffenbauer Dec 16, 2020
0364a1a
[PimcoreX] flex structure
dpfaffenbauer Dec 16, 2020
e9b7772
[PimcoreX] flex structure
dpfaffenbauer Dec 16, 2020
673ffa6
[PimcoreX] flex structure
dpfaffenbauer Dec 16, 2020
2403541
[PimcoreX] add logout test
dpfaffenbauer Dec 16, 2020
b25a72b
[PimcoreX] make cart logout test wip - no idea why it is failing on g…
dpfaffenbauer Dec 16, 2020
3d861a9
remove some configs
dpfaffenbauer Dec 16, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[PimcoreX] UI Tests
  • Loading branch information
dpfaffenbauer committed Dec 15, 2020
commit 93853a1fefeb7aee7a8921ccb916fbf4c5d4b77b
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ parameters.yml
var
.env
composer.lock
docker-compose.yml
docker-compose.yaml
app/config/local/
app/config/pimcore/
.php-version
4 changes: 0 additions & 4 deletions app/config/config_stan.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
imports:
- { resource: config.yml }

pimcore:
cache:
pool_service_id: pimcore.cache.core.pool.array

doctrine:
dbal:
connections:
Expand Down
5 changes: 0 additions & 5 deletions app/config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ imports:
- { resource: config.yml }
- { resource: '../../src/CoreShop/Behat/Resources/config/services.yml' }

# this cache is used during tests when setting up pimcore
pimcore:
cache:
pool_service_id: pimcore.cache.core.pool.array

doctrine:
dbal:
connections:
Expand Down
Binary file modified bin/chromedriver-bin/chromedriver.exe
Binary file not shown.
Binary file modified bin/chromedriver-bin/chromedriver_linux64
Binary file not shown.
Binary file modified bin/chromedriver-bin/chromedriver_mac64
Binary file not shown.
36 changes: 18 additions & 18 deletions bin/chromedriver-bin/notes.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
---------ChromeDriver 83.0.4103.39 (2020-05-05)---------
Supports Chrome version 83
Resolved issue 1778: Deprecate launchApp from ChromeDriver [Pri-2]
Resolved issue 2520: InitSession can wait forever when Chrome is unresponsive [Pri-3]
Resolved issue 3120: Headless mode download from new tab [Pri-2]
Resolved issue 3234: Confirm semicolon found before substring [Pri-3]
Resolved issue 3240: ExecuteGetElementRect does not check returned status from GET_SIZE [Pri-2]
Resolved issue 3331: The get_cookies() method is returning 'expiry' keys of type double, but should be int64 in w3c mode [Pri-2]
Resolved issue 3332: Retry timeout logged as severe [Pri-2]
Resolved issue 3339: Chromedriver exited unexpectedly with code null, signal SIGTRAP [Pri-2]
Resolved issue 3351: Improve Security Considerations message [Pri-2]
Resolved issue 3352: Support SendKeys for color elements [Pri-2]
Resolved issue 3353: Wait for Pending Navigation continues after frame context destroyed [Pri-2]
Resolved issue 3375: Chromedriver v80 hangs on getPageSource on some sites [Pri-1]
Resolved issue 3383: ChromeDriver 80+ on Windows seems to exit or stall on certain element or click commands [Pri-1]
Resolved issue 3399: Remove wasThrown check [Pri-3]
Resolved issue 3421: chromedriver 81. Driver returns Cyrillic text without styles [Pri-2]
Resolved issue 3422: GetElementText breaks with prototype 1.6.0.3 and chromedriver 81 [Pri-]
---------ChromeDriver 87.0.4280.88 (2020-12-02)---------
Supports Chrome version 87
Resolved issue 2421: Delete old port-forwarding channels on android adb-server
[Pri-3]
Resolved issue 3474: Emulated mobile device list needs updating [Pri-3]
Resolved issue 3507: Implement "get computed role" [Pri-]
Resolved issue 3508: Implement "get computed label" [Pri-]
Resolved issue 3584: Rename ChromeDriver command line option --whitelisted-ips
[Pri-2]
Resolved issue 3588: Bidi WebSocket connection [Pri-]
Resolved issue 3594: Navigation completes prematurely if OOPIF loads before main
page [Pri-2]
Resolved issue 3598: A command line option for devtools port to be forwarded to
webview_devtools_remote socket. [Pri-]
Resolved issue 3608: Chromedriver debuggerAddress does not support ipv6 [Pri-]
Resolved issue 3641: Page not getting loaded/rendered when browser window is not
in focus with Chrome Beta v87 and chromedriver v(87/86)
Resolved issue 3657: Screenshot background browser timed out
13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,13 @@
"jms/serializer-bundle": "^3.7",
"knplabs/knp-menu-bundle": "^3.0.0",
"sylius/theme-bundle": "^2.1",
"payum/offline": "^1.4",
"payum/paypal-express-checkout-nvp": "^1.4",
"payum/payum-bundle": "^2.2",
"payum/sofort": "^1.4",
"php-http/guzzle6-adapter": "^2.0",
"pimcore/pimcore": "^10.0.0",
"rinvex/countries": "^6.0",
"stof/doctrine-extensions-bundle": "^1.5",
"webmozart/assert": "^1.2"
"webmozart/assert": "^1.2",
"payum/payum": "dev-master",
"payum/payum-bundle": "dev-master"
},
"require-dev": {
"behat/behat": "^3.3",
Expand All @@ -105,9 +103,10 @@
"symplify/easy-coding-standard": "^9.0.0",
"behat/mink": "^1.8",
"friends-of-behat/mink-extension": "^2.4",
"coreshop/behat-panther-extension": "^1.0",
"lakion/mink-debug-extension": "^2.0",
"friends-of-behat/mink-debug-extension": "^2.0"
"friends-of-behat/mink-debug-extension": "^2.0",
"phpunit/phpunit": "^9.5",
"robertfausk/behat-panther-extension": "^1.0"
},
"conflict": {
"dpfaffenbauer/process-manager": "<2.4",
Expand Down
6 changes: 3 additions & 3 deletions src/CoreShop/Behat/Context/Setup/StoreContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ private function createStore($name, CurrencyInterface $currency = null, CountryI
$country->setAddressFormat('
{{ company }}
{{ salutation }} {{ firstname }} {{ lastname }}
{{ street }};
{{ postCode }};
{{ country.name }};
{{ street }}
{{ postcode }}
{{ country.name }}
');

$this->entityManager->persist($country);
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Behat/Resources/config/profiles/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ui:
# external_converted_uri: "http://localhost:9080/app_test.php"
show_auto: false

CoreShop\Behat\PantherExtension: ~
Robertfausk\Behat\PantherExtension: ~

gherkin:
filters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ui_precision:
# external_converted_uri: "http://localhost:9080/app_test_precision.php"
show_auto: false

CoreShop\Behat\PantherExtension: ~
Robertfausk\Behat\PantherExtension: ~

gherkin:
filters:
Expand Down
24 changes: 3 additions & 21 deletions src/CoreShop/Behat/Resources/config/suites.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,4 @@
imports:
- suites/domain/product.yml
- suites/domain/currency.yml
- suites/domain/taxation.yml
- suites/domain/cart.yml
- suites/domain/category.yml
- suites/domain/shipping.yml
- suites/domain/country.yml
- suites/domain/index.yml
- suites/domain/index_condition.yml
- suites/domain/pimcore.yml
- suites/domain/order.yml
- suites/domain/seo.yml
- suites/domain/cli.yml
- suites/domain/filter.yml
- suites/domain/tracking.yml
- suites/domain/theme.yml
- suites/domain/product_quantity_price_rules.yml
- suites/domain/menu.yml
- suites/domain/version.yml
- suites/domain/recycle_bin.yml
- suites/domain/optimistic_entity_lock.yml
- suites/domain.yml
- suites/ui.yml
- suites/ui_pimcore.yml
1 change: 1 addition & 0 deletions src/CoreShop/Behat/Resources/config/suites/domain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ imports:
- domain/menu.yml
- domain/version.yml
- domain/recycle_bin.yml
- domain/optimistic_entity_lock.yml
8 changes: 7 additions & 1 deletion src/CoreShop/Behat/Service/CookieSetter.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
namespace CoreShop\Behat\Service;

use Behat\Mink\Driver\PantherDriver;
use Behat\Mink\Exception\DriverException;
use Behat\Mink\Session;
use Symfony\Component\BrowserKit\Cookie;

Expand Down Expand Up @@ -61,7 +62,12 @@ private function shouldMinkSessionBePrepared(Session $session): bool
{
$driver = $session->getDriver();

if ($driver instanceof PantherDriver && $driver->getClient() === null) {
try {
if ($driver instanceof PantherDriver && $driver->getClient() === null) {
return true;
}
}
catch (DriverException $e) {
return true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public function findForProduct(ProductInterface $product): array
->andWhere('o.product = :product')
->setParameter('product', $product->getId())
->getQuery()
->useResultCache(false)
->useQueryCache(true)
->getResult();
}
Expand All @@ -46,7 +45,6 @@ public function findForProductAndStore(ProductInterface $product, StoreInterface
->setParameter('product', $product->getId())
->setParameter('store', $store)
->getQuery()
->useResultCache(false)
->useQueryCache(true)
->getOneOrNullResult();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,24 +20,14 @@

final class NotificationRuleListener implements NotificationRuleListenerInterface
{
/**
* @var string
*/
private $cacheDir;

/**
* @var array
*/
private $firedEvents = [];

public function __construct(string $cacheDir)
{
$this->cacheDir = $cacheDir;
}

/**
* {@inheritdoc}
*/
public function hasBeenFired($type)
{
$finder = new Finder();
Expand All @@ -46,9 +36,6 @@ public function hasBeenFired($type)
return $finder->count() > 0;
}

/**
* {@inheritdoc}
*/
public function clear()
{
if (!is_dir($this->cacheDir)) {
Expand All @@ -65,9 +52,6 @@ public function clear()
}
}

/**
* {@inheritdoc}
*/
public function applyNewFired(GenericEvent $type)
{
$data = [
Expand All @@ -76,7 +60,7 @@ public function applyNewFired(GenericEvent $type)
];

if (!is_dir($this->cacheDir)) {
mkdir($this->cacheDir);
mkdir($this->cacheDir, 0777, true);
}

file_put_contents(sprintf('%s/%s.%s.notification', $this->cacheDir, uniqid(), $type->getSubject()), serialize($data));
Expand Down
10 changes: 5 additions & 5 deletions src/CoreShop/Bundle/FrontendBundle/Controller/CartController.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class CartController extends FrontendController
*/
public function widgetAction(Request $request)
{
return $this->renderTemplate($this->templateConfigurator->findTemplate('Cart/_widget.html'), [
return $this->render($this->templateConfigurator->findTemplate('Cart/_widget.html'), [
'cart' => $this->getCart(),
]);
}
Expand All @@ -75,7 +75,7 @@ public function summaryAction(Request $request)
if (!$voucherCode instanceof CartPriceRuleVoucherCodeInterface) {
$this->addFlash('error', $this->get('translator')->trans('coreshop.ui.error.voucher.not_found'));

return $this->renderTemplate($this->templateConfigurator->findTemplate('Cart/summary.html'), [
return $this->render($this->templateConfigurator->findTemplate('Cart/summary.html'), [
'cart' => $this->getCart(),
'form' => $form->createView(),
]);
Expand All @@ -101,7 +101,7 @@ public function summaryAction(Request $request)
}
}

return $this->renderTemplate($this->templateConfigurator->findTemplate('Cart/summary.html'), [
return $this->render($this->templateConfigurator->findTemplate('Cart/summary.html'), [
'cart' => $cart,
'form' => $form->createView(),
]);
Expand Down Expand Up @@ -150,7 +150,7 @@ public function shipmentCalculationAction(Request $request)
});
}

return $this->renderTemplate($this->templateConfigurator->findTemplate('Cart/ShipmentCalculator/_widget.html'), [
return $this->render($this->templateConfigurator->findTemplate('Cart/ShipmentCalculator/_widget.html'), [
'cart' => $cart,
'form' => $form->createView(),
'availableCarriers' => $availableCarriers,
Expand Down Expand Up @@ -235,7 +235,7 @@ public function addItemAction(Request $request)
]);
}

return $this->renderTemplate(
return $this->render(
$request->get('template', $this->templateConfigurator->findTemplate('Product/_addToCart.html')),
[
'form' => $form->createView(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function menuAction(Request $request)
{
$categories = $this->getRepository()->findForStore($this->getContext()->getStore());

return $this->renderTemplate($this->templateConfigurator->findTemplate('Category/_menu.html'), [
return $this->render($this->templateConfigurator->findTemplate('Category/_menu.html'), [
'categories' => $categories,
]);
}
Expand All @@ -89,7 +89,7 @@ public function menuLeftAction(Request $request)
$activeSubCategories = $this->getRepository()->findChildCategoriesForStore($activeCategory, $this->getContext()->getStore());
}

return $this->renderTemplate($this->templateConfigurator->findTemplate('Category/_menu-left.html'), [
return $this->render($this->templateConfigurator->findTemplate('Category/_menu-left.html'), [
'categories' => $firstLevelCategories,
'activeCategory' => $activeCategory,
'activeSubCategories' => $activeSubCategories,
Expand Down Expand Up @@ -222,7 +222,7 @@ public function indexAction(Request $request)

$this->get(SEOPresentationInterface::class)->updateSeoMetadata($category);

return $this->renderTemplate($this->templateConfigurator->findTemplate('Category/index.html'), $viewParameters);
return $this->render($this->templateConfigurator->findTemplate('Category/index.html'), $viewParameters);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public function processAction(Request $request)

$event = new CheckoutEvent($this->getCart(), ['step' => $step, 'step_identifier', $stepIdentifier]);

$this->get('event_dispatcher')->dispatch(CheckoutEvents::CHECKOUT_STEP_PRE, $event);
$this->get('event_dispatcher')->dispatch($event, CheckoutEvents::CHECKOUT_STEP_PRE);

if ($event->isStopped()) {
$this->addEventFlash($event->getMessageType(), $event->getMessage(), $event->getMessageParameters());
Expand Down Expand Up @@ -144,7 +144,7 @@ public function processAction(Request $request)

$event = new CheckoutEvent($this->getCart(), ['step' => $step, 'step_identifier', $stepIdentifier, 'step_params' => $dataForStep]);

$this->get('event_dispatcher')->dispatch(CheckoutEvents::CHECKOUT_STEP_POST, $event);
$this->get('event_dispatcher')->dispatch($event, CheckoutEvents::CHECKOUT_STEP_POST);

if ($event->isStopped()) {
$this->addEventFlash($event->getMessageType(), $event->getMessage(), $event->getMessageParameters());
Expand All @@ -171,7 +171,7 @@ protected function renderResponseForCheckoutStep(Request $request, CheckoutStepI
{
$template = $this->templateConfigurator->findTemplate(sprintf('Checkout/steps/%s.html', $stepIdentifier));

return $this->renderTemplate($template, $dataForStep);
return $this->render($template, $dataForStep);
}

/**
Expand Down Expand Up @@ -216,7 +216,7 @@ public function doCheckoutAction(Request $request)

$event = new CheckoutEvent($this->getCart());

$this->get('event_dispatcher')->dispatch(CheckoutEvents::CHECKOUT_DO_PRE, $event);
$this->get('event_dispatcher')->dispatch($event, CheckoutEvents::CHECKOUT_DO_PRE);

if ($event->isStopped()) {
$this->addEventFlash($event->getMessageType(), $event->getMessage(), $event->getMessageParameters());
Expand Down Expand Up @@ -253,14 +253,14 @@ public function doCheckoutAction(Request $request)

$request->getSession()->set('coreshop_order_id', $order->getId());

$this->get('event_dispatcher')->dispatch(CheckoutEvents::CHECKOUT_DO_POST, new CheckoutEvent($this->getCart(), ['order' => $order]));
$this->get('event_dispatcher')->dispatch(new CheckoutEvent($this->getCart(), ['order' => $order]), CheckoutEvents::CHECKOUT_DO_POST);

$response = $this->redirectToRoute('coreshop_checkout_confirmation');
}

$event = new CheckoutEvent($this->getCart(), ['order' => $order]);

$this->get('event_dispatcher')->dispatch(CheckoutEvents::CHECKOUT_DO_POST, $event);
$this->get('event_dispatcher')->dispatch($event, CheckoutEvents::CHECKOUT_DO_POST);

if ($event->isStopped()) {
$this->addEventFlash($event->getMessageType(), $event->getMessage(), $event->getMessageParameters());
Expand Down Expand Up @@ -302,7 +302,7 @@ public function errorAction(Request $request)
$payments = $this->get('coreshop.repository.payment')->findForPayable($order);
$lastPayment = is_array($payments) ? $payments[count($payments) - 1] : null;

return $this->renderTemplate($this->templateConfigurator->findTemplate('Checkout/error.html'), [
return $this->render($this->templateConfigurator->findTemplate('Checkout/error.html'), [
'order' => $order,
'payments' => $payments,
'lastPayment' => $lastPayment,
Expand Down Expand Up @@ -334,7 +334,7 @@ public function thankYouAction(Request $request)
$this->get('security.token_storage')->setToken(null);
}

return $this->renderTemplate($this->templateConfigurator->findTemplate('Checkout/thank-you.html'), [
return $this->render($this->templateConfigurator->findTemplate('Checkout/thank-you.html'), [
'order' => $order,
]);
}
Expand Down
Loading