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

[Issue]: Bad expandability: Methods that should be protected are private + relation return type too strict #133

Open
softwaretechniker opened this issue Dec 19, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@softwaretechniker
Copy link

What happened?

Trying to inherit from SelectTree ends in a mess:
First you can not reuse methods like buildTree() etc. because their scope is private instead of protected.
Second, getRelations return type is strictly bound to BelongsTo/BelongsToMany relation and can not be extended.

How to reproduce the bug

Trying to use SelectTree as parent class

Package Version

3.x

PHP Version

8.x

Laravel Version

11.x

Which operating systems does with happen with?

No response

Notes

No response

@softwaretechniker softwaretechniker added the bug Something isn't working label Dec 19, 2024
@CodeWithDennis
Copy link
Owner

Is there a particular reason you need to override the buildTree method? This method contains all the necessary logic to ensure the tree is properly constructed and displayed in the options field.

If you’re looking for more relational support, I’m always open to adding additional features!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants