NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #618 most downloaded on Packagist
Psalm plugin for PHPUnit
Latest stable
1.0.0
Last release 13 days ago
10 Nov 2026
Ships unpredictably
gaps range from 1 weeks to 1.3 years
Most releases are documented
notes for 43 of 58 stable releases
Nothing withdrawn
no release was ever pulled
8 years old
58 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
Requirements: PHP 8.2, PHPUnit 11 and Psalm 7.2 or newer. Projects on PHP 8.1, PHPUnit 10 or Psalm 6 keep using 0.22, which still gets bug fixes.
@test, @dataProvider, @covers and the other tags are reported as IgnoredDocblockMetadata, which names the attribute to use (#[Test], #[DataProvider], #[CoversClass], ...). They no longer make a method a test or a data provider.InvalidNamedArgument, TooFewArguments);: iterable, : array, : \Generator) have their datasets checked against the type Psalm infers from the provider's body. Where that is not possible they are reported as MixedReturnStatement, asking for a @return type.UnspecificEqualsAssertion, UnspecificNullAssertion, UnspecificBooleanAssertion and UnspecificCountAssertion (errorLevel="1" only) suggest assertSame() over assertEquals() for two values of one scalar type, and assertNull(), assertTrue() / assertFalse() and assertCount() over assertSame();MissingParentCall reports setUp(), tearDown() and the other hook overrides that never call parent::;InvalidPhpUnitAnnotation reports docblock tags that PHPUnit drops (/** @dataProvider*/, @group(slow));UndefinedClass, UndefinedMethod and UndefinedFunction report missing #[Covers*] / @covers targets and ->method('typo') on mocks.UnspecificEqualsAssertion can be numerous in older test suites. Rector's AssertEqualsToSameRector fixes it, or it can be turned off:
<issueHandlers>
<PluginIssue name="UnspecificEqualsAssertion" errorLevel="suppress"/>
</issueHandlers>
<details>
assertNull(), assertTrue() / assertFalse() and assertCount() over assertSame() (#198)assertSame() over assertEquals() for two values of one scalar type (#208)assertTrue() / assertFalse() over assertEquals(true|false, ...) (#233)createMockForIntersectionOfInterfaces() and createStubForIntersectionOfInterfaces() (#207)#[DataProviderExternal] (#211)->method('...') on mocks (#212)->method('...') on unions of mocks (#231)setUp() and tearDown() overrides that don't call the parent (#215)assertPreConditions() and assertPostConditions() overrides that don't call the parent (#229)#[Covers*] and @covers targets exist (#224)#[DataProviderClosure] providers (#242)@return type (#275)prophesize() without ProphecyTrait (#258)#[DataProvider('Other::method')] as an undefined provider, like PHPUnit (#235)@psalm-suppress for data provider and dataset issues (#257)@psalm tag (#232)setUp() and #[Before] from traits for MissingConstructor (#260)iterable<V> or Generator<V> (#262)TooFewArguments for list<T> datasets (#264)ArgumentTypeCoercion (#265)mixed dataset values as MixedArgument (#271)InvalidArgument for test parameters typed with the method's own templates (#270)MixedArgumentTypeCoercion for closure parameters typed with the method's own templates (#277)assertSame() in external provider fixtures (#230)TestCase.feature into one feature file per area (#243)Context instead of copying it into every scenario (#254)</details>
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.22.2...1.0.0
Your coding agent can read these notes before it upgrades. Set up the MCP server →
First release from the 0.22.x maintenance branch (Psalm 6 and PHP 8.1). Psalm 7 support starts at 7.2, the first Psalm 7 that accepts this plugin vers
First release from the 0.22.x maintenance branch (Psalm 6 and PHP 8.1). Psalm 7 support starts at 7.2, the first Psalm 7 that accepts this plugin version.
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.22.1...0.22.2
Supports Psalm 6 again (alongside Psalm 7). 0.22.x is the last release line with Psalm 6 support.
Supports Psalm 6 again (alongside Psalm 7). 0.22.x is the last release line with Psalm 6 support.
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.22.0...0.22.1
PHPUnit 11 and later reject them at runtime, and PHPUnit 10.5 deprecates them.
InvalidDataProvider issue for data providers that aren't public static. PHPUnit 11 and later reject them at runtime, and PHPUnit 10.5 deprecates them.checkForThrowsDocblock: PHPUnit's own exceptions (failed assertions, mock builder errors) no longer need @throws. Neither do calls after expectException().assertNotEmpty(): ?Customer becomes Customer, list<int>|null becomes non-empty-list<int>.expectException(), provider issues are reported on the right line, @depends values count in provider checks, and magic method calls on ObjectProphecy are allowed.ObjectProphecy by @alies-dev in https://github.com/psalm/psalm-plugin-phpunit/pull/171@depends values in data provider checks by @alies-dev in https://github.com/psalm/psalm-plugin-phpunit/pull/191checkForThrowsDocblock by @alies-dev in https://github.com/psalm/psalm-plugin-phpunit/pull/194assertNotEmpty() by @alies-dev in https://github.com/psalm/psalm-plugin-phpunit/pull/196Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.21.1...0.22.0
Rewrite README: what the plugin does and why to use it by @alies-dev in https://github.com/psalm/psalm-plugin-phpunit/pull/161
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.21.0...0.21.1
Supports Psalm 7 and psalm/psalm-plugin-api ^0.4.
Supports Psalm 7 and psalm/psalm-plugin-api ^0.4.
Bump plugin API to include ^0.3.
Bump plugin API to include ^0.3.
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.20.3...0.20.4
Bumps the plugin api to include ^0.2.
Bumps the plugin api to include ^0.2.
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.20.2...0.20.3
Fix #[Test] attribute detection for inherited and fully-qualified attributes by @alies-dev in https://github.com/psalm/psalm-plugin-phpunit/pull/160
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.20.1...0.20.2
Nothing published for this version
Switch to psalm/psalm-plugin-api 0.1.0 (targeting Psalm v7 beta)
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.19.5...0.20.0
Merge pull request #151 from Ocramius/feature/support-multiple-data-p…
Merge pull request #151 from Ocramius/feature/support-multiple-data-p…
Ensure that all @dataProvider and #[DataProvider] (multiple) are considered by @Ocramius in https://github.com/psalm/psalm-plugin-phpunit/pull/151
@dataProvider and #[DataProvider] (multiple) are considered by @Ocramius in https://github.com/psalm/psalm-plugin-phpunit/pull/151Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.19.4...0.19.5
Implemented support for #[Test], #[DataProvider], #[Before] attributes, cleaned up old PHPUnit/Prophecy support by @Ocramius in https://github.com/psa
#[Test], #[DataProvider], #[Before] attributes, cleaned up old PHPUnit/Prophecy support by @Ocramius in https://github.com/psalm/psalm-plugin-phpunit/pull/149Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.19.3...0.19.4
This release adds support for psalm v7.
This release adds support for psalm v7.
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.19.2...0.19.3
Bumps composer requirements for psalm v6 support.
Bumps composer requirements for psalm v6 support.
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.19.0...0.19.2
Replace deprecated ::set-output by @weirdan in https://github.com/psalm/psalm-plugin-phpunit/pull/132
This release adds support for Psalm 6, dropping support for Psalm 4.
::set-output by @weirdan in https://github.com/psalm/psalm-plugin-phpunit/pull/132Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.18.4...0.19.0
Allow Psalm 5.0 by @ddeboer in https://github.com/psalm/psalm-plugin-phpunit/pull/127
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.18.3...0.18.4
Fix typo, it turns out $_ is used later on as a ref parameter by @danog in https://github.com/psalm/psalm-plugin-phpunit/pull/126
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.18.2...0.18.3
Dumb version detection by @danog in https://github.com/psalm/psalm-plugin-phpunit/pull/125
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.18.1...0.18.2
Nothing published for this version
[composer.json] allow Psalm 5 beta by @someniatko in https://github.com/psalm/psalm-plugin-phpunit/pull/122
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.17.0...0.18.0
Improve provider non-optional argument phrasing by @AndrolGenhald in https://github.com/psalm/psalm-plugin-phpunit/pull/118
Full Changelog: https://github.com/psalm/psalm-plugin-phpunit/compare/0.16.1...0.17.0
(#112) unused adapters for older Psalm versions were removed
(#111) compatibility with future Psalm 5
(#109) @weph fixed namespace of RuntimeException which is required to allow the plugin to be used with checkForThrowsDocblock Psalm option.
RuntimeException which is required to allow the plugin to be used with checkForThrowsDocblock Psalm option.The plugin no longer crashes when it encounters non-iterable return type on a data provider (#105, #106)
The plugin can now be used with PHPUnit installed in a non-standard location (#103, thanks @VincentLanglet)
Nothing published for this version
Nothing published for this version
This also allows the plugin to be installed in PHP 8 using composer
This also allows the plugin to be installed in PHP 8 using composer
Nothing published for this version
Nothing published for this version
Dependency on ocramius/package-versions was replaced with composer/package-versions-deprecated, which is 100% compatible replacement. If you get confl…
This release adds support for phpspec/prophecy-phpunit (forward-compatible integration between PHPUnit and Prophecy). Also @ktomk added definitions for TestCase::createConfiguredMock() and TestCase::createPartialMock().
Dependency on ocramius/package-versions was replaced with composer/package-versions-deprecated, which is 100% compatible replacement. If you get conflicts upgrading to this version, which may happen if you have direct dependency on ocramius/package-versions, replace it with composer/package-versions-deprecated.
@vladyslavstartsev performed some intenal cleanup.
(#72 / #73 ) Argument::that() calls with closure accepting any parameters were erroneously marked as invalid (thanks @mr-feek)
Argument::that() calls with closure accepting any parameters were erroneously marked as invalid (thanks @mr-feek)This is a housekeeping release, dropping old stuff and providing a cleaner state to go forward from.
This is a housekeeping release, dropping old stuff and providing a cleaner state to go forward from.
(#50) public static was missing from signatures of assertSame()/assertNotSame() (thanks @snapshotpl)
public static was missing from signatures of assertSame()/assertNotSame() (thanks @snapshotpl)(#57, #58) External data providers were mistakenly reported missing when Psalm was run on a single test file
Nothing published for this version
Added support for external data providers (@dataProvider \Some\External\Class::providerMethod) (#45, #44)
@dataProvider \Some\External\Class::providerMethod) (#45, #44)list: @return iterable<list<type>>Minimum Psalm version is 3.6.2 now
Fixed crash on invalid @psalm-* annotation
@psalm-* annotation (#37)@dataProvider annotations were dropped)Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
This release allows PossiblyUnusedMethod to be ignored in --diff and threaded mode
This release allows PossiblyUnusedMethod to be ignored in --diff and threaded mode
Nothing published for this version
Fatal error with dataProvider that has no explicit return type
Variadics test methods referencing data providers are now correctly type checked (#23, #24)
Descendant of a class with initializers should produce no MissingConstructor
expectException now requires class-string (use Exception\Name::class), unless `allowCoercionFromStringToClassConst` is enabled
expectException now requires class-string (use Exception\Name::class), unless allowCoercionFromStringToClassConst is enabledsetUp or methods marked with @before)PHP 7.0 compatibilty - thanks @SignpostMarv
Nothing published for this version
Nothing published for this version
Improved support for both PHPUnit mocks and Prophecy mocks
Improved support for both PHPUnit mocks and Prophecy mocks
Nothing published for this version
Adds support for PHPUnit's assertions, and also mock objects.
Adds support for PHPUnit's assertions, and also mock objects.
One column per quarter.