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

Padronização do header X-PagarMe-User-Agent V3 #371

Merged
merged 5 commits into from
Sep 10, 2020

Conversation

sfwill-dev
Copy link
Contributor

@sfwill-dev sfwill-dev commented Sep 8, 2020

Com o intuito de criar a possibilidade de monitorar o uso de nossos SDKs, esse PR tem o objetivo de padronizar o header X-PagarMe-User-Agent, enviando a versão do PHP em uso, além da versão do SDK.


Obs.: Foi necessário ajustar alguns testes que nem tem relação com esse PR, devido à config da company de teste não aceitar parcelamento na bandeira Diners e também aos Payables agora serem async com o Atlas. Também estava ocorrendo incompatibilidade com o phpunit 4, guzzlehttp e a versão 7.2 do PHP:

Fatal error: Declaration of Mock_Client_8cee1f51::sendAsync(Psr\Http\Message\RequestInterface $request, array $options = Array) must be compatible with GuzzleHttp\Client::sendAsync(Psr\Http\Message\RequestInterface $request, array $options = Array): GuzzleHttp\Promise\PromiseInterface in /root/repo/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php(290) : eval()'d code on line 1

Porém se atualizarmos o phpunit não será mais possível testar nas versões 5 do PHP. Fixei a versão do guzzlehttp no composer.json. Lembrando que essa é a V3 do nosso SDK, ainda em uso, porém a mais atual é a V4.


Issue relacionada: https://github.com/pagarme/Support/issues/181

@sfwill-dev sfwill-dev self-assigned this Sep 8, 2020
@sfwill-dev sfwill-dev force-pushed the fix/refactor-useragent-header-v3 branch from 2460a24 to 18547da Compare September 8, 2020 20:56
@sfwill-dev sfwill-dev force-pushed the fix/refactor-useragent-header-v3 branch from 18547da to 577dc1d Compare September 8, 2020 21:04
@sfwill-dev sfwill-dev changed the title fix: refactor useragent header v3 Padronização do header X-PagarMe-User-Agent V3 Sep 8, 2020
@sfwill-dev sfwill-dev requested a review from murilohns September 9, 2020 13:44
@murilohns murilohns requested review from devdrops and dudu September 9, 2020 13:45
@sfwill-dev sfwill-dev force-pushed the fix/refactor-useragent-header-v3 branch 4 times, most recently from fc01304 to 3235ba8 Compare September 10, 2020 14:56
@sfwill-dev sfwill-dev force-pushed the fix/refactor-useragent-header-v3 branch from 3235ba8 to bbada41 Compare September 10, 2020 15:17
@sfwill-dev sfwill-dev merged commit 38984ee into V3 Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants