Skip to content

Commit accb0fe

Browse files
Merge pull request #10 from Roshyo/fix-deprecation-and-notices
Fix deprecation of ShippingMethodEligibilityCheckerInterface
2 parents 31d866b + 253ff1b commit accb0fe

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

src/Checker/TableRateShippingMethodEligibilityChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Webgriffe\SyliusTableRateShippingPlugin\Checker;
66

77
use Sylius\Component\Core\Model\ShipmentInterface;
8-
use Sylius\Component\Shipping\Checker\ShippingMethodEligibilityCheckerInterface;
8+
use Sylius\Component\Shipping\Checker\Eligibility\ShippingMethodEligibilityCheckerInterface;
99
use Sylius\Component\Shipping\Model\ShippingMethodInterface;
1010
use Sylius\Component\Shipping\Model\ShippingSubjectInterface;
1111
use Webgriffe\SyliusTableRateShippingPlugin\Calculator\TableRateShippingCalculator;

src/EventSubscriber/TableRateDeleteSubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function __construct(ShippingMethodRepositoryInterface $shippingMethodRep
2525
/**
2626
* {@inheritdoc}
2727
*/
28-
public static function getSubscribedEvents()
28+
public static function getSubscribedEvents(): array
2929
{
3030
return ['webgriffe.shipping_table_rate.pre_delete' => 'onTableRatePreDelete'];
3131
}

src/Form/EventSubscriber/AddCurrencySubscriber.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class AddCurrencySubscriber implements EventSubscriberInterface
1515
/**
1616
* {@inheritdoc}
1717
*/
18-
public static function getSubscribedEvents()
18+
public static function getSubscribedEvents(): array
1919
{
2020
return [FormEvents::PRE_SET_DATA => 'preSetData'];
2121
}

src/Form/Type/Shipping/Calculator/ChannelBasedTableRateConfigurationType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public function getParent(): string
2828
return ChannelCollectionType::class;
2929
}
3030

31-
public function getBlockPrefix()
31+
public function getBlockPrefix(): string
3232
{
3333
return 'webgriffe_sylius_table_rate_shipping_plugin_calculator_channel_based_table_rate';
3434
}

src/Resolver/TableRateResolver.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function resolve(ShipmentInterface $shipment, array $calculatorConfig): S
5757

5858
/** @var ShippingTableRate $tableRate */
5959
$tableRate = $calculatorConfig[$channelCode][TableRateConfigurationType::TABLE_RATE_FIELD_NAME];
60+
/** @var ShippingTableRate $tableRate */
6061
$tableRate = $this->tableRateRepository->findOneBy(['code' => $tableRate->getCode()]);
6162
Assert::isInstanceOf($tableRate, ShippingTableRate::class);
6263

0 commit comments

Comments
 (0)