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

Deprecate the Symfony bridge in favour of using PayumBundle #995

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Action/GetHttpRequestAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\RequestStack;

@trigger_error('The ' . __NAMESPACE__ . '\GetHttpRequestAction class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class GetHttpRequestAction implements ActionInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpFoundation\Response;

@trigger_error('The ' . __NAMESPACE__ . '\ObtainCreditCardAction class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class ObtainCreditCardAction implements ActionInterface, GatewayAwareInterface
{
use GatewayAwareTrait;
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Action/RenderTemplateAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
use Payum\Core\Request\RenderTemplate;
use Symfony\Component\Templating\EngineInterface;

@trigger_error('The ' . __NAMESPACE__ . '\RenderTemplateAction class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class RenderTemplateAction implements ActionInterface
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

@trigger_error('The ' . __NAMESPACE__ . '\CoreGatewayFactoryBuilder class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class CoreGatewayFactoryBuilder implements ContainerAwareInterface
{
use ContainerAwareTrait;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

use Payum\Core\GatewayFactoryInterface;

@trigger_error('The ' . __NAMESPACE__ . '\GatewayFactoryBuilder class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class GatewayFactoryBuilder
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
use Payum\Core\Security\TokenInterface;
use Payum\Core\Storage\StorageInterface;

@trigger_error('The ' . __NAMESPACE__ . '\HttpRequestVerifierBuilder class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class HttpRequestVerifierBuilder
{
public function __invoke(): HttpRequestVerifierInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\HttpFoundation\RequestStack;

@trigger_error('The ' . __NAMESPACE__ . '\ObtainCreditCardActionBuilder class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class ObtainCreditCardActionBuilder
{
private FormFactoryInterface $formFactory;
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Builder/TokenFactoryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
use Payum\Core\Storage\StorageInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

@trigger_error('The ' . __NAMESPACE__ . '\TokenFactoryBuilder class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class TokenFactoryBuilder
{
private UrlGeneratorInterface $urlGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

@trigger_error('The ' . __NAMESPACE__ . '\ContainerAwareCoreGatewayFactory class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class ContainerAwareCoreGatewayFactory extends CoreGatewayFactory implements ContainerAwareInterface
{
use ContainerAwareTrait;
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/ContainerAwareRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,14 @@
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfony\Component\DependencyInjection\ContainerAwareTrait;

@trigger_error('The ' . __NAMESPACE__ . '\ContainerAwareRegistry class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @template T of object
* @extends AbstractRegistry<T>
*
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
* /
*/
class ContainerAwareRegistry extends AbstractRegistry implements ContainerAwareInterface
{
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Event/ExecuteEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
use Payum\Core\Extension\Context;
use Symfony\Contracts\EventDispatcher\Event;

@trigger_error('The ' . __NAMESPACE__ . '\ExecuteEvent class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class ExecuteEvent extends Event
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
use Payum\Core\Extension\ExtensionInterface;
use Symfony\Contracts\EventDispatcher\EventDispatcherInterface;

@trigger_error('The ' . __NAMESPACE__ . '\EventDispatcherExtension class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class EventDispatcherExtension implements ExtensionInterface
{
private EventDispatcherInterface $dispatcher;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;

@trigger_error('The ' . __NAMESPACE__ . '\CreditCardExpirationDateType class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class CreditCardExpirationDateType extends AbstractType
{
public function finishView(FormView $view, FormInterface $form, array $options): void
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Form/Type/CreditCardType.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;

@trigger_error('The ' . __NAMESPACE__ . '\CreditCardType class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class CreditCardType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options): void
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Form/Type/GatewayChoiceType.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\OptionsResolver\OptionsResolver;

@trigger_error('The ' . __NAMESPACE__ . '\GatewayChoiceType class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class GatewayChoiceType extends AbstractType
{
/**
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Form/Type/GatewayConfigType.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\PropertyAccess\PropertyAccess;

@trigger_error('The ' . __NAMESPACE__ . '\GatewayConfigType class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class GatewayConfigType extends AbstractType
{
private GatewayFactoryRegistryInterface $registry;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\OptionsResolver\OptionsResolver;

@trigger_error('The ' . __NAMESPACE__ . '\GatewayFactoriesChoiceType class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class GatewayFactoriesChoiceType extends AbstractType
{
/**
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/PayumEvents.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

namespace Payum\Core\Bridge\Symfony;

@trigger_error('The ' . __NAMESPACE__ . '\PayumEvents class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
final class PayumEvents
{
public const GATEWAY_PRE_EXECUTE = 'payum.gateway.pre_execute';
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Reply/HttpResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
use Payum\Core\Reply\Base;
use Symfony\Component\HttpFoundation\Response;

@trigger_error('The ' . __NAMESPACE__ . '\HttpResponse class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class HttpResponse extends Base
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,13 @@
use Payum\Core\Reply\ReplyInterface;
use ReflectionObject;
use Symfony\Component\HttpFoundation\Response;
use function trigger_error;

@trigger_error('The ' . __NAMESPACE__ . '\ReplyToSymfonyResponseConverter class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class ReplyToSymfonyResponseConverter
{
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;

@trigger_error('The ' . __NAMESPACE__ . '\HttpRequestVerifier class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class HttpRequestVerifier implements HttpRequestVerifierInterface
{
/**
Expand Down
5 changes: 5 additions & 0 deletions src/Payum/Core/Bridge/Symfony/Security/TokenFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
use Payum\Core\Storage\StorageInterface;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

@trigger_error('The ' . __NAMESPACE__ . '\TokenFactory class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class TokenFactory extends AbstractTokenFactory
{
protected UrlGeneratorInterface $urlGenerator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\Exception\MissingOptionsException;

@trigger_error('The ' . __NAMESPACE__ . '\CreditCardDate class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* CreditCardDate
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*/
class CreditCardDate extends Constraint
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;

@trigger_error('The ' . __NAMESPACE__ . '\CreditCardDateValidator class is deprecated since version 2.0 and will be removed in 3.0. Use the same class from Payum/PayumBundle instead.', E_USER_DEPRECATED);

/**
* CreditCardDateValidator
* @deprecated since 2.0. Use the same class from Payum/PayumBundle instead.
*
* Validate if the Credit Card is not expired
*/
Expand Down
Loading