Codeception / Verify

BDD Assertions for PHPUnit and Codeception
MIT License
146 stars 25 forks source link

Fix ClassNotFound for PHPUnit > v6 #31

Closed Shockwave2k closed 7 years ago

Shockwave2k commented 7 years ago

This will fix the "Class 'PHPUnit_Framework_Assert' not found" error which occurs on using PHPUnit 6.0 and above. Issue Ticket: https://github.com/Codeception/Verify/issues/30

Naktibalda commented 7 years ago

Was it necessary to reformat a whole file?

Shockwave2k commented 7 years ago

I would say yes cause else the inherit would be wrong due to the opening { in the namespace

Naktibalda commented 7 years ago

I think that a better place to use class_alias is in https://github.com/Codeception/Verify/blob/master/src/Codeception/function.php

Shockwave2k commented 7 years ago

did not know that this will work also ... rebuilded it

cedx commented 7 years ago

Beware of (minor) issues with class_alias: https://github.com/erusev/parsedown/issues/490

Shockwave2k commented 7 years ago

@cedx thx for that info but as it is a minor issue i would keep it like that to have compatibility in both directions. But i would also be fine with just changing the Namespace and creating a new version. Depends on what the owners like todo here ;)

DavertMik commented 7 years ago

Thanks

ddinchev commented 7 years ago

This merge is causing a problem as described #32. Given that Codeception\Verify is meant to be used in the context of Codeception, and Codeception\shim.php already aliases PHPUnit_Framework_Assert - why was this fix needed in first place? @Shockwave2k