-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #50 from BitBagCommerce/OP-270/Sylius_1_13_support
OP-270 Sylius 1.13 support
- Loading branch information
Showing
116 changed files
with
717 additions
and
568 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -18,7 +19,7 @@ final class AddProductBundleItemToCartCommand | |
public function __construct( | ||
private ProductBundleItemInterface $productBundleItem, | ||
private ?ProductVariantInterface $productVariant = null, | ||
private ?int $quantity = null | ||
private ?int $quantity = null, | ||
) { | ||
$this->productVariant = $productBundleItem->getProductVariant(); | ||
$this->quantity = $productBundleItem->getQuantity(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -15,7 +16,7 @@ final class AddProductBundleToCartCommand implements OrderIdentityAwareInterface | |
public function __construct( | ||
private int $orderId, | ||
private string $productCode, | ||
private int $quantity = 1 | ||
private int $quantity = 1, | ||
) { | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
*/ | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
||
|
@@ -53,7 +54,7 @@ public function __construct( | |
private MessageBusInterface $messageBus, | ||
private OrderRepositoryInterface $orderRepository, | ||
private AddProductBundleToCartDtoFactoryInterface $addProductBundleToCartDtoFactory, | ||
private AddProductBundleToCartCommandFactoryInterface $addProductBundleToCartCommandFactory | ||
private AddProductBundleToCartCommandFactoryInterface $addProductBundleToCartCommandFactory, | ||
) { | ||
parent::__construct( | ||
$metadata, | ||
|
@@ -72,7 +73,7 @@ public function __construct( | |
$eventDispatcher, | ||
$stateMachine, | ||
$resourceUpdateHandler, | ||
$resourceDeleteHandler | ||
$resourceDeleteHandler, | ||
); | ||
} | ||
|
||
|
@@ -96,7 +97,7 @@ public function addProductBundleAction(Request $request): ?Response | |
$form = $this->getFormFactory()->create( | ||
$configuration->getFormType(), | ||
$addProductBundleToCartDto, | ||
$configuration->getFormOptions() | ||
$configuration->getFormOptions(), | ||
); | ||
|
||
if ($request->isMethod(Request::METHOD_POST) && $form->handleRequest($request)->isValid()) { | ||
|
@@ -113,15 +114,15 @@ public function addProductBundleAction(Request $request): ?Response | |
'configuration' => $configuration, | ||
$this->metadata->getName() => $orderItem, | ||
'form' => $form->createView(), | ||
] | ||
], | ||
); | ||
} | ||
|
||
private function handleForm( | ||
FormInterface $form, | ||
Controller\RequestConfiguration $configuration, | ||
OrderItemInterface $orderItem, | ||
Request $request | ||
Request $request, | ||
): ?Response { | ||
/** @var AddProductBundleToCartDto $addProductBundleToCartDto */ | ||
$addProductBundleToCartDto = $form->getData(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
@@ -26,7 +27,7 @@ final class AddProductBundleToCartDtoDataTransformer implements DataTransformerI | |
public function transform( | ||
$object, | ||
string $to, | ||
array $context = [] | ||
array $context = [], | ||
): AddProductBundleToCartCommand { | ||
Assert::isInstanceOf($object, AddProductBundleToCartDto::class); | ||
|
||
|
@@ -43,7 +44,7 @@ public function transform( | |
public function supportsTransformation( | ||
$data, | ||
string $to, | ||
array $context = [] | ||
array $context = [], | ||
): bool { | ||
return isset($context['input']['class']) && AddProductBundleToCartDto::class === $context['input']['class']; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
@@ -18,8 +19,7 @@ class AuthenticationManagerPolyfillPass implements CompilerPassInterface | |
public function process(ContainerBuilder $container): void | ||
{ | ||
if ( | ||
false === $container->has('security.authentication_manager') | ||
&& | ||
false === $container->has('security.authentication_manager') && | ||
true === $container->has('security.authentication.manager') | ||
) { | ||
$container->setAlias('security.authentication_manager', 'security.authentication.manager'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
<?php | ||
|
||
/* | ||
* This file was created by developers working at BitBag | ||
* Do you need more information about us and what we do? Visit our https://bitbag.io website! | ||
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career | ||
* This file has been created by developers from BitBag. | ||
* Feel free to contact us once you face any issues or want to start | ||
* You can find more information about us on https://bitbag.io and write us | ||
* an email on [email protected]. | ||
*/ | ||
|
||
declare(strict_types=1); | ||
|
@@ -24,7 +25,7 @@ public function __construct( | |
private OrderInterface $cart, | ||
private OrderItemInterface $cartItem, | ||
private ProductInterface $product, | ||
array $productBundleItems | ||
array $productBundleItems, | ||
) { | ||
$this->productBundleItems = new ArrayCollection($productBundleItems); | ||
} | ||
|
Oops, something went wrong.