Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use abstract class as parent. #109

Merged
merged 4 commits into from
Mar 31, 2023

Conversation

LenRick
Copy link
Contributor

@LenRick LenRick commented Mar 28, 2023

Problem: Using an abstract class as a parent did work in the past, but since updating our application to laravel 10 and parental 1.3.3 we have the issue that we can't use an abstract class anymore as parent.
(Error: Cannot instantiate abstract class...).

\Parental\HasChildren::registerModelEvent
Changing the self to static did do the trick. I made a quick test to show the fix.

@driftingly driftingly merged commit 2a78d37 into tighten:master Mar 31, 2023
@driftingly
Copy link
Member

Thanks @LenRick and thanks for the tests 🙌
I made the change on another large codebase using Parental and all tests passed as well.

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.

None yet

2 participants