parsecsv / parsecsv-for-php

CSV data parser for PHP.
MIT License
678 stars 176 forks source link

PHPUnit_Framework_TestCase.inc.php uses the same namespace as real PHPUnit TestCase class #188

Closed SharkMachine closed 4 years ago

SharkMachine commented 4 years ago

I'm using ParseCSV via composer on a project that uses PHPUnit 8 for unit testing.

I'm having some problems as tests/PHPUnit_Framework_TestCase.inc.php uses the same namespace as the real TestCase class.

I'm getting warnings about there being multiple definitions:

image

And code completion is completely broken on all of my test classes as a result:

image

Deleting the file from vendor folder does fix the problem, but it's still annoying to be forced to do that constantly.

image

gogowitsch commented 4 years ago

Thanks for opening an issue here!

As a quick work-around you can mark ParseCsv's tests directory as Excluded:
image

SharkMachine commented 4 years ago

@Fonata That's a lot better than my workaround, thanks. What I'd like even more, would be 2.0 with no PHP 5.x compatibility. You could even go with only supporting PHP 7.2+ as that's the oldest officially supported version at the moment.

If you are accepting PRs for that, I'm willing to do it.