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

changed jmsSerializer type from ArrayTransformerInterface to Serializ… #2291

Closed
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
11 changes: 6 additions & 5 deletions src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
use Symfony\Component\EventDispatcher\GenericEvent;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Serializer\SerializerInterface;
use Symfony\Component\Workflow\StateMachine;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

Expand All @@ -67,7 +68,7 @@

protected AddressFormatterInterface $addressFormatter;

protected ArrayTransformerInterface $jmsSerializer;
protected SerializerInterface $jmsSerializer;

protected WorkflowStateInfoManagerInterface $workflowStateManager;

Expand Down Expand Up @@ -354,7 +355,7 @@

protected function getDetails(OrderInterface $order): array
{
$jsonSale = $this->jmsSerializer->toArray($order);
$jsonSale = json_decode($this->jmsSerializer->normalize($order, 'json'), true, 512, JSON_THROW_ON_ERROR);

Check failure on line 358 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8, Deps highest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 358 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8, Deps lowest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 358 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.6, PHP 8, Deps lowest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 358 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8.1, Deps highest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

$jsonSale['o_id'] = $order->getId();
$jsonSale['saleNumber'] = $order->getOrderNumber();
Expand Down Expand Up @@ -483,7 +484,7 @@
'cancel',
], false);

$data = $this->jmsSerializer->toArray($invoice);
$data = json_decode($this->jmsSerializer->normalize($invoice, 'json'), true, 512, JSON_THROW_ON_ERROR);

Check failure on line 487 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8, Deps highest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 487 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8, Deps lowest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 487 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.6, PHP 8, Deps lowest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 487 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8.1, Deps highest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

$data['stateInfo'] = $this->workflowStateManager->getStateInfo('coreshop_invoice', $invoice->getState(), false);
$data['transitions'] = $availableTransitions;
Expand All @@ -506,7 +507,7 @@
'cancel',
], false);

$data = $this->jmsSerializer->toArray($shipment);
$data = json_decode($this->jmsSerializer->normalize($shipment, 'json'), true, 512, JSON_THROW_ON_ERROR);

Check failure on line 510 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8, Deps highest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 510 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8, Deps lowest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 510 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.6, PHP 8, Deps lowest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

Check failure on line 510 in src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php

View workflow job for this annotation

GitHub Actions / ~10.5, PHP 8.1, Deps highest

Call to an undefined method Symfony\Component\Serializer\SerializerInterface::normalize().

$data['stateInfo'] = $this->workflowStateManager->getStateInfo('coreshop_shipment', $shipment->getState(), false);
$data['transitions'] = $availableTransitions;
Expand Down Expand Up @@ -742,7 +743,7 @@
$this->addressFormatter = $addressFormatter;
}

public function setJmsSerializer(ArrayTransformerInterface $jmsSerializer): void
public function setJmsSerializer(SerializerInterface $jmsSerializer): void
{
$this->jmsSerializer = $jmsSerializer;
}
Expand Down
Loading