Skip to content

Keep PHP 5.6 compactibility#449

Merged
itsgoingd merged 2 commits intoitsgoingd:masterfrom
sanis:master
Dec 1, 2020
Merged

Keep PHP 5.6 compactibility#449
itsgoingd merged 2 commits intoitsgoingd:masterfrom
sanis:master

Conversation

@sanis
Copy link
Contributor

@sanis sanis commented Dec 1, 2020

composer.json states that we can use PHP >= 5.6, however using group uses in the code causes fatal errors. I have split them to keep up PHP 5.6 compatibility.

@itsgoingd
Copy link
Owner

Yes, indeed we want to keep PHP 5.6 compatibility in this release, thanks!

I believe we need to keep the void return type hint to be compatible with latest PHPUnit though. Maybe we can make a separate UsesClockworkLegacy trait to use with older PHPUnit / PHP versions, but then we would actually need to test if it even works.

@sanis
Copy link
Contributor Author

sanis commented Dec 1, 2020

I have reverted the trait.

Talking about separate trait for legacy phpunit it would be quite hard to find working case.

As I see that trait is used specifically in Laravel tests. And the last version of phpunit supporting is 5. I took a look into laravel framework repository and latest version of laravel using that phpunit version is 5.4. I would suggest to skip implementing legacy trait for that for the moment.

@itsgoingd
Copy link
Owner

Yeah, we do support Laravel 5.0+, but I've only tested the trait with recent PHPUnit/Laravel versions. Will wait until someone asks for it before investing more time into the legacy stuff.

Thanks for the PR!

@itsgoingd itsgoingd merged commit d7ee114 into itsgoingd:master Dec 1, 2020
@mahagr
Copy link

mahagr commented Dec 1, 2020

I recommend adding phpdoc typehints as it allows autocomplete in IDEs. It is also worth to consider adding phpstan tests, which will make the code quality much better as it points out issues with the typehints and finds issues in the code.

@itsgoingd
Copy link
Owner

How can you improve what's already perfect? 🙃

@rikiless
Copy link

rikiless commented Sep 7, 2021

I think compatibility with Laravel 5.2 is broken (also newer versions) because of non existing method getChanges().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants