-
Notifications
You must be signed in to change notification settings - Fork 95
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
Better Interface Segregation (Future Version?) #198
Comments
This is great, thank you for taking the time. I have a draft API sketched out for a v2 that I am very eager to get around to. I think as part of that, when all is said and done, will be a push to either merge into core or push for default extension like json. Could you maybe justify some of the design decisions here? I would like to know why the hierarchy is the way it is, to better understand your experience and use that to inform the next phase. Once I'm happy with the API I'll post it for feedback and hopefully arrive at some consensus to then move forward with implementation and testing. |
That's a good question. I guess I wanted to group the methods on each class a little better. That being said, it still doesn't help my actual use case, which I will explain... We are using Swoole, and I wanted to create a As I point out, this is still not helping as I still can't see an interface that allows me to decorate your |
I just realised after I wrote that, that I can use |
@rtheunissen is this still something you are working on ? I am especially interested in the possible integration into core that this might bring... ? |
It's always on my mind, but life gets in the way. 😅 Comments like these keep the dream alive. I should at least have some published version of the current spec for v2 |
Hi @rtheunissen.
I use this extension every day, and in our current project, I have been creating wrappers for classes to handle concurrency with OpenSwoole. That's not the point of this, though ;)
While doing so, I've found it challenging to type hint my application classes to be able to handle the extension classes or my decorated concurrent replacements because I believe the interfaces provided aren't as good as they could be.
To try to help out, I've spent a couple of hours going through everything with a fine-toothed comb to see what would work better, as many classes share similar, if not the same, methods but with no interface backing them up.
I'm wondering if a v2 is on the horizon for this reason and also for better type hinting for PHP 8.x. What I have done I have added below for your review and criticism (everything is interfaces for ease of description).
I'm not formally qualified in computer science, so I might not fully understand the data structures. I am also not a C programmer, so I wouldn't be able to offer any coding help with a new version, though I wish I could.
Anyway, please let me know what you think and whether there will be a v2.
The text was updated successfully, but these errors were encountered: