Closed cordoval closed 10 years ago
You're suggesting that anything()
function, which internally calls \Hamcrest\Core\IsAnything::anything($description);
and returns matcher doesn't work?
Have you checked, that other matchers are affected as well?
I see, that problem comes from Mockery code https://github.com/padraic/mockery/blob/master/library/Mockery/Expectation.php#L303 where it check for \Hamcrest_Matcher
(which is compatible with official Hamcrest 1.1.0 release), but not for \Hamcrest\Matcher
, which is new name for same class.
I've posted issue to Mockery repo: padraic/mockery#225
ping @aik099 what is the status of this? since we have now fluid communication with @davedevelopment we can perhaps get some feedback?
I've updated https://github.com/padraic/mockery/pull/170 to make Mockery compatible with Hamcrest 1.1 (with namespaces) and use official repo (this one) as a dependency.
we should probably tag 1.2 or 2.0 on here so to mark the compatibility support. Also let's note that on the changelog there as i see there is none. @aik099 good job
we should probably tag 1.2 or 2.0 on here so to mark the compatibility support
The changes, that we made since 1.1.0 release are cosmetic ones and related to repo location/packagist only. No actual code changes really. That's why it's of no big importance to create a release for that, but we can create 1.1.1 if you wish. Repository move to different location isn't really a big code change to create 1.2 or even 2.0 release.
Also let's note that on the changelog there as i see there is none.
You mean, that we don't note changes made in each release here: https://github.com/hamcrest/hamcrest-php/releases
I think we should. Luckily there is a way to edit release notes after release was made too. Would you like to prepare release notes for each of releases? Actually you can put them in place yourself too.
My two cents, I think going forward you should semver, I would have 2.0 the namespaced version.
bump @aik099 is this still an issue?
Nope thanks to https://github.com/padraic/mockery/blob/master/library/Mockery/Expectation.php#L309 change.
note: transferred from https://github.com/cordoval/hamcrest-php/issues/18
Appears to be isolated to the dev-master version. When using hamcrest functions within mockery with() method, requirements never seem to be satisfied, even when using anything().
This post on stackoverflow explains in more detail: http://stackoverflow.com/questions/18277670/using-hamcrests-haskeyvaluepair-with-laravels-unit-test?answertab=oldest#tab-top