cartalyst / sentinel

A framework agnostic authentication & authorization system.
BSD 3-Clause "New" or "Revised" License
1.51k stars 238 forks source link

php >7.0 testing #467

Closed 8633brown closed 5 years ago

8633brown commented 5 years ago

Ive updated travis to test the latest versions of php. there were a few issues getting the latest version of 'illuminate/database' to work correctly with the tests mainly caused by this update which expects the user to have an id already set in role tests.

making the connections in the tests partial also solves the problem with BadMethodCallException: Method Mockery_13_Illuminate_Database_Connection::query() does not exist on this mock object errors occuring because of this update here i expect this to make some of the mocked methods on the connection to be useless now.

brunogaspar commented 5 years ago

Thanks for the pull request @8633brown

Question, any reason to drop the testing on PHP 5.4 and 5.5?

I'm afraid we need to leave them there, in case we add other stuff, we surely want to test against those very old PHP versions too, since we need to still support them as the package is for PHP 5.4+.

8633brown commented 5 years ago

Sorry fixed this. phpunit doesnt work accross all versions, we now need both versions 4 and 5. version 6 has some big backwards compatability problems as they changed the names of their units to support namespaces.

8633brown commented 5 years ago

I've removed what i believe to be redundant code if the connections are made partials here not sure if this would be better as a separate PR or if you want me to merge it into this PR

brunogaspar commented 5 years ago

Looks great, thanks!