Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,38 @@ jobs:
matrix:
php: ["8.2", "8.3"]
symfony: ["^6.4", "^7.1"]
sylius: ["~2.0"]
sylius: ["~2.0.0"]
node: ["20.x"]
mysql: ["8.4"]
database: ["mysql"]
mysql: ["8.4"]
wkhtmltopdf: ["0.12.6-1"]
state_machine_adapter: ["symfony_workflow"]

include:
-
php: "8.3"
symfony: "^7.1"
sylius: "~2.0"
sylius: "~2.0.0"
node: "20.x"
mysql: "8.4"
database: "mysql"
mysql: "8.4"
wkhtmltopdf: "0.12.6-1"
state_machine_adapter: "winzou_state_machine"

-
php: "8.3"
symfony: "^7.1"
sylius: "~2.0"
sylius: "~2.0.0"
node: "20.x"
mysql: "8.4"
database: "mysql"
mysql: "8.4"
wkhtmltopdf: false
state_machine_adapter: "symfony_workflow"

-
php: "8.3"
symfony: "^7.1"
sylius: "~2.0"
sylius: "~2.0.0"
node: "20.x"
database: "postgres"
postgres: "15.8"
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"knplabs/knp-snappy-bundle": "^1.10",
"myclabs/php-enum": "^1.8",
"sylius/resource-bundle": "^1.12",
"sylius/sylius": "^2.0",
"sylius/sylius": "~2.0.0",
"symfony/messenger": "^6.4 || ^7.1",
"php-http/discovery": "^1.20"
},
Expand All @@ -45,14 +45,13 @@
"phpstan/phpstan": "^1.6",
"phpstan/phpstan-webmozart-assert": "^1.1",
"phpunit/phpunit": "^9.5",
"polishsymfonycommunity/symfony-mocker-container": "^1.0",
"sylius-labs/coding-standard": "^4.2",
"symfony/browser-kit": "^6.4 || ^7.1",
"symfony/debug-bundle": "^6.4 || ^7.1",
"symfony/dotenv": "^6.4 || ^7.1",
"symfony/intl": "^6.4 || ^7.1",
"symfony/web-profiler-bundle": "^6.4 || ^7.1",
"symfony/webpack-encore-bundle": "^2.2.0"
"symfony/webpack-encore-bundle": "^2.2"
},
"autoload": {
"psr-4": {
Expand Down
144 changes: 0 additions & 144 deletions config/app/events.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion config/integrations/winzou_state_machine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ winzou_state_machine:
transitions:
complete:
from: [new]
to: completed
to: completed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

10 changes: 5 additions & 5 deletions spec/CommandHandler/GenerateCreditMemoHandlerSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace spec\Sylius\RefundPlugin\CommandHandler;

use Doctrine\Persistence\ObjectManager;
use Doctrine\ORM\EntityManagerInterface;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
Expand All @@ -32,7 +32,7 @@ final class GenerateCreditMemoHandlerSpec extends ObjectBehavior
{
function let(
CreditMemoGeneratorInterface $creditMemoGenerator,
ObjectManager $creditMemoManager,
EntityManagerInterface $creditMemoManager,
MessageBusInterface $eventBus,
OrderRepositoryInterface $orderRepository,
CreditMemoFileResolverInterface $creditMemoFileResolver,
Expand All @@ -49,7 +49,7 @@ function let(

function it_generates_credit_memo_with_a_pdf_file(
CreditMemoGeneratorInterface $creditMemoGenerator,
ObjectManager $creditMemoManager,
EntityManagerInterface $creditMemoManager,
MessageBusInterface $eventBus,
OrderRepositoryInterface $orderRepository,
CreditMemoFileResolverInterface $creditMemoFileResolver,
Expand Down Expand Up @@ -83,7 +83,7 @@ function it_generates_credit_memo_with_a_pdf_file(

function it_generates_only_credit_memo_without_a_pdf_file(
CreditMemoGeneratorInterface $creditMemoGenerator,
ObjectManager $creditMemoManager,
EntityManagerInterface $creditMemoManager,
MessageBusInterface $eventBus,
OrderRepositoryInterface $orderRepository,
CreditMemoFileResolverInterface $creditMemoFileResolver,
Expand Down Expand Up @@ -125,7 +125,7 @@ function it_generates_only_credit_memo_without_a_pdf_file(

function it_generates_only_credit_memo_without_a_pdf_file_if_pdf_generation_is_disabled(
CreditMemoGeneratorInterface $creditMemoGenerator,
ObjectManager $creditMemoManager,
EntityManagerInterface $creditMemoManager,
MessageBusInterface $eventBus,
OrderRepositoryInterface $orderRepository,
CreditMemoFileResolverInterface $creditMemoFileResolver,
Expand Down
6 changes: 3 additions & 3 deletions spec/Creator/RefundCreatorSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace spec\Sylius\RefundPlugin\Creator;

use Doctrine\Persistence\ObjectManager;
use Doctrine\ORM\EntityManagerInterface;
use PhpSpec\ObjectBehavior;
use Sylius\Component\Core\Model\OrderInterface;
use Sylius\Component\Core\Repository\OrderRepositoryInterface;
Expand All @@ -30,7 +30,7 @@ function let(
RefundFactoryInterface $refundFactory,
RemainingTotalProviderInterface $remainingTotalProvider,
OrderRepositoryInterface $orderRepository,
ObjectManager $refundEntityManager,
EntityManagerInterface $refundEntityManager,
): void {
$this->beConstructedWith(
$refundFactory,
Expand All @@ -49,7 +49,7 @@ function it_creates_refund_with_given_data_and_save_it_in_database(
RefundFactoryInterface $refundFactory,
RemainingTotalProviderInterface $remainingTotalProvider,
OrderRepositoryInterface $orderRepository,
ObjectManager $refundEntityManager,
EntityManagerInterface $refundEntityManager,
OrderInterface $order,
RefundInterface $refund,
): void {
Expand Down
14 changes: 7 additions & 7 deletions spec/StateResolver/OrderFullyRefundedStateResolverSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace spec\Sylius\RefundPlugin\StateResolver;

use Doctrine\Persistence\ObjectManager;
use Doctrine\ORM\EntityManagerInterface;
use PhpSpec\ObjectBehavior;
use Sylius\Abstraction\StateMachine\StateMachineInterface;
use Sylius\Component\Core\Model\OrderInterface;
Expand All @@ -26,7 +26,7 @@ final class OrderFullyRefundedStateResolverSpec extends ObjectBehavior
{
function let(
StateMachineInterface $stateMachineFactory,
ObjectManager $orderManager,
EntityManagerInterface $orderManager,
OrderFullyRefundedTotalCheckerInterface $orderFullyRefundedTotalChecker,
OrderRepositoryInterface $orderRepository,
): void {
Expand All @@ -40,7 +40,7 @@ function let(

function it_applies_refund_transition_on_order(
StateMachineInterface $stateMachine,
ObjectManager $orderManager,
EntityManagerInterface $orderManager,
OrderFullyRefundedTotalCheckerInterface $orderFullyRefundedTotalChecker,
OrderRepositoryInterface $orderRepository,
OrderInterface $order,
Expand All @@ -63,7 +63,7 @@ function it_applies_refund_transition_on_order(

function it_does_nothing_if_order_state_is_fully_refunded(
StateMachineInterface $stateMachine,
ObjectManager $orderManager,
EntityManagerInterface $orderManager,
OrderFullyRefundedTotalCheckerInterface $orderFullyRefundedTotalChecker,
OrderRepositoryInterface $orderRepository,
OrderInterface $order,
Expand All @@ -84,7 +84,7 @@ function it_does_nothing_if_order_state_is_fully_refunded(

function it_does_nothing_if_order_is_not_fully_refunded(
StateMachineInterface $stateMachine,
ObjectManager $orderManager,
EntityManagerInterface $orderManager,
OrderFullyRefundedTotalCheckerInterface $orderFullyRefundedTotalChecker,
OrderRepositoryInterface $orderRepository,
OrderInterface $order,
Expand All @@ -104,7 +104,7 @@ function it_does_nothing_if_order_is_not_fully_refunded(

function it_throws_an_exception_if_there_is_no_order_with_given_number(
StateMachineInterface $stateMachine,
ObjectManager $orderManager,
EntityManagerInterface $orderManager,
OrderFullyRefundedTotalCheckerInterface $orderFullyRefundedTotalChecker,
OrderRepositoryInterface $orderRepository,
): void {
Expand All @@ -120,7 +120,7 @@ function it_throws_an_exception_if_there_is_no_order_with_given_number(

function it_uses_winzou_state_machine_if_abstraction_not_passed_to_apply_refund_transition_on_order(
StateMachineInterface $stateMachineFactory,
ObjectManager $orderManager,
EntityManagerInterface $orderManager,
OrderFullyRefundedTotalCheckerInterface $orderFullyRefundedTotalChecker,
OrderRepositoryInterface $orderRepository,
OrderInterface $order,
Expand Down
Loading