Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
lruozzi9 committed Oct 15, 2024
1 parent c7466a0 commit f94f6c1
Show file tree
Hide file tree
Showing 20 changed files with 484 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:

-
name: Upload Behat logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: Behat logs
Expand Down
1 change: 0 additions & 1 deletion ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@
VisibilityRequiredFixer::class => ['*Spec.php'],
]);
};

4 changes: 2 additions & 2 deletions src/Checker/TableRateShippingMethodEligibilityChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ final class TableRateShippingMethodEligibilityChecker implements ShippingMethodE
{
public function __construct(
private ShippingMethodEligibilityCheckerInterface $eligibilityChecker,
private TableRateResolverInterface $tableRateResolver
private TableRateResolverInterface $tableRateResolver,
) {
}

public function isEligible(
ShippingSubjectInterface $subject,
ShippingMethodInterface $method
ShippingMethodInterface $method,
): bool {
if (!$this->eligibilityChecker->isEligible($subject, $method)) {
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/EventSubscriber/TableRateDeleteSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function onTableRatePreDelete(ResourceControllerEvent $event): void
'webgriffe_sylius_table_rate_plugin.ui.shipping_table_rate.already_used_by_shipping_methods',
ResourceControllerEvent::TYPE_ERROR,
['%shipping_methods%' => implode(', ', $foundMethods)],
400
400,
);
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/Exception/RateNotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ public function __construct(
ShippingTableRate $shippingTableRate,
float $weight,
int $code = 0,
Throwable $previous = null
Throwable $previous = null,
) {
$message = sprintf(
'The shipping table rate "%s" cannot find a rate for a weight of "%s"',
$shippingTableRate->getCode(),
$weight
$weight,
);
parent::__construct($message, $code, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Form/EventSubscriber/AddCurrencySubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function preSetData(FormEvent $event): void
'required' => true,
'placeholder' => $messagesNamespace . 'currency.placeholder',
'disabled' => $this->shouldCurrencyBeDisabled($resource),
]
],
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function configureOptions(OptionsResolver $resolver): void
'entry_options' => function (ChannelInterface $channel): array {
return ['label' => $channel->getName(), 'currency' => $channel->getBaseCurrency()];
},
]
],
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/ShippingTableRateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'allow_add' => true,
'allow_delete' => true,
'entry_type' => WeightLimitToRateType::class,
]
],
)
;
}
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Type/WeightLimitToRateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'scale' => 2,
'required' => true,
'constraints' => [new NotBlank(['groups' => 'sylius'])],
]
],
)
->add(
'rate',
Expand All @@ -33,7 +33,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
'label' => $messagesNamespace . 'rate',
'required' => true,
'constraints' => [new NotBlank(['groups' => 'sylius'])],
]
],
)
;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Menu/AdminMenuListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function addAdminMenuItems(MenuBuilderEvent $event): void
$configuration
->addChild(
'webgriffe-sylius-table-rate-plugin-table-rates',
['route' => 'webgriffe_admin_shipping_table_rate_index']
['route' => 'webgriffe_admin_shipping_table_rate_index'],
)
->setLabel('webgriffe.ui.shipping_table_rates')
->setLabelAttribute('icon', 'pallet')
Expand Down
5 changes: 4 additions & 1 deletion src/Resolver/TableRateResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,12 @@

namespace Webgriffe\SyliusTableRateShippingPlugin\Resolver;

if (!interface_exists(\Sylius\Resource\Doctrine\Persistence\RepositoryInterface::class)) {
class_alias(\Sylius\Component\Resource\Repository\RepositoryInterface::class, \Sylius\Resource\Doctrine\Persistence\RepositoryInterface::class);
}
use Sylius\Component\Core\Exception\MissingChannelConfigurationException;
use Sylius\Component\Core\Model\ShipmentInterface;
use Sylius\Component\Resource\Repository\RepositoryInterface;
use Sylius\Resource\Doctrine\Persistence\RepositoryInterface;
use Webgriffe\SyliusTableRateShippingPlugin\Entity\ShippingTableRate;
use Webgriffe\SyliusTableRateShippingPlugin\Form\Type\Shipping\Calculator\TableRateConfigurationType;
use Webmozart\Assert\Assert;
Expand Down
Loading

0 comments on commit f94f6c1

Please sign in to comment.