elliotchance / concise

✅ Concise is test framework for using plain English and minimal code, built on PHPUnit.
MIT License
45 stars 3 forks source link

Incompatible with phpunit 6 #353

Open ostrolucky opened 6 years ago

ostrolucky commented 6 years ago

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

elliotchance commented 6 years ago

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.

rcwsr commented 5 years ago

@elliotchance has there been any progress on this?

elliotchance commented 5 years ago

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

rcwsr commented 5 years ago

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.

elliotchance commented 5 years ago

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 :)

rcwsr commented 5 years ago

Will take a look 👍

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

elliotchance commented 5 years ago

Yes, that's correct.

rcwsr commented 5 years ago

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