Skip to content

Commit

Permalink
[Maintenance] Remove deprecation notice
Browse files Browse the repository at this point in the history
  • Loading branch information
lchrusciel committed Dec 11, 2024
1 parent 88c81b8 commit e2a6e15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions src/Tpay/Resolver/TpayTransactionChannelResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,16 @@ final class TpayTransactionChannelResolver implements TpayTransactionChannelReso
{
public function __construct(
private readonly Payum $payum,
private readonly ?GetTpayTransactionsChannelsFactoryInterface $getTpayTransactionsChannelsFactory = null,
private readonly GetTpayTransactionsChannelsFactoryInterface $getTpayTransactionsChannelsFactory,
private readonly ?LoggerInterface $logger = null,
) {
if (null === $this->getTpayTransactionsChannelsFactory) {
trigger_deprecation(
'commerce-weavers/sylius-tpay-plugin',
'1.0',
'Not passing a $getTpayTransactionsChannelsFactory to %s constructor is deprecated and will be removed in SyliusTpayPlugin 2.0.',
self::class,
);
}
}

public function resolve(): array
{
$gateway = $this->payum->getGateway(GatewayFactory::NAME);

$value = $this->getTpayTransactionsChannelsFactory?->createNewEmpty()
?? new GetTpayTransactionsChannels(new ArrayObject());
$value = $this->getTpayTransactionsChannelsFactory->createNewEmpty();

try {
$gateway->execute($value, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(
private readonly ?ProductionModeCheckerInterface $productionModeChecker = null,
) {
if (null === $this->productionModeChecker) {
trigger_deprecation(
(
'commerce-weavers/sylius-tpay-plugin',
'1.0',
'Not passing a $productionModeChecker to %s constructor is deprecated and will be removed in SyliusTpayPlugin 2.0.',
Expand Down

0 comments on commit e2a6e15

Please sign in to comment.