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

Fix PHP 8.2 and Other Related Issues #640

Open
wants to merge 43 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
76dc113
fix: Fatal error: Uncaught Error: Class "PhpCsFixer\Finder" not found
mralaminahamed Apr 30, 2024
591629c
added: required and optional properties
mralaminahamed Apr 30, 2024
b81fb0b
chore(composer): Updated to the latest version and config file also
mralaminahamed Apr 30, 2024
fad9d56
added: docker file for 8.1 and 8.2
mralaminahamed Apr 30, 2024
f4e69f4
fix: PHP Coding standards issues
mralaminahamed Apr 30, 2024
c6138da
removed: unused code
mralaminahamed Apr 30, 2024
d580082
add: missing property in Refund class
mralaminahamed Apr 30, 2024
959b1a7
added: missing property in PayIn
mralaminahamed Apr 30, 2024
475e87f
added: missing property in PayIn
mralaminahamed Apr 30, 2024
dd38b0f
Merge branch 'Mangopay:master' into fix/php-related-issues
mralaminahamed Apr 30, 2024
6da6e4f
Revert "fix: PHP Coding standards issues"
mralaminahamed Apr 30, 2024
6c17547
Update MangoPay/PayOut.php
mralaminahamed Apr 30, 2024
a096ea6
update: gitignore and attributes
mralaminahamed Apr 30, 2024
ba9a468
Merge branch 'fix/php-related-issues' of https://github.com/mralamina…
mralaminahamed Apr 30, 2024
96d67ae
added: label properties for KYC Document
mralaminahamed May 2, 2024
c1f8164
update: property doc for KYC $UserId
mralaminahamed May 2, 2024
ce7d988
update: api base, api ubo and its declaration for parameter type
mralaminahamed May 2, 2024
87bfb35
update: php cs fixer config
mralaminahamed May 2, 2024
c31570d
update: missing property for Ubo Declaration
mralaminahamed May 2, 2024
a12582a
Use local namespace for PayOutPaymentDetailsBankWire
mralaminahamed May 4, 2024
aa87640
Use local namespace for PayOutPaymentDetailsBankWire
mralaminahamed May 4, 2024
156a26d
Update Property documentation
mralaminahamed May 4, 2024
089bff7
Delete old install script
mralaminahamed May 4, 2024
964ee7e
delete: php cs fixer cache file
mralaminahamed May 4, 2024
596cca5
update: property documentation for KYC Documentation
mralaminahamed May 4, 2024
cfe79c5
update: Kyc Document class
mralaminahamed May 4, 2024
d77e72b
remove: shell path from docker composer
mralaminahamed May 6, 2024
85d3080
fix: php cs fixer issue at KYC Document property alignment
mralaminahamed May 6, 2024
27520ac
Merge remote-tracking branch 'upstream/master' into fix/php-related-i…
mralaminahamed May 30, 2024
d3f2448
Merge remote-tracking branch 'upstream/master' into fix/php-related-i…
mralaminahamed Jun 3, 2024
6dc14ea
rollback: `see` params for `$Type` in the `KycDocument`
mralaminahamed Jun 3, 2024
0149fb7
refactor: indentation is wrong in `PayOut.php`
mralaminahamed Jun 3, 2024
f205667
refactor: indentation is wrong in `PayOut.php`
mralaminahamed Jun 3, 2024
275dfda
refactor: Change the `@var` type to `object` because of there is many…
mralaminahamed Jun 3, 2024
87f0929
remove: `composer.sh` for php `8.1` and `8.2`
mralaminahamed Jun 3, 2024
ed80f9f
fix: line indents for `PayOut.php`
mralaminahamed Jun 3, 2024
6b9f10f
update: added docker config for `php 8.1` and `php 8.2` to `Makefile`
mralaminahamed Jun 3, 2024
f5303e0
update: added php versions for `php 8.1` and `php 8.2` to `build.yaml`
mralaminahamed Jun 3, 2024
3f3e135
refactor: property type for `PayOut.php`
mralaminahamed Jun 3, 2024
91ca58a
refactor: property type for `PayOut.php` (phpstan)
mralaminahamed Jun 3, 2024
586b770
refactor: property type for `PayOut.php` (phpstan)
mralaminahamed Jun 3, 2024
0268830
Merge branch 'master' into fix/php-related-issues
mralaminahamed Sep 23, 2024
beac573
Merge branch 'master' into fix/php-related-issues
mralaminahamed Dec 4, 2024
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ composer.lock

.*
!.github
!.php_cs
!.php-cs-fixer.*
mralaminahamed marked this conversation as resolved.
Show resolved Hide resolved
!.gitignore
!.gitattributes
1 change: 1 addition & 0 deletions .php-cs-fixer.cache
mralaminahamed marked this conversation as resolved.
Show resolved Hide resolved

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__.'/MangoPay')
->in(__DIR__.'/tests')
;

return (new PhpCsFixer\Config())
->setRules([
'@PSR12' => true,
'fully_qualified_strict_types' => true,
'array_syntax' => ['syntax' => 'short'],
'visibility_required' => [
'elements' => ['property', 'method'], // 'const' is removed for old PHP compat
],
])
->setFinder($finder)
;
17 changes: 0 additions & 17 deletions .php_cs

This file was deleted.

8 changes: 4 additions & 4 deletions MangoPay/ApiBankAccounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ class ApiBankAccounts extends Libraries\ApiBase
/**
* Retrieves a list of Transactions pertaining to a certain Bank Account
* @param string $bankAccountId Bank Account identifier
* @param \MangoPay\Pagination $pagination Pagination object
* @param \MangoPay\FilterTransactions $filter Filtering object
* @param \MangoPay\Sorting $sorting Sorting object
* @throws \MangoPay\Libraries\Exception
* @param Pagination $pagination Pagination object
* @param FilterTransactions $filter Filtering object
* @param Sorting $sorting Sorting object
* @throws Libraries\Exception
mralaminahamed marked this conversation as resolved.
Show resolved Hide resolved
*/
public function GetTransactions($bankAccountId, & $pagination = null, $filter = null, $sorting = null)
{
Expand Down
18 changes: 9 additions & 9 deletions MangoPay/ApiBankingAliases.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ApiBankingAliases extends Libraries\ApiBase
/**
* Get a banking alias
* @param string $bankingAliasId Banking alias identifier
* @return \MangoPay\BankingAlias returned from API
* @return BankingAlias returned from API
*/
public function Get($bankingAliasId)
{
Expand All @@ -20,8 +20,8 @@ public function Get($bankingAliasId)

/**
* Create a banking alias
* @param \MangoPay\BankingAlias $bankingAlias Banking alias
* @return \MangoPay\BankingAlias returned from API
* @param BankingAlias $bankingAlias Banking alias
* @return BankingAlias returned from API
* @throws Libraries\Exception
*/
public function Create($bankingAlias)
Expand All @@ -39,8 +39,8 @@ public function Create($bankingAlias)

/**
* Update banking alias
* @param \MangoPay\BankingAlias $bankingAlias Card object to save
* @return \MangoPay\BankingAlias Card object returned from API
* @param BankingAlias $bankingAlias Card object to save
* @return BankingAlias Card object returned from API
*/
public function Update($bankingAlias)
{
Expand All @@ -50,8 +50,8 @@ public function Update($bankingAlias)

/**
* Get all banking aliases
* @param \MangoPay\Pagination $pagination Pagination object
* @param \MangoPay\Sorting $sorting Object to sorting data
* @param Pagination $pagination Pagination object
* @param Sorting $sorting Object to sorting data
* @param string $walletId Wallet identifier
* @return \MangoPay\BankingAlias[] List of banking aliases
*/
Expand All @@ -64,8 +64,8 @@ public function GetAll($walletId, & $pagination = null, $sorting = null)
/**
* Get correct banking alias object
* @param object $response Response from API
* @return \MangoPay\BankingAlias BankingAlias object returned from API
* @throws \MangoPay\Libraries\Exception If occur unexpected response from API
* @return BankingAlias BankingAlias object returned from API
* @throws Libraries\Exception If occur unexpected response from API
*/
private function GetBankingAliasResponse($response)
{
Expand Down
10 changes: 5 additions & 5 deletions MangoPay/ApiCardPreAuthorizations.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class ApiCardPreAuthorizations extends Libraries\ApiBase
{
/**
* Create new pre-authorization object
* @param \MangoPay\CardPreAuthorization $cardPreAuthorization PreAuthorization object to create
* @return \MangoPay\CardPreAuthorization PreAuthorization object returned from API
* @param CardPreAuthorization $cardPreAuthorization PreAuthorization object to create
* @return CardPreAuthorization PreAuthorization object returned from API
*/
public function Create($cardPreAuthorization, $idempotencyKey = null)
{
Expand All @@ -20,7 +20,7 @@ public function Create($cardPreAuthorization, $idempotencyKey = null)
/**
* Get pre-authorization object
* @param string $cardPreAuthorizationId PreAuthorization identifier
* @return \MangoPay\CardPreAuthorization Card registration object returned from API
* @return CardPreAuthorization Card registration object returned from API
*/
public function Get($cardPreAuthorizationId)
{
Expand All @@ -29,8 +29,8 @@ public function Get($cardPreAuthorizationId)

/**
* Update pre-authorization object
* @param \MangoPay\CardPreAuthorization $cardPreAuthorization PreAuthorization object to save
* @return \MangoPay\CardPreAuthorization PreAuthorization object returned from API
* @param CardPreAuthorization $cardPreAuthorization PreAuthorization object to save
* @return CardPreAuthorization PreAuthorization object returned from API
*/
public function Update($cardPreAuthorization)
{
Expand Down
10 changes: 5 additions & 5 deletions MangoPay/ApiCardRegistrations.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class ApiCardRegistrations extends Libraries\ApiBase
{
/**
* Create new card registration
* @param \MangoPay\CardRegistration $cardRegistration Card registration object to create
* @return \MangoPay\CardRegistration Card registration object returned from API
* @param CardRegistration $cardRegistration Card registration object to create
* @return CardRegistration Card registration object returned from API
*/
public function Create($cardRegistration, $idempotencyKey = null)
{
Expand All @@ -20,7 +20,7 @@ public function Create($cardRegistration, $idempotencyKey = null)
/**
* Get card registration
* @param string $cardRegistrationId Card Registration identifier
* @return \MangoPay\CardRegistration Card registration object returned from API
* @return CardRegistration Card registration object returned from API
*/
public function Get($cardRegistrationId)
{
Expand All @@ -29,8 +29,8 @@ public function Get($cardRegistrationId)

/**
* Update card registration
* @param \MangoPay\CardRegistration $cardRegistration Card registration object to save
* @return \MangoPay\CardRegistration Card registration object returned from API
* @param CardRegistration $cardRegistration Card registration object to save
* @return CardRegistration Card registration object returned from API
*/
public function Update($cardRegistration)
{
Expand Down
26 changes: 13 additions & 13 deletions MangoPay/ApiCards.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class ApiCards extends Libraries\ApiBase
/**
* Get card
* @param string $cardId Card identifier
* @return \MangoPay\Card object returned from API
* @return Card object returned from API
*/
public function Get($cardId)
{
Expand All @@ -22,8 +22,8 @@ public function Get($cardId)
* The fingerprint is a hash uniquely generated per 16-digit card number.
*
* @param string $fingerprint The fingerprint hash
* @param \MangoPay\Pagination $pagination Pagination object
* @param \MangoPay\Sorting $sorting Sorting object
* @param Pagination $pagination Pagination object
* @param Sorting $sorting Sorting object
* @return \MangoPay\Card[] List of Cards corresponding to provided fingerprint
*/
public function GetByFingerprint($fingerprint, & $pagination = null, $sorting = null)
Expand All @@ -33,8 +33,8 @@ public function GetByFingerprint($fingerprint, & $pagination = null, $sorting =

/**
* Update card
* @param \MangoPay\Card $card Card object to save
* @return \MangoPay\Card Card object returned from API
* @param Card $card Card object to save
* @return Card Card object returned from API
*/
public function Update($card)
{
Expand All @@ -44,9 +44,9 @@ public function Update($card)
/**
* Gets a Card's PreAuthorizations
* @param int $cardId ID of the Card for which to retrieve PreAuthorizations
* @param \MangoPay\Pagination $pagination Pagination object
* @param \MangoPay\FilterPreAuthorizations filter Filtering object
* @param \MangoPay\Sorting $sorting Sorting object
* @param Pagination $pagination Pagination object
* @param FilterPreAuthorizations filter Filtering object
* @param Sorting $sorting Sorting object
* @return \MangoPay\CardPreAuthorization[] List of the Card's PreAuthorizations
*/
public function GetPreAuthorizations($cardId, $pagination = null, $filter = null, $sorting = null)
Expand All @@ -57,9 +57,9 @@ public function GetPreAuthorizations($cardId, $pagination = null, $filter = null
/**
* Retrieves a list of Transactions pertaining to a certain Card
* @param string $cardId Card identifier
* @param \MangoPay\Pagination $pagination Pagination object
* @param \MangoPay\FilterTransactions $filter Filtering object
* @param \MangoPay\Sorting $sorting Sorting object
* @param Pagination $pagination Pagination object
* @param FilterTransactions $filter Filtering object
* @param Sorting $sorting Sorting object
* @return \MangoPay\Transaction[]
*/
public function GetTransactions($cardId, & $pagination = null, $filter = null, $sorting = null)
Expand All @@ -70,7 +70,7 @@ public function GetTransactions($cardId, & $pagination = null, $filter = null, $
/**
* Validate a card
* @param $cardId
* @return \MangoPay\CardValidation
* @return CardValidation
* @throws Libraries\Exception
*/
public function ValidateCard($cardId, $cardValidation)
Expand All @@ -81,7 +81,7 @@ public function ValidateCard($cardId, $cardValidation)
/**
* Get card validation
* @param $cardId, $cardValidationId
* @return \MangoPay\Card
* @return Card
* @throws Libraries\Exception
*/
public function GetCardValidation($cardId, $cardValidationId)
Expand Down
Loading