omnipay icon indicating copy to clipboard operation
omnipay copied to clipboard

Optional methods in GatewayInterface cause deprecations

Open garak opened this issue 8 months ago • 0 comments
trafficstars

Using the @method annotation in an interface is probably not the best solution.

All the unimplemented methods raise a deprecation:

1x: Class "Omnipay\PayPal\ProGateway" should implement method "Omnipay\Common\GatewayInterface::acceptNotification(array $options = array()): \Omnipay\Common\Message\NotificationInterface": (Optional method) Receive and handle an instant payment notification (IPN).
    1x in DeprecationErrorHandler::shutdown from Symfony\Bridge\PhpUnit

  1x: Class "Omnipay\PayPal\ProGateway" should implement method "Omnipay\Common\GatewayInterface::completeAuthorize(array $options = array()): \Omnipay\Common\Message\RequestInterface": (Optional method) Handle return from off-site gateways after authorization.
    1x in DeprecationErrorHandler::shutdown from Symfony\Bridge\PhpUnit

  1x: Class "Omnipay\PayPal\ProGateway" should implement method "Omnipay\Common\GatewayInterface::completePurchase(array $options = array()): \Omnipay\Common\Message\RequestInterface": (Optional method) Handle return from off-site gateways after purchase.
    1x in DeprecationErrorHandler::shutdown from Symfony\Bridge\PhpUnit

  1x: Class "Omnipay\PayPal\ProGateway" should implement method "Omnipay\Common\GatewayInterface::void(array $options = array()): \Omnipay\Common\Message\RequestInterface": (Optional method) Generally can only be called up to 24 hours after submitting a transaction.
    1x in DeprecationErrorHandler::shutdown from Symfony\Bridge\PhpUnit

  1x: Class "Omnipay\PayPal\ProGateway" should implement method "Omnipay\Common\GatewayInterface::createCard(array $options = array()): \Omnipay\Common\Message\RequestInterface": (Optional method) The returned response object includes a cardReference, which can be used for future transactions.
    1x in DeprecationErrorHandler::shutdown from Symfony\Bridge\PhpUnit

  1x: Class "Omnipay\PayPal\ProGateway" should implement method "Omnipay\Common\GatewayInterface::updateCard(array $options = array()): \Omnipay\Common\Message\RequestInterface": (Optional method) Update a stored card.
    1x in DeprecationErrorHandler::shutdown from Symfony\Bridge\PhpUnit

  1x: Class "Omnipay\PayPal\ProGateway" should implement method "Omnipay\Common\GatewayInterface::deleteCard(array $options = array()): \Omnipay\Common\Message\RequestInterface": (Optional method) Delete a stored card.
    1x in DeprecationErrorHandler::shutdown from Symfony\Bridge\PhpUnit

garak avatar Mar 17 '25 12:03 garak