hamcrest / hamcrest-php

PHP Hamcrest implementation [Official]
Other
6.95k stars 44 forks source link

Add .gitattributes #70

Closed JimChenWYU closed 3 years ago

JimChenWYU commented 3 years ago

when I use phpunit higher than 7.*, because this package depend phpunit less than 7.x, so alaways report me

PHP Fatal error: Declaration of Hamcrest\Core\CombinableMatcherTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in ...

so I add .gitattributes file to filter tests directory when I depend this package

JimChenWYU commented 3 years ago

Same as #69

aik099 commented 3 years ago

It looks like you're attempting to run Hamcrest's own test suite (located in a vendor folder) from inside your project, that uses PHPUnit > 7.0 version, that is installed in your test environment.

That is the only reason I can imagine (based on the data you've provided), that exclusion of the "tests" folder could solve.

@JimChenWYU , is that the case?

Also if you're aware that your PR is a duplicate of another PR, then why submit it?

JimChenWYU commented 3 years ago

@aik099 when I submited my pr, I found anthor pr next...