Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.0] cleanup proposal stuff and fix serialization of Doctrine collections #1641

Merged
merged 3 commits into from
May 17, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@

namespace CoreShop\Bundle\CoreBundle\Maintenance;

use CoreShop\Bundle\OrderBundle\Expiration\ProposalExpirationInterface;
use CoreShop\Bundle\OrderBundle\Expiration\OrderExpirationInterface;
use CoreShop\Component\Core\Configuration\ConfigurationServiceInterface;
use Pimcore\Maintenance\TaskInterface;

final class ProposalExpireTask implements TaskInterface
final class OrderExpireTask implements TaskInterface
{
private ConfigurationServiceInterface $configurationService;
private ProposalExpirationInterface $proposalExpiration;
private OrderExpirationInterface $proposalExpiration;
private string $type;
private int $days;
private array $params;

public function __construct(
ConfigurationServiceInterface $configurationService,
ProposalExpirationInterface $proposalExpiration,
OrderExpirationInterface $proposalExpiration,
string $type,
int $days = 0,
array $params = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
- '@CoreShop\Component\Core\Order\Transformer\OrderItemToShipmentItemTransformer.inner'

coreshop.maintenance.cart.expire_task:
class: CoreShop\Bundle\CoreBundle\Maintenance\ProposalExpireTask
class: CoreShop\Bundle\CoreBundle\Maintenance\OrderExpireTask
arguments:
- '@CoreShop\Component\Core\Configuration\ConfigurationServiceInterface'
- '@CoreShop\Bundle\OrderBundle\Expiration\CartExpiration'
Expand All @@ -36,7 +36,7 @@ services:
- { name: pimcore.maintenance.task, type: coreshop_expire_carts }

coreshop.maintenance.order.expire_task:
class: CoreShop\Bundle\CoreBundle\Maintenance\ProposalExpireTask
class: CoreShop\Bundle\CoreBundle\Maintenance\OrderExpireTask
arguments:
- '@CoreShop\Component\Core\Configuration\ConfigurationServiceInterface'
- '@CoreShop\Bundle\OrderBundle\Expiration\OrderExpiration'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ CoreShop\Component\Index\Model\Filter:
groups: [Detailed]
preConditions:
expose: true
type: array
type: ArrayCollection
groups: [Detailed]
conditions:
expose: true
type: array
type: ArrayCollection
groups: [Detailed]
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ CoreShop\Component\Notification\Model\NotificationRule:
groups: [Detailed]
conditions:
expose: true
type: array
type: ArrayCollection
groups: [Detailed]
actions:
expose: true
type: array
groups: [Detailed]
type: ArrayCollection
groups: [Detailed]
6 changes: 3 additions & 3 deletions src/CoreShop/Bundle/OrderBundle/Command/CartExpireCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@

namespace CoreShop\Bundle\OrderBundle\Command;

use CoreShop\Bundle\OrderBundle\Expiration\ProposalExpirationInterface;
use CoreShop\Bundle\OrderBundle\Expiration\OrderExpirationInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

final class CartExpireCommand extends Command
{
protected ProposalExpirationInterface $cartExpiration;
protected OrderExpirationInterface $cartExpiration;
protected int $days;
protected array $params;

public function __construct(ProposalExpirationInterface $cartExpiration, int $days = 0, array $params = [])
public function __construct(OrderExpirationInterface $cartExpiration, int $days = 0, array $params = [])
{
$this->cartExpiration = $cartExpiration;
$this->days = $days;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@

namespace CoreShop\Bundle\OrderBundle\Command;

use CoreShop\Bundle\OrderBundle\Expiration\ProposalExpirationInterface;
use CoreShop\Bundle\OrderBundle\Expiration\OrderExpirationInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;

final class OrderExpireCommand extends Command
{
protected ProposalExpirationInterface $orderExpiration;
protected OrderExpirationInterface $orderExpiration;
protected int $days;

public function __construct(ProposalExpirationInterface $orderExpiration, int $days = 0)
public function __construct(OrderExpirationInterface $orderExpiration, int $days = 0)
{
parent::__construct();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

use CoreShop\Component\Order\Repository\OrderRepositoryInterface;

final class CartExpiration implements ProposalExpirationInterface
final class CartExpiration implements OrderExpirationInterface
{
private OrderRepositoryInterface $cartRepository;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
use CoreShop\Component\Order\Repository\OrderRepositoryInterface;
use Pimcore\Model\DataObject\Concrete;

final class OrderExpiration implements ProposalExpirationInterface
final class OrderExpiration implements OrderExpirationInterface
{
private OrderRepositoryInterface $orderRepository;
private StateMachineApplier $stateMachineApplier;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

namespace CoreShop\Bundle\OrderBundle\Expiration;

interface ProposalExpirationInterface
interface OrderExpirationInterface
{
/**
* @param int $days
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,31 @@ CoreShop\Component\Order\Model\Order:
exp: object.getToken()
type: string
groups: [List, Detailed]
saleState:
serialized_name: saleState
exp: object.getSaleState()
type: string
groups: [List, Detailed]
orderState:
serialized_name: orderState
exp: object.getOrderState()
type: string
groups: [List, Detailed]
shippingState:
serialized_name: shippingState
exp: object.getShippingState()
type: string
groups: [Detailed]
invoiceState:
serialized_name: invoiceState
exp: object.getInvoiceState()
type: string
groups: [Detailed]
paymentState:
serialized_name: paymentState
exp: object.getPaymentState()
type: string
groups: [Detailed]
paymentProvider:
serialized_name: paymentProvider
exp: object.getPaymentProvider()
Expand Down Expand Up @@ -35,6 +60,11 @@ CoreShop\Component\Order\Model\Order:
exp: object.getPriceRuleItems()
type: array
groups: [Detailed]
paymentTotal:
serialized_name: paymentTotal
exp: object.getPaymentTotal()
type: integer
groups: [Detailed]
totalTax:
serialized_name: totalTax
exp: object.getTotalTax()
Expand Down Expand Up @@ -155,6 +185,11 @@ CoreShop\Component\Order\Model\Order:
exp: object.getOrderNumber()
type: string
groups: [Detailed]
orderDate:
serialized_name: orderDate
exp: object.getOrderDate()
type: DateTime
groups: [Detailed]
shippingAddress:
serialized_name: shippingAddress
exp: object.getShippingAddress()
Expand Down
Loading