graby
graby copied to clipboard
Graby 3.0
I'm thinking about the 3.0. Not to much breaking changes but mostly type everything (method args, return, variable, etc.) for now and dropping PHP < 7.4
See #272 & #273
I would like to know if you think about something that should be broken in v2 or re-implemented in a way that will require a major version. So it can be included in 3.0. Of course, "rewrite everything because method XXX sucks" isn't an appropriate answer.
If this is something really too big and might take too much time to complete, it can also be part of v4 :)
I've also removed http-interop/http-factory-guzzle
because guzzle/psr7
2.0 finally have a PSR-17 factory but it means v3 will drop support for Guzzle 6 because v6 is locked to guzzle/psr7
v1. This does not affect Guzzle 5
See https://github.com/j0k3r/graby/pull/277
Do we need to wait for graby 3.0 if we want to start a v3 POC for wallabag?
Not really, we can use the master.
Was wondering what we could do with our guzzle-site-authenticator plugin, if it should be done differently or not
My wishlist:
- [x] Removing the use of arrays from return values #316
- [ ] Having constructors take config objects instead of arrays.
- [ ] Making
ContentExtractor
stateless – so that there is no need to callreset()
. - [ ] Making
ContentExtractor::$readability
property private (possibly constructed byGraby
and injected) - [ ] Possibly using PSR-18 directly instead of HTTPPlug – but there is no support for plug-ins so not sure if it is feasible.
- [ ] Passing PHPStan level
max
Having constructors take config objects instead of arrays.
We already have Value Object (https://github.com/j0k3r/graby/pull/284) so won't be to hard to move to object as parameter
Making
ContentExtractor::$readability
property private
How can we define configuration for readability when using Graby from an external source then?
How can we define configuration for readability when using Graby from an external source then?
Won’t passing it through Graby
inside GrabyConfig
work?
I would also like to see
- [ ] async/promise support
It would mean switching from psr/http-client-implementation to php-http/async-client-implementation and using Http\Promise\Promise
in the API.
I'm a fan of Symfony's HttpClient, which supports async and standards and all that goodness.
If Graby 2 or 3 can be used with it, can you add that to the documentation? I always find that part of the configuration a bit confusing.
Thanks.
@tacman of course, the doc will be updated
On that point it would be nice to
- [ ] Use dependency injection instead of discovering random factories