hamcrest/hamcrest-php
This is the PHP port of Hamcrest Matchers
v3.0.0
533M downloads/mo
#120 most downloaded on composer
hamcrest/hamcrest-php
What this package is like to depend on
Last release 5 months ago
17 Mar 2026
Release timing varies
gaps range from 4 months to 4.8 years
Most releases are documented
notes for 8 of 10 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
10 releases · first in 2013
1 release in the last 12 months
see the full history below
Release timeline
10 releases · Jun 2013 to Mar 2026Releases
latest 10-
v3.0.017 Mar 2026Release notes
Open source →What's Changed
- Solve the risky test warnings in PHPUnit by @aik099 in #89
- Add missing test for StringDescription:: toString by @pscheit in #90
- Add missing php extensions to the composer.json by @pscheit in #91
- Fix underscores to namespaces in README by @petemcfarlane in #56
- Improve docs to avoid Risky test warnings by @aik099 in #94
- Fix HasToString description by @pscheit in #93
- Add native typhints to all hamcrest classes (+ install phpstan) by @pscheit in #88
- Update readme link for renamed action by @pscheit in #101
- ci: Add testrun for PHP 8.5 by @Chris53897 in #102
New Contributors
- @pscheit made their first contribution in #90
- @petemcfarlane made their first contribution in #56
- @Chris53897 made their first contribution in #102
Full Changelog: v2.1.1...v2.1.2
-
v2.1.130 Apr 2025 -
v2.1.029 Apr 2025 -
v2.0.109 Jul 2020 -
v2.0.020 Jan 2016 -
v1.2.211 May 2015Release notes
Open source →- Adds more protection against double inclusion of functions in the global namespace.
-
v1.2.120 Jan 2015Nothing published for this version
-
v1.2.025 Sep 2014 -
v1.1.116 Sep 2013Nothing published for this version
-
v1.1.001 Jun 2013Release notes
Open source →Issues Fixed: 121, 138, 147
-
Added non-empty matchers to complement the emptiness-matching forms.
- nonEmptyString()
- nonEmptyArray()
- nonEmptyTraversable()
-
Added ability to pass variable arguments to several array-based matcher factory methods so they work like allOf() et al.
- anArray()
- arrayContainingInAnyOrder(), containsInAnyOrder()
- arrayContaining(), contains()
- stringContainsInOrder()
-
Matchers that accept an array of matchers now also accept variable arguments. Any non-matcher arguments are wrapped by IsEqual.
-
Added noneOf() as a shortcut for not(anyOf()).
-