concise icon indicating copy to clipboard operation
concise copied to clipboard

Incompatible with phpunit 6

Open ostrolucky opened this issue 8 years ago • 8 comments

Concise doesn't have specified upper bound for phpunit version, which means application will crash on PHP 7 when concise is used, unless author of application requires phpunit < 6 explicitly

PHP Fatal error: Class 'PHPUnit_Framework_TestCase' not found in /media/gadelat/sdata/Dropbox/src/php/AppEventDispatcher/vendor/elliotchance/concise/src/Concise/Core/BaseAssertions.php on line 27

ostrolucky avatar Dec 10 '17 14:12 ostrolucky

Thanks for letting me know. We are about to upgrade to PHP 7.1 (from 5.6) at work so I will fix this soon.

elliotchance avatar Dec 10 '17 22:12 elliotchance

@elliotchance has there been any progress on this?

rcwsr avatar Aug 08 '18 15:08 rcwsr

@rcwsr - I think this should do the trick: https://github.com/elliotchance/concise/pull/356

elliotchance avatar Aug 09 '18 01:08 elliotchance

That was quick! I had started having a go myself but was adding support for built in type hints and return types for php 7 to your mocking system. I obviously pulled in a version of phpunit that requires php7.

rcwsr avatar Aug 09 '18 07:08 rcwsr

I realise it’s time to cut the fat (brittle things like Pho, and super old versions of PHP and PHPUnit) and support all the newer versions. There’s still a few remaining unit test failures that are not for obvious stuff like class names that have changed.

Most of them are mocking failures. I won’t have time until next week to investigate further. But if you can find the reason (I’m sure it’s something small causing all those failures) then I can get a concise 3.0.0 out sooner :)

elliotchance avatar Aug 09 '18 13:08 elliotchance

Will take a look 👍

Is the idea for concise 3 to support ? >= php 5.6?

rcwsr avatar Aug 09 '18 14:08 rcwsr

Yes, that's correct.

elliotchance avatar Aug 10 '18 00:08 elliotchance

I worked to that assumption last night, but phpunit 6 requires php7.

rcwsr avatar Aug 10 '18 06:08 rcwsr