Repository navigation
PHPAY-109: cobrir o StaticPixCode no smoke test do 8.1 - #127
Merged
Merged
Conversation
The smoke test of the minimum supported version exercised Money and Customer but not the value object added in PHPAY-109, so its behaviour on PHP 8.1 rested on the phpVersion of PHPStan rather than on running. The Pest suite cannot fill that gap: the dev toolchain needs 8.2+, which is the whole reason the smoke test exists. Three checks: the test vector of the BACEN manual byte for byte, the amount and txid fields, and the two refusals. The vector is the one that matters — a CRC that stops before the 6304 literal gives 4AAD instead of 1D3D and produces a QR Code that does not read, and that would now fail the 8.1 job rather than reach a payer.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fecha o buraco que notei depois de mergear o #126.
O que muda
O smoke test da versão mínima exercitava
MoneyeCustomerna seção de value objects, mas não oStaticPixCode. A compatibilidade dele com o PHP 8.1 estava apoiada só nophpVersiondo PHPStan — análise estática, não execução.A suíte do Pest não resolve isso: ela roda em 8.2+ porque o toolchain de dev exige, e é justamente por isso que o smoke test existe.
Três checagens novas:
6304devolve4AADem vez de1D3De gera um QR Code que não lê. Com isso, esse erro passa a reprovar o job do 8.1 em vez de chegar na frente de um pagador.***do padrão sai quando há txid.Como testar
php .github/scripts/smoke.phplocalmente, que é o que roda acima — no PHP 8.4, porque não tenho 8.1 nesta máquina. A prova no 8.1 de verdade é o jobPHP 8.1 (mínimo suportado)deste PR, e é por ele que vale esperar antes de mergear.As checagens usam só
PHPay\Support\*eValidationException, nada de dependência de dev — o job instala com--no-dev.composer testsegue verde: 506 testes, PHPStan nível 9, links conferidos.Checklist
composer testpassa (Pint, Pest e PHPStan nível 9)Não fecha issue: a #109 já está fechada pelo #126, e isto é a cobertura que faltou.