mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
[PayumBundle] Unification os services name
This commit is contained in:
parent
a7bb9cd32b
commit
a95dd6c730
15 changed files with 124 additions and 34 deletions
|
|
@ -21,6 +21,13 @@ use Sylius\Component\Core\Model\OrderInterface;
|
|||
use Sylius\Component\Core\Model\PaymentInterface;
|
||||
use Sylius\Component\Core\Payment\InvoiceNumberGeneratorInterface;
|
||||
|
||||
trigger_deprecation(
|
||||
'sylius/payum-bundle',
|
||||
'1.14',
|
||||
'The "%s" class is deprecated and will be removed in Sylius 2.0.',
|
||||
ConvertPaymentAction::class,
|
||||
);
|
||||
/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */
|
||||
final class ConvertPaymentAction implements ActionInterface
|
||||
{
|
||||
public function __construct(private InvoiceNumberGeneratorInterface $invoiceNumberGenerator)
|
||||
|
|
|
|||
|
|
@ -35,6 +35,13 @@ use Symfony\Component\HttpFoundation\Session\Flash\FlashBagInterface;
|
|||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
use Symfony\Component\Routing\RouterInterface;
|
||||
|
||||
trigger_deprecation(
|
||||
'sylius/payum-bundle',
|
||||
'1.14',
|
||||
'The "%s" class is deprecated and will be removed in Sylius 2.0.',
|
||||
PayumController::class,
|
||||
);
|
||||
/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */
|
||||
final class PayumController
|
||||
{
|
||||
public function __construct(
|
||||
|
|
|
|||
|
|
@ -20,6 +20,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
|||
use Symfony\Component\Form\FormEvent;
|
||||
use Symfony\Component\Form\FormEvents;
|
||||
|
||||
trigger_deprecation(
|
||||
'sylius/payum-bundle',
|
||||
'1.14',
|
||||
'The "%s" class is deprecated and will be removed in Sylius 2.0.',
|
||||
PaypalGatewayConfigurationType::class,
|
||||
);
|
||||
/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */
|
||||
final class PaypalGatewayConfigurationType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
|
|
|
|||
|
|
@ -17,6 +17,13 @@ use Symfony\Component\Form\AbstractType;
|
|||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
trigger_deprecation(
|
||||
'sylius/payum-bundle',
|
||||
'1.14',
|
||||
'The "%s" class is deprecated and will be removed in Sylius 2.0.',
|
||||
StripeGatewayConfigurationType::class,
|
||||
);
|
||||
/** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */
|
||||
final class StripeGatewayConfigurationType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@
|
|||
|
||||
-->
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services
|
||||
http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<imports>
|
||||
<import resource="services/**.xml" />
|
||||
</imports>
|
||||
|
|
@ -26,6 +26,10 @@
|
|||
<service id="sylius.payum.http_client" class="Sylius\Bundle\PayumBundle\HttpClient\HttpClient">
|
||||
<argument type="service" id="Psr\Http\Client\ClientInterface" />
|
||||
</service>
|
||||
<service id="sylius.form_registry.payum_gateway_config" class="Sylius\Bundle\ResourceBundle\Form\Registry\FormTypeRegistry" />
|
||||
<service id="sylius_payum.http_client" alias="sylius.payum.http_client" />
|
||||
|
||||
<service id="sylius.form_registry.payum_gateway_config" class="Sylius\Bundle\ResourceBundle\Form\Registry\FormTypeRegistry">
|
||||
<deprecated package="sylius/payum-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be moved to the PayumBundle in 2.0.</deprecated>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -1,46 +1,61 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<services>
|
||||
<defaults public="true" />
|
||||
|
||||
<!-- Generic -->
|
||||
<service id="sylius.payum_action.authorize_payment" class="Sylius\Bundle\PayumBundle\Action\AuthorizePaymentAction">
|
||||
<argument type="service" id="sylius.payment_description_provider" />
|
||||
<argument type="service" id="sylius_payum.factory.resolve_next_route" />
|
||||
<tag name="payum.action" all="true" alias="sylius.authorize_payment" />
|
||||
</service>
|
||||
<service id="sylius_payum.action.authorize_payment" alias="sylius.payum_action.authorize_payment" />
|
||||
|
||||
<service id="sylius.payum_action.capture_payment" class="Sylius\Bundle\PayumBundle\Action\CapturePaymentAction">
|
||||
<argument type="service" id="sylius.payment_description_provider" />
|
||||
<argument type="service" id="sylius_payum.factory.resolve_next_route" />
|
||||
<tag name="payum.action" all="true" alias="sylius.capture_payment" />
|
||||
</service>
|
||||
<service id="sylius_payum.action.capture_payment" alias="sylius.payum_action.capture_payment" />
|
||||
|
||||
<service id="sylius.payum_action.execute_same_request_with_payment_details" class="Sylius\Bundle\PayumBundle\Action\ExecuteSameRequestWithPaymentDetailsAction">
|
||||
<tag name="payum.action" all="true" />
|
||||
</service>
|
||||
<service id="sylius_payum.action.execute_same_request_with_payment_details" alias="sylius.payum_action.execute_same_request_with_payment_details" />
|
||||
|
||||
<service id="sylius.payum_action.resolve_next_route" class="Sylius\Bundle\PayumBundle\Action\ResolveNextRouteAction">
|
||||
<tag name="payum.action" all="true" alias="sylius.resolve_next_route" />
|
||||
</service>
|
||||
<service id="sylius_payum.action.resolve_next_route" alias="sylius.payum_action.resolve_next_route" />
|
||||
|
||||
<!-- PayPal -->
|
||||
<service id="sylius.payum_action.paypal_express_checkout.convert_payment" class="Sylius\Bundle\PayumBundle\Action\Paypal\ExpressCheckout\ConvertPaymentAction">
|
||||
<argument type="service" id="sylius.invoice_number_generator" />
|
||||
<tag name="payum.action" factory="paypal_express_checkout" alias="sylius.paypal_express_checkout.convert_payment" />
|
||||
<deprecated package="sylius/payum-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
|
||||
</service>
|
||||
|
||||
<!-- Offline -->
|
||||
<service id="sylius.payum_action.offline.convert_payment" class="Sylius\Bundle\PayumBundle\Action\Offline\ConvertPaymentAction">
|
||||
<tag name="payum.action" factory="offline" alias="sylius.offline.convert_payment" />
|
||||
</service>
|
||||
<service id="sylius_payum.action.offline.convert_payment" alias="sylius.payum_action.offline.convert_payment" />
|
||||
|
||||
<service id="sylius.payum_action.offline.status" class="Sylius\Bundle\PayumBundle\Action\Offline\StatusAction">
|
||||
<tag name="payum.action" factory="offline" alias="sylius.offline.status"/>
|
||||
</service>
|
||||
<service id="sylius_payum.action.offline.status" alias="sylius.payum_action.offline.status" />
|
||||
|
||||
<service id="sylus.payum_action.offline.status" alias="sylius.payum_action.offline.status">
|
||||
<deprecated package="sylius/payum-bundle" version="2.0">"%alias_id%" service is deprecated since Sylius 1.8 and will be removed in 2.0. Use "sylius.payum_action.offline.status" instead.</deprecated>
|
||||
</service>
|
||||
|
||||
<service id="sylius.payum_action.offline.resolve_next_route" class="Sylius\Bundle\PayumBundle\Action\Offline\ResolveNextRouteAction">
|
||||
<tag name="payum.action" factory="offline" alias="sylius.offline.resolve_next_route" />
|
||||
</service>
|
||||
<service id="sylius_payum.action.offline.resolve_next_route" alias="sylius.payum_action.offline.resolve_next_route" />
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,10 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<services>
|
||||
<defaults public="true" />
|
||||
|
||||
|
|
@ -17,8 +19,9 @@
|
|||
</argument>
|
||||
<argument type="service" id="sylius.resource_controller.request_configuration_factory" />
|
||||
<argument type="service" id="router" />
|
||||
<argument type="service" id="sylius.factory.payum_get_status_action" />
|
||||
<argument type="service" id="sylius.factory.payum_resolve_next_route" />
|
||||
<argument type="service" id="sylius_payum.factory.get_status" />
|
||||
<argument type="service" id="sylius_payum.factory.resolve_next_route" />
|
||||
<deprecated package="sylius/payum-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<services>
|
||||
<defaults public="true" />
|
||||
|
||||
|
|
@ -11,5 +12,6 @@
|
|||
<argument type="service" id="sylius_abstraction.state_machine" />
|
||||
<tag name="payum.extension" all="true" prepend="true" />
|
||||
</service>
|
||||
<service id="sylius_payum.extension.update_payment_state" alias="sylius.payum_extension.update_payment_state" />
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<services>
|
||||
<defaults public="true" />
|
||||
|
||||
<service id="sylius.factory.payum_get_status_action" class="Sylius\Bundle\PayumBundle\Factory\GetStatusFactory" />
|
||||
<service id="sylius_payum.factory.get_status" alias="sylius.factory.payum_get_status_action" />
|
||||
<service id="Sylius\Bundle\PayumBundle\Factory\GetStatusFactoryInterface" alias="sylius.factory.payum_get_status_action" />
|
||||
|
||||
<service id="sylius.factory.payum_resolve_next_route" class="Sylius\Bundle\PayumBundle\Factory\ResolveNextRouteFactory" />
|
||||
<service id="sylius_payum.factory.resolve_next_route" alias="sylius.factory.payum_resolve_next_route" />
|
||||
<service id="Sylius\Bundle\PayumBundle\Factory\ResolveNextRouteFactoryInterface" alias="sylius.factory.payum_resolve_next_route" />
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,11 @@
|
|||
|
||||
-->
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<parameters>
|
||||
<parameter key="sylius.form.type.gateway_config.validation_groups" type="collection">
|
||||
<parameter>sylius</parameter>
|
||||
|
|
@ -31,15 +35,18 @@
|
|||
<argument type="service" id="payum.dynamic_gateways.cypher" on-invalid="null" />
|
||||
<tag name="form.type_extension" extended-type="Sylius\Bundle\PayumBundle\Form\Type\GatewayConfigType" priority="100" />
|
||||
</service>
|
||||
<service id="sylius_payum.form.extension.type.crypted_gateway_config" alias="sylius.form.extension.type.gateway_config.crypted" />
|
||||
|
||||
<service id="sylius.form.type.gateway_configuration.paypal" class="Sylius\Bundle\PayumBundle\Form\Type\PaypalGatewayConfigurationType">
|
||||
<tag name="sylius.gateway_configuration_type" type="paypal_express_checkout" label="sylius.payum_gateway_factory.paypal_express_checkout" priority="100" />
|
||||
<tag name="form.type" />
|
||||
<deprecated package="sylius/payum-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
|
||||
</service>
|
||||
|
||||
<service id="sylius.form.type.gateway_configuration.stripe" class="Sylius\Bundle\PayumBundle\Form\Type\StripeGatewayConfigurationType">
|
||||
<tag name="sylius.gateway_configuration_type" type="stripe_checkout" label="sylius.payum_gateway_factory.stripe_checkout" priority="50" />
|
||||
<tag name="form.type" />
|
||||
<deprecated package="sylius/payum-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be removed in 2.0.</deprecated>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
<?xml version="1.0" ?>
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
|
||||
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<services>
|
||||
<defaults public="true" />
|
||||
|
||||
<service id="sylius.payment_description_provider" class="Sylius\Bundle\PayumBundle\Provider\PaymentDescriptionProvider">
|
||||
<argument type="service" id="translator" />
|
||||
</service>
|
||||
<service id="sylius_payum.provider.payment_description" alias="sylius.payment_description_provider" />
|
||||
<service id="Sylius\Bundle\PayumBundle\Provider\PaymentDescriptionProviderInterface" alias="sylius.payment_description_provider" />
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -11,9 +11,10 @@
|
|||
|
||||
-->
|
||||
|
||||
<container xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
<container
|
||||
xmlns="http://symfony.com/schema/dic/services"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd"
|
||||
>
|
||||
<services>
|
||||
<defaults public="true" />
|
||||
|
|
@ -21,10 +22,12 @@
|
|||
<service id="Sylius\Bundle\PayumBundle\Validator\GatewayFactoryExistsValidator">
|
||||
<argument>%sylius.gateway_factories%</argument>
|
||||
<tag name="validator.constraint_validator" alias="sylius_gateway_factory_exists_validator" />
|
||||
<deprecated package="sylius/payum-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be moved to the PayumBundle in 2.0.</deprecated>
|
||||
</service>
|
||||
|
||||
<service id="Sylius\Bundle\PayumBundle\Validator\GroupsGenerator\GatewayConfigGroupsGenerator">
|
||||
<argument>%sylius.payum.gateway_config.validation_groups%</argument>
|
||||
<deprecated package="sylius/payum-bundle" version="1.14">The "%service_id%" service is deprecated since 1.14 and will be moved to the PayumBundle in 2.0.</deprecated>
|
||||
</service>
|
||||
</services>
|
||||
</container>
|
||||
|
|
|
|||
|
|
@ -15,6 +15,13 @@ namespace Sylius\Bundle\PayumBundle\Validator\Constraints;
|
|||
|
||||
use Symfony\Component\Validator\Constraint;
|
||||
|
||||
trigger_deprecation(
|
||||
'sylius/payum-bundle',
|
||||
'1.14',
|
||||
'The "%s" class is deprecated and will be moved to the PaymentBundle in Sylius 2.0.',
|
||||
GatewayFactoryExists::class,
|
||||
);
|
||||
/** @deprecated since Sylius 1.14 and will be moved to the PaymentBundle in Sylius 2.0. */
|
||||
final class GatewayFactoryExists extends Constraint
|
||||
{
|
||||
public string $invalidGatewayFactory = 'sylius.gateway_config.invalid_gateway_factory';
|
||||
|
|
|
|||
|
|
@ -18,6 +18,13 @@ use Symfony\Component\Validator\Constraint;
|
|||
use Symfony\Component\Validator\ConstraintValidator;
|
||||
use Symfony\Component\Validator\Exception\UnexpectedTypeException;
|
||||
|
||||
trigger_deprecation(
|
||||
'sylius/payum-bundle',
|
||||
'1.14',
|
||||
'The "%s" class is deprecated and will be moved to the PaymentBundle in Sylius 2.0.',
|
||||
GatewayFactoryExistsValidator::class,
|
||||
);
|
||||
/** @deprecated since Sylius 1.14 and will be moved to the PaymentBundle in Sylius 2.0. */
|
||||
final class GatewayFactoryExistsValidator extends ConstraintValidator
|
||||
{
|
||||
/** @param array<string, string> $factoryNames */
|
||||
|
|
|
|||
|
|
@ -17,7 +17,16 @@ use Sylius\Component\Core\Model\PaymentMethodInterface;
|
|||
use Symfony\Component\Form\FormInterface;
|
||||
use Webmozart\Assert\Assert;
|
||||
|
||||
/** @internal */
|
||||
trigger_deprecation(
|
||||
'sylius/payum-bundle',
|
||||
'1.14',
|
||||
'The "%s" class is deprecated and will be moved to the PaymentBundle in Sylius 2.0.',
|
||||
GatewayConfigGroupsGenerator::class,
|
||||
);
|
||||
/**
|
||||
* @deprecated since Sylius 1.14 and will be moved to the PaymentBundle in Sylius 2.0.
|
||||
* @internal
|
||||
*/
|
||||
class GatewayConfigGroupsGenerator
|
||||
{
|
||||
/** @param array<string, array<string, string>> $validationGroups */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue