Skip to content

Commit

Permalink
[TASK] Remove v12 deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
rintisch committed Mar 24, 2024
1 parent f09d45f commit cdd5968
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 20 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/Backend/ActionController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected function initializeAction(): void
ConfigurationManager::CONFIGURATION_TYPE_FRAMEWORK
);

$pageId = (int)(GeneralUtility::_GET('id')) ? GeneralUtility::_GET('id') : 1;
$pageId = (int)$this->request->getQueryParams()['id'] ?? 1;

BackendUtility::readPageAccess(
$pageId,
Expand Down
5 changes: 2 additions & 3 deletions Classes/Controller/Backend/Order/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
use TYPO3\CMS\Backend\Template\ModuleTemplate;
use TYPO3\CMS\Backend\Template\ModuleTemplateFactory;
use TYPO3\CMS\Core\Imaging\IconFactory;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Pagination\SimplePagination;
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Annotation\IgnoreValidation;
use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator;
use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
Expand Down Expand Up @@ -177,7 +176,7 @@ public function generateNumberAction(Item $orderItem, string $numberType): void
'Cart'
);

$this->addFlashMessage($msg, '', AbstractMessage::ERROR);
$this->addFlashMessage($msg, '', ContextualFeedbackSeverity::ERROR);
}

$this->redirect('show', 'Backend\Order\Order', null, ['orderItem' => $orderItem]);
Expand Down
16 changes: 8 additions & 8 deletions Classes/Controller/Cart/CouponController.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use Extcode\Cart\Domain\Model\Coupon;
use Extcode\Cart\Domain\Repository\CouponRepository;
use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;

Expand Down Expand Up @@ -71,7 +71,7 @@ public function addAction(): ResponseInterface
'Cart'
),
'',
AbstractMessage::OK,
ContextualFeedbackSeverity::OK,
true
);
}
Expand All @@ -82,7 +82,7 @@ public function addAction(): ResponseInterface
'Cart'
),
'',
AbstractMessage::WARNING,
ContextualFeedbackSeverity::WARNING,
true
);
}
Expand All @@ -93,7 +93,7 @@ public function addAction(): ResponseInterface
'Cart'
),
'',
AbstractMessage::WARNING,
ContextualFeedbackSeverity::WARNING,
true
);
}
Expand All @@ -104,7 +104,7 @@ public function addAction(): ResponseInterface
'Cart'
),
'',
AbstractMessage::WARNING,
ContextualFeedbackSeverity::WARNING,
true
);
}
Expand All @@ -115,7 +115,7 @@ public function addAction(): ResponseInterface
'Cart'
),
'',
AbstractMessage::WARNING,
ContextualFeedbackSeverity::WARNING,
true
);
}
Expand All @@ -142,7 +142,7 @@ public function removeAction(): ResponseInterface
'Cart'
),
'',
AbstractMessage::OK,
ContextualFeedbackSeverity::OK,
true
);
}
Expand All @@ -153,7 +153,7 @@ public function removeAction(): ResponseInterface
'Cart'
),
'',
AbstractMessage::WARNING,
ContextualFeedbackSeverity::WARNING,
true
);
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/Cart/PaymentController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;

class PaymentController extends ActionController
Expand All @@ -37,7 +37,7 @@ public function updateAction(int $paymentId): ResponseInterface
'Cart'
),
'',
AbstractMessage::ERROR,
ContextualFeedbackSeverity::ERROR,
true
);
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/Cart/ShippingController.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;

class ShippingController extends ActionController
Expand All @@ -37,7 +37,7 @@ public function updateAction(int $shippingId): ResponseInterface
'Cart'
),
'',
AbstractMessage::ERROR,
ContextualFeedbackSeverity::ERROR,
true
);
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Controller/Order/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
use Extcode\Cart\Domain\Model\Order\Item;
use Extcode\Cart\Domain\Repository\Order\ItemRepository;
use Psr\Http\Message\ResponseInterface;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Pagination\SimplePagination;
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Annotation\IgnoreValidation;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
Expand Down Expand Up @@ -80,7 +80,7 @@ public function showAction(Item $orderItem): ResponseInterface
$this->addFlashMessage(
'Access denied.',
'',
AbstractMessage::ERROR
ContextualFeedbackSeverity::ERROR
);
$this->redirect('list');
}
Expand Down
4 changes: 2 additions & 2 deletions Classes/Domain/Finisher/Form/AddToCartFinisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
use Extcode\Cart\Utility\CartUtility;
use TYPO3\CMS\Core\Http\PropagateResponseException;
use TYPO3\CMS\Core\Http\StreamFactory;
use TYPO3\CMS\Core\Messaging\AbstractMessage;
use TYPO3\CMS\Core\Messaging\FlashMessage;
use TYPO3\CMS\Core\Messaging\FlashMessageService;
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Service\ExtensionService;
Expand Down Expand Up @@ -90,7 +90,7 @@ protected function executeInternal(): ?string
$status = '200';
$messageBody = $this->getStatusMessageBody($formValues, $status);
$messageTitle = $this->getStatusMessageTitle($formValues);
$severity = AbstractMessage::OK;
$severity = ContextualFeedbackSeverity::OK;

$pageType = $GLOBALS['TYPO3_REQUEST']->getAttribute('routing')->getPageType();
if (in_array((int)$pageType, $this->configurations['settings']['jsonResponseForPageTypes'])) {
Expand Down

0 comments on commit cdd5968

Please sign in to comment.