Skip to content

Commit

Permalink
[FIX] Establish basic compatibility for TYPO3 v11
Browse files Browse the repository at this point in the history
  • Loading branch information
krausandre committed Feb 24, 2022
1 parent 881e2b6 commit ead4cef
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 8 deletions.
16 changes: 15 additions & 1 deletion Classes/EventListener/Order/Payment/ClearCart.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,23 @@
*/

use Extcode\Cart\Event\Order\EventInterface;
use Extcode\Cart\EventListener\Order\Finish\ClearCart as FinishClearCart;
use Extcode\Cart\Service\SessionHandler;
use Extcode\Cart\Utility\CartUtility;
use Extcode\Cart\Utility\ParserUtility;

class ClearCart extends \Extcode\Cart\EventListener\ProcessOrderCreate\ClearCart
class ClearCart extends FinishClearCart
{
public function __construct(
CartUtility $cartUtility,
ParserUtility $parserUtility,
SessionHandler $sessionHandler
) {
$this->cartUtility = $cartUtility;
$this->parserUtility = $parserUtility;
$this->sessionHandler = $sessionHandler;
}

public function __invoke(EventInterface $event): void
{
$orderItem = $event->getOrderItem();
Expand Down
4 changes: 4 additions & 0 deletions Configuration/Services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ services:
$paymentRepository: '@Extcode\Cart\Domain\Repository\Order\PaymentRepository'

Extcode\CartPaypal\EventListener\Order\Payment\ClearCart:
arguments:
$cartUtility: '@Extcode\Cart\Utility\CartUtility'
$parserUtility: '@Extcode\Cart\Utility\ParserUtility'
$sessionHandler: '@Extcode\Cart\Service\SessionHandler'
tags:
- name: event.listener
identifier: 'cart-paypal--order--payment--clear-cart'
Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/Overrides/sys_template.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
defined('TYPO3_MODE') or die();
defined('TYPO3') or die();

call_user_func(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined('TYPO3_MODE') or die();
defined('TYPO3') or die();

$_LLL = 'LLL:EXT:cart_paypal/Resources/Private/Language/locallang_db.xlf';

Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"PayPal",
"cart"
],
"version": "5.1.0",
"authors": [
{
"name": "Daniel Gohlke",
Expand Down Expand Up @@ -41,10 +42,10 @@
"require": {
"php": ">=7.2.0 <7.5",
"ext-curl": "*",
"typo3/cms-core": "^10.4",
"typo3/cms-extbase": "^10.4",
"typo3/cms-frontend": "^10.4",
"extcode/cart": "^7.4"
"typo3/cms-core": "^11.5",
"typo3/cms-extbase": "^11.5",
"typo3/cms-frontend": "^11.5",
"extcode/cart": "^8.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.14",
Expand Down
2 changes: 1 addition & 1 deletion ext_localconf.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined('TYPO3_MODE') or die();
defined('TYPO3') or die();

// configure plugins

Expand Down

0 comments on commit ead4cef

Please sign in to comment.