chore(deps-dev): update PHPUnit, PHP_CodeSniffer, Doctrine CS and Infection - #16
Merged
Merged
Conversation
…ection Four major bumps that Dependabot had not opened yet: - phpunit/phpunit 11.5 -> 13.3 - squizlabs/php_codesniffer 3.13 -> 4.0 - doctrine/coding-standard 13 -> 14 - infection/infection 0.34 -> 0.35 PHPUnit 13 emits a new notice when createMock() is used without any configured expectation, which is the definition of a stub rather than a mock: 341 notices across 114 tests, all from five doubles built in two places. Those five become createStub(); the one double that does carry an expectation (LogoutCommandTest asserts logout() is called exactly once) stays a mock. The suite is unchanged otherwise: 505 tests, 1644 assertions, and the two deliberate deprecations from BaseClient's back-compat constructor. The phpcs 4.0 rewrite left the project ruleset intact. Verified against a probe file that the custom DebuggingFunctions sniff still loads and fires, that the 2-space ScopeIndent override still flags 4-space code, and that the severity trick re-enabling DoubleArrowNotAligned survives. phpcbf remains idempotent on the clean tree. Note for the record: PHPUnit 13 requires PHP >= 8.4.1 while this package declares ^8.4, so a dev install on exactly 8.4.0 would refuse. CI resolves 8.4 to its latest patch, and require-dev does not reach consumers.
heitoralthmann
added a commit
that referenced
this pull request
Aug 22, 2026
O código do CLI não precisa de nada que só exista no 8.4.1. Quem exige é o **PHPUnit 13**, adotado no #16 junto com as outras atualizações de ferramentas de desenvolvimento: ele declara `php >= 8.4.1`. Declarar `require: php ^8.4` enquanto o `require-dev` exige `>= 8.4.1` deixava um install de desenvolvimento em 8.4.0 exato falhar na **resolução de dependência** em vez de bater num requisito declarado — erro de composer em vez de mensagem clara. Subir o piso faz a declaração dizer a verdade. Para quem só instala o CLI o efeito prático é nulo: `require-dev` não é resolvido para consumidores, e o 8.4.1 substituiu o 8.4.0. ## Alcance - `composer.json`: `^8.4` -> `^8.4.1` (e o `content-hash` do lock) - README: badge de versão e a seção "Requisitos" - `docs/guia/instalacao.md`: seção "Requisitos" e a prosa do Homebrew - CHANGELOG sob `[Unreleased]`, já que estreitar quem consegue instalar é mudança user-facing — diferente do bump de dependência de dev do #16 A matriz do CI não muda: `setup-php` com `8.4` já resolve para o patch mais recente, bem acima do 8.4.1. ## Verificação local 505 testes / 1644 asserções, PHPStan sem erros, phpcs limpo, `docs:check` em dia, `composer validate --strict` válido e o dependency analyser sem apontamentos.
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.
Quatro majors de dependência de desenvolvimento que o Dependabot ainda não
tinha aberto:
phpunit/phpunitsquizlabs/php_codesnifferdoctrine/coding-standardinfection/infectionO que precisou mudar
PHPUnit 13 passou a emitir notice para
createMock()sem expectativa —que é a definição de stub, não de mock. Eram 341 notices em 114 testes,
todos vindos de cinco dublês construídos em dois lugares. Os cinco viraram
createStub(). O único que carrega expectativa de verdade(
LogoutCommandTestafirmando quelogout()é chamado exatamente uma vez)continua
createMock().Isso não reprovaria o CI de qualquer forma:
failOnWarningefailOnRiskyestão ligados, mas notice não é nenhum dos dois e o exit code já era 0.
Corrigido porque é a direção sinalizada pelo PHPUnit e o conserto era barato.
O que foi verificado
505 testes / 1644 asserções, PHPStan sem erros (
srcmax +testslevel 6),phpcs limpo,
docs:checkem dia,composer validate --strict,composer audite o dependency analyser sem apontamentos. As duasdeprecations que sobram são as intencionais do construtor de compatibilidade
do
BaseClient.A reescrita do phpcs 4.0 não derrubou o ruleset. Como um ruleset que
degrada silenciosamente vira
composer lintverde sem checar nada, avalidação foi feita contra um arquivo-sonda propositalmente violador: o sniff
próprio
DebuggingFunctionscarrega e dispara, o override deScopeIndentde 2 espaços ainda pega código com 4, e o truque de severidade que reabilita
DoubleArrowNotAlignedsobreviveu. Ophpcbfsegue idempotente.Ressalvas
php >= 8.4.1e o pacote declara^8.4. Um install dedesenvolvimento em 8.4.0 exato recusaria. Não morde na prática — o
setup-phpresolve8.4para o patch mais recente erequire-devnãochega em quem consome o CLI.
não tem pcov nem xdebug. Ele carregou o
infection.json5sem reclamar doschema e parou no check de driver de cobertura, então a config é válida na
0.35, mas uma execução real de mutação não foi rodada. O workflow é
workflow_dispatch.CHANGELOG não foi tocado: o projeto não registra bump de dependência de dev.