Skip to content

Commit

Permalink
fix: remove call to newer magento versions functionalities
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateus Picoloto committed Dec 7, 2023
1 parent c29b37c commit 0cf91ec
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 34 deletions.
7 changes: 2 additions & 5 deletions Block/Adminhtml/Form/Field/CreditCardPspField.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Magento\Backend\Block\Template\Context;
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\View\Helper\SecureHtmlRenderer;
use Pagarme\Pagarme\Model\Account;
use Pagarme\Pagarme\Model\PagarmeConfigProvider;

Expand All @@ -20,15 +19,13 @@ class CreditCardPspField extends Field
* @param Context $context
* @param Account $account
* @param array $data
* @param SecureHtmlRenderer|null $secureRenderer
*/
public function __construct(
Context $context,
Account $account,
array $data = [],
?SecureHtmlRenderer $secureRenderer = null
array $data = []
) {
parent::__construct($context, $data, $secureRenderer);
parent::__construct($context, $data);
$this->account = $account;
}

Expand Down
7 changes: 2 additions & 5 deletions Block/Adminhtml/Form/Field/GatewayField.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Magento\Backend\Block\Template\Context;
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\View\Helper\SecureHtmlRenderer;
use Pagarme\Pagarme\Model\Account;

class GatewayField extends Field
Expand All @@ -25,16 +24,14 @@ class GatewayField extends Field
* @param Account $account
* @param string $paymentMethodName
* @param array $data
* @param SecureHtmlRenderer|null $secureRenderer
*/
public function __construct(
Context $context,
Account $account,
string $paymentMethodName = '',
array $data = [],
?SecureHtmlRenderer $secureRenderer = null
array $data = []
) {
parent::__construct($context, $data, $secureRenderer);
parent::__construct($context, $data);
$this->account = $account;
$this->paymentMethodName = $paymentMethodName;
}
Expand Down
7 changes: 2 additions & 5 deletions Block/Adminhtml/Form/Field/InstallmentsNumber.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Config\Model\ResourceModel\Config\Data\CollectionFactory;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\View\Helper\SecureHtmlRenderer;
use Pagarme\Pagarme\Model\Account;
use Pagarme\Pagarme\Model\PagarmeConfigProvider;

Expand All @@ -22,16 +21,14 @@ class InstallmentsNumber extends Field
* @param CollectionFactory $configCollectionFactory
* @param Account $account
* @param array $data
* @param SecureHtmlRenderer|null $secureRenderer
*/
public function __construct(
Context $context,
CollectionFactory $configCollectionFactory,
Account $account,
array $data = [],
?SecureHtmlRenderer $secureRenderer = null
array $data = []
) {
parent::__construct($context, $data, $secureRenderer);
parent::__construct($context, $data);
$this->configCollectionFactory = $configCollectionFactory;
$this->account = $account;
}
Expand Down
7 changes: 2 additions & 5 deletions Block/Adminhtml/Form/Field/SoftDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
use Magento\Backend\Block\Template\Context;
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\View\Helper\SecureHtmlRenderer;
use Pagarme\Pagarme\Model\Account;

class SoftDescriptor extends Field
Expand All @@ -25,16 +24,14 @@ class SoftDescriptor extends Field
* @param Account $account
* @param string $paymentMethodName
* @param array $data
* @param SecureHtmlRenderer|null $secureRenderer
*/
public function __construct(
Context $context,
Account $account,
string $paymentMethodName = '',
array $data = [],
?SecureHtmlRenderer $secureRenderer = null
array $data = []
) {
parent::__construct($context, $data, $secureRenderer);
parent::__construct($context, $data);
$this->account = $account;
$this->paymentMethodName = $paymentMethodName;
}
Expand Down
7 changes: 2 additions & 5 deletions Block/Adminhtml/Form/Fieldset/CreditCardGatewayFieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Magento\Config\Block\System\Config\Form\Fieldset;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\View\Helper\Js;
use Magento\Framework\View\Helper\SecureHtmlRenderer;
use Pagarme\Pagarme\Model\Account;
use Pagarme\Pagarme\Model\PagarmeConfigProvider;

Expand All @@ -24,17 +23,15 @@ class CreditCardGatewayFieldset extends Fieldset
* @param Js $jsHelper
* @param Account $account
* @param array $data
* @param SecureHtmlRenderer|null $secureRenderer
*/
public function __construct(
Context $context,
Session $authSession,
Js $jsHelper,
Account $account,
array $data = [],
?SecureHtmlRenderer $secureRenderer = null
array $data = []
) {
parent::__construct($context, $authSession, $jsHelper, $data, $secureRenderer);
parent::__construct($context, $authSession, $jsHelper, $data);
$this->account = $account;
}

Expand Down
7 changes: 2 additions & 5 deletions Block/Adminhtml/Form/Fieldset/CustomPaymentFieldset.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Magento\Config\Block\System\Config\Form\Fieldset;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\View\Helper\Js;
use Magento\Framework\View\Helper\SecureHtmlRenderer;
use Pagarme\Pagarme\Model\Account;

class CustomPaymentFieldset extends Fieldset
Expand All @@ -29,18 +28,16 @@ class CustomPaymentFieldset extends Fieldset
* @param Account $account
* @param string $paymentMethodName
* @param array $data
* @param SecureHtmlRenderer|null $secureRenderer
*/
public function __construct(
Context $context,
Session $authSession,
Js $jsHelper,
Account $account,
string $paymentMethodName = '',
array $data = [],
?SecureHtmlRenderer $secureRenderer = null
array $data = []
) {
parent::__construct($context, $authSession, $jsHelper, $data, $secureRenderer);
parent::__construct($context, $authSession, $jsHelper, $data);
$this->account = $account;
$this->paymentMethodName = $paymentMethodName;
}
Expand Down
6 changes: 2 additions & 4 deletions Block/Adminhtml/System/Config/Form/Field/HubIntegration.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Magento\Config\Block\System\Config\Form\Field;
use Magento\Framework\Data\Form\Element\AbstractElement;
use Magento\Framework\Phrase;
use Magento\Framework\View\Helper\SecureHtmlRenderer;
use Pagarme\Core\Hub\Services\HubIntegrationService;
use Pagarme\Pagarme\Concrete\Magento2CoreSetup;
use Pagarme\Pagarme\Model\Account;
Expand All @@ -22,11 +21,10 @@ class HubIntegration extends Field
public function __construct(
Account $account,
Context $context,
array $data = [],
?SecureHtmlRenderer $secureRenderer = null
array $data = []
) {
$this->account = $account;
parent::__construct($context, $data, $secureRenderer);
parent::__construct($context, $data);
}

/**
Expand Down
7 changes: 7 additions & 0 deletions Model/Graphql/PixDataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@

namespace Pagarme\Pagarme\Model\Graphql;

if (!class_exists('\Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderInterface')) {
class PixDataProvider {

}
return;
}

use Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderInterface;

/**
Expand Down

0 comments on commit 0cf91ec

Please sign in to comment.