graby icon indicating copy to clipboard operation
graby copied to clipboard

Graby 3.0

Open j0k3r opened this issue 3 years ago • 11 comments

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 :)

j0k3r avatar Dec 10 '21 15:12 j0k3r

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

j0k3r avatar Dec 13 '21 08:12 j0k3r

Do we need to wait for graby 3.0 if we want to start a v3 POC for wallabag?

nicosomb avatar Mar 24 '22 19:03 nicosomb

Not really, we can use the master.

j0k3r avatar Mar 24 '22 19:03 j0k3r

Was wondering what we could do with our guzzle-site-authenticator plugin, if it should be done differently or not

Kdecherf avatar Mar 25 '22 23:03 Kdecherf

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 call reset().
  • [ ] Making ContentExtractor::$readability property private (possibly constructed by Graby 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

jtojnar avatar Mar 31 '23 00:03 jtojnar

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?

j0k3r avatar Mar 31 '23 08:03 j0k3r

How can we define configuration for readability when using Graby from an external source then?

Won’t passing it through Graby inside GrabyConfig work?

jtojnar avatar Mar 31 '23 09:03 jtojnar

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.

jtojnar avatar Apr 13 '23 05:04 jtojnar

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 avatar Apr 21 '23 11:04 tacman

@tacman of course, the doc will be updated

j0k3r avatar Apr 21 '23 11:04 j0k3r

On that point it would be nice to

jtojnar avatar Apr 21 '23 12:04 jtojnar