Repository navigation
PHPAY-165: gerar a matriz de capacidades e tornar o grant da licença visível - #166
Merged
Merged
Conversation
…rant
The README matrix was two releases wrong: the refunds and webhook-reading
columns were missing from the moment those capabilities landed, in v2.5 and
v2.6, and it was only noticed when the matrix was generated from the code to
check it. Ten gateways by eight capabilities is eighty cells nobody reviews.
So it is generated now. capability-matrix.php builds the table from
Gateway::cases() x Capability::cases() using the label() each enum already
exposes, so no label is duplicated in the script and a new one appears on its
own. --write rewrites the block between markers, --check fails on divergence
and runs in composer test and in CI. The guard was proven by introducing the
same drift that happened for real and watching it fail.
The roadmap table ("Cobertura por gateway") was missing Inter and said seven
gateways where there are eight. Fixed, and it now states that the generated
matrix is the authoritative one: its own Pix column means accepting Pix, not
managing keys, which is why the two never agreed.
The licence grant was invisible. The section at the bottom of the README is
thorough, but a reader who sees only the BUSL-1.1 badge at the top never
reaches it and assumes a restriction that is not there. One line near the top
now says what is allowed (production, closed-source, commercial), what is not
(reselling it as a competing SDK), and that it turns MIT in 2030.
Two repository settings were changed outside this commit, for the same
reason: the topics were only gateways/invoices/receipts and are now eighteen,
and GitHub private vulnerability reporting was off and is now on - which
matters because SECURITY.md points at sec@phpay.io, on a domain that does not
resolve.
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.
Closes #165.
Três consertos de credibilidade e descoberta. Nenhum muda comportamento da
biblioteca.
A matriz do README agora é gerada
Ela ficou duas releases errada: faltavam as colunas de estornos e de
leitura de webhook desde que as capacidades entraram, nas v2.5 e v2.6. Só
foi notado quando gerei a matriz a partir do código para conferir. Dez gateways
por oito capacidades são 80 células que ninguém revisa.
.github/scripts/capability-matrix.phpmonta a tabela deGateway::cases()×Capability::cases()usando olabel()que cada enum já expõe — nenhumrótulo é duplicado no script, e rótulo novo aparece sozinho.
O
--checkentrou nocomposer teste no CI, depois do passo dos links.Provei a guarda em vez de confiar nela: reintroduzi a deriva que aconteceu
de verdade (Asaas sem estornos) e o
composer test:matrixsaiu com 1.A tabela de roteiro estava errada, e contradizia a outra
"Cobertura por gateway" estava sem o Inter e dizia "sete gateways" onde já
são oito. Consertei, e acrescentei o que faltava dizer: a matriz gerada é a
autoritativa. As duas nunca iam concordar porque medem coisas diferentes — a
coluna Pix da tabela de roteiro significa aceitar Pix, não gerenciar chaves,
e por isso o Mercado Pago aparece com ✅ lá e com — na gerada.
Não apaguei a tabela: ela mostra o que está planejado, que a gerada não
sabe. Mas duas matrizes num README é superfície de deriva, e decidir se ela
fica é seu, não meu.
O grant da licença estava invisível
Correção do que eu disse antes: eu ia recomendar trocar a BUSL por MIT. Fui
ler os parâmetros e a decisão é boa e bem redigida — o Additional Use Grant
permite produção, fechado e comercial, e vira MIT em 2030-09-20. A seção de
licença no fim do README é completa, com tabela de pode/não pode e tudo.
O problema é só de posição: quem vê o badge
BUSL-1.1no topo e não desce1300 linhas assume restrição e fecha a aba. Um scanner de licença corporativo
faz o mesmo. Uma linha no topo agora resolve, com link para a seção.
Fora deste PR, porque é configuração e não arquivo
gateways,invoices,receipts. Agora são 18, comphp,pix,boleto,payment-gateway,laravel,brazil,finteche osnomes dos gateways. Busca por topic é caminho de descoberta primário;
ligado. Isso importa porque o
SECURITY.mdaponta parasec@phpay.io, ephpay.ionão existe no DNS (NXDOMAIN, sem MX) — numa biblioteca depagamentos, um canal de segurança que promete e não entrega é pior que não
ter. A partir de agora há um canal que funciona.
O que continua em aberto, e é decisão sua
Os outros contatos do domínio morto: conduta e suporte (
fale@phpay.io),licenciamento comercial (
LICENSE.mdconvida a escrever e ninguémrecebe) e a homepage do repositório e do Packagist (
doc.phpay.io).Não escolhi endereço por você: publicar um e-mail seu num repositório público é
decisão sua, não minha.
Verificação
composer test: lint, 770 testes, PHPStan nível 9, 113 links, matrizconferida. Smoke com 97 verificações.