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

v2.23 is broken #364

Closed
LorenzoSapora opened this issue Nov 17, 2021 · 7 comments
Closed

v2.23 is broken #364

LorenzoSapora opened this issue Nov 17, 2021 · 7 comments
Assignees
Labels

Comments

@LorenzoSapora
Copy link

Return value of Cmgmyr\Messenger\Models\Models::thread() must be an instance of Cmgmyr\Messenger\Models\Thread, instance of App\Models\Thread returned

Current fix: composer require cmgmyr/messenger:2.22 to downgrade

@cmgmyr
Copy link
Owner

cmgmyr commented Nov 17, 2021

@LorenzoSapora thanks for reporting, I should be able to look into this today.

Curious - is your App\Models\Thread extending the package's Thread model, or no?

@LorenzoSapora
Copy link
Author

It is not. This is an old install with a half developed messenger system (currently just in code, no frontend, as unfinished project).

Note: composer was previously checking for ^2, so this update came as a surprise. System is PHP 7.4.

@cmgmyr
Copy link
Owner

cmgmyr commented Nov 18, 2021

@LorenzoSapora can you try pulling the current dev-master in your composer.json file? It should be fixed for you. If that works I can tag another release today

Also, if you have time, can you let me know if implementing a Message interface would fix the issue? That way we could eventually use the interface return types and your custom code could optionally implement the interface, or extend the package's Message class. This would be done for all of the models too. Have you implemented all of the methods or just the ones you need in your app?

@cmgmyr cmgmyr self-assigned this Nov 18, 2021
@LorenzoSapora
Copy link
Author

Sorry for the delay, yes, that fixes my issues.

As for the Message interface, it would provide some additional structure in the future, and I'm struggling to find a reason not to just say "sure". 😄

@cmgmyr
Copy link
Owner

cmgmyr commented Nov 19, 2021

Excellent! Thanks for letting me know. I'm waiting to hear back on another issue; then, I'll tag a release and close this issue

I'll chew on the interface idea a little more and see if it makes sense to do in a future release - thanks for the feedback!

@LorenzoSapora
Copy link
Author

Perfect. Thanks for all your work here. I appreciate it.

@cmgmyr cmgmyr added the bug label Nov 19, 2021
@cmgmyr
Copy link
Owner

cmgmyr commented Nov 22, 2021

Just tagged a release for 2.24.0. Please let me know if you have anything else come up. Thanks so much for using this package!

@cmgmyr cmgmyr closed this as completed Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants