-
Notifications
You must be signed in to change notification settings - Fork 3
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
refactor: remove guzzle dependency #468
base: main
Are you sure you want to change the base?
Conversation
# Conflicts: # .github/workflows/accounts-qc-php.yml # .zip-contents # Makefile # composer.json # composer.lock # config.local.php # config.preprod.php # config/admin/services.yml # config/common.yml # config/front/services.yml # ps_accounts.php
src/Api/Client/OAuth2/UserInfos.php
Outdated
// [rat] => 1736251522 | ||
// [sub] => 4rFN5bm2piPeYpsotUIwcyabcdeF | ||
// ) [] [] | ||
class UserInfos |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without s if possible
@@ -56,7 +56,8 @@ public function execute(array $params = []) | |||
$rsaKeysProvider = $this->module->getService(RsaKeysProvider::class); | |||
try { | |||
$rsaKeysProvider->cleanupKeys(); | |||
$rsaKeysProvider->generateKeys(); | |||
// FIXME: We MUST generate a new key here to avoid concurrent key re-generation at Presenter display time | |||
//$rsaKeysProvider->generateKeys(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be fixed in this PR?
} catch (IdentityProviderException $e) { | ||
$this->logger->error('error while executing middleware : ' . $e->getMessage()); | ||
// } catch (IdentityProviderException $e) { | ||
// $this->logger->error('error while executing middleware : ' . $e->getMessage()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented code
src/Provider/ShopProvider.php
Outdated
@@ -87,7 +87,8 @@ public function formatShopData(array $shopData, $psxName = '', $refreshTokens = | |||
|
|||
// LinkAccount | |||
'uuid' => $linkShop->getShopUuid() ?: null, | |||
'publicKey' => $rsaKeyProvider->getOrGenerateAccountsRsaPublicKey() ?: null, | |||
//'publicKey' => $rsaKeyProvider->getOrGenerateAccountsRsaPublicKey() ?: null, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
@@ -66,7 +66,7 @@ public function itShouldSucceed() | |||
$this->assertResponseDeleted($response); | |||
|
|||
// FIXME: empty response | |||
// $this->assertArraySubset(['success' => true], $json); | |||
//$this->assertArraySubset(['success' => true], $json); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should it be removed then?
'objectResponse' => true, | ||
'allowRedirects' => true, | ||
|
||
// 'base_uri' => $baseUrl, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
@@ -173,10 +181,13 @@ public function assertResponseError($response) | |||
*/ | |||
public function getResponseJson($response) | |||
{ | |||
$ary = json_decode($response->getBody()->getContents(), true); | |||
$response->getBody()->rewind(); | |||
// FIXME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
commented code
# Conflicts: # tests/Unit/Http/Client/CircuitBreaker/CircuitBreakerTest.php
# Conflicts: # src/Hook/ActionShopAccountUnlinkAfter.php # src/Provider/RsaKeysProvider.php # src/Provider/ShopProvider.php # src/Repository/ConfigurationRepository.php
# Conflicts: # _dev/package.json # config.xml # ps_accounts.php
Quality Gate passedIssues Measures |
To go a step further reducing friction with the PrestaShop module's ecosystem, reducing module weight.
As a module we just need to do a few things, not to embed huge libraries so let's get straight to the point and isolate a much a possible from other modules to avoid collisions, also stay lighter.
Still a POC, but fully functional.
Benefits: