Repository navigation
Blink: port 5 PhpUnit fixers (strict, assert new names, mock, dedicate assert internal type, namespaced) - #280
Merged
Merged
Conversation
TomasVotruba
force-pushed
the
blink-port-phpunit
branch
5 times, most recently
from
November 4, 2026 17:58
4bd7f86 to
d3ceec3
Compare
…e assert internal type, namespaced)
TomasVotruba
force-pushed
the
blink-port-phpunit
branch
from
November 4, 2026 18:00
d3ceec3 to
7e9300c
Compare
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.
Ports a batch of PHP-CS-Fixer PhpUnit fixers to the Go
blinkengine. Each landed fixer mirrors its PHP-CS-Fixer 3.95 source faithfully, is registered inrules.All()with its upstreamgetPriority()value, and carries a parity test whose expected outputs were generated by running PHP-CS-Fixer 3.95 itself. No fixer was added to theconfig/set/prepared sets.Landed
PhpUnitStrictFixer- assertEquals/assertNotEquals/assertAttributeEquals/assertAttributeNotEquals to their strict Same variants, for 2 or 3 argument calls; honors theassertionsoption.PhpUnitAssertNewNamesFixer- renames deprecated assertions (assertFileNotExists to assertFileDoesNotExist, assertRegExp to assertMatchesRegularExpression, ...).PhpUnitMockFixer- getMock/getMockWithoutInvokingTheOriginalConstructor to createMock/createPartialMock; honors thetargetoption.PhpUnitDedicateAssertInternalTypeFixer- assertInternalType("array", $x) to assertIsArray($x) and the negated forms, with anonymous-class skipping.PhpUnitNamespacedFixer- old underscore class names (PHPUnit_Framework_TestCase) to the namespaced form, with the dedicated class map and import-aware short-name substitution; honors thetargetoption.Skipped (deferred for true-parity confidence)
PhpUnitSizeClassFixer,PhpUnitInternalClassFixer,PhpUnitTestClassRequiresCoversFixer- need a faithful WhitespacesAware doc-block create/reflow plus attribute FQCN prevention.PhpUnitDataProviderStaticFixer,PhpUnitDataProviderReturnTypeFixer,PhpUnitDataProviderNameFixer,PhpUnitDataProviderMethodOrderFixer- need DataProviderAnalyzer (attribute FQCN resolution, method/return-type analysis, method reordering).PhpUnitExpectationFixer- multi-line indentation-sensitive statement rewriting.PhpUnitDedicateAssertFixer- multi-branch (instanceof, count/sizeof, argument swapping) rewriting.PhpUnitNoExpectationAnnotationFixer,PhpUnitAttributesFixer- annotation to method/attribute conversion with FQCN resolution.PhpUnitTestCaseStaticMethodCallsFixer- large static-method registry plus call-context analysis.Partial but correct beats complete but wrong: the skipped fixers rest on analyzers (attribute FQCN resolution, doc-block reflow, type inference) that cannot yet be matched with confidence.
Gates
go build,go vet,go test -race,gofmt -l -s,go fix -diff, modernize andgolangci-lintall clean.bin/rule-counts.sh --checkup to date (blink 257).