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

Better scraping: switch to HTTPlug + Guzzle #24

Open
HongPong opened this issue Mar 1, 2019 · 5 comments
Open

Better scraping: switch to HTTPlug + Guzzle #24

HongPong opened this issue Mar 1, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@HongPong
Copy link
Owner

HongPong commented Mar 1, 2019

It is not easy necessarily to include libraries from Composer, they may have to be manually namespaced.

See also #21 as this plugin will need a composer.json file as well to operate this correctly (and thus will need to know its namespace if it has the original or a new fork one)

Recommended by @mlang38 here:

We have switched to HTTP/2 with Let's Encrypt recently.

I guess the problem comes from the Snoopy library which doesn't seem to be really maintained anymore. I suggest switching to HTTPlug with something like Guzzle to implement it.

Don't know if it will solve HTTP/2 and encryption issues, but I think it will be more reliable for the future.

@HongPong HongPong added the enhancement New feature or request label Mar 1, 2019
@HongPong
Copy link
Owner Author

GuzzleHttp\Client::head: Sends a HEAD request

@mlang38
Copy link

mlang38 commented Sep 23, 2019

If you want to manage your dependencies with Composer, like HTTPlug/Guzzle or else, you can use a scoper/prefixer like PHP-Scoper to automate the prefixing build task, as suggested here. It seems to be used by well-know popular plugins like Yoast etc...

@HongPong
Copy link
Owner Author

I hadn't heard of PHP-scoper thank you @mlang38 . Been using Composer in Drupal world a while however I don't have a clear sense of whether its a good solution for WP plugins (i suppose the plugin would be distributed with the build artifact version of it)

@mundschenk-at
Copy link

mundschenk-at commented Sep 23, 2019

PHP-Scoper works well once you learn to steer clear of some of its limitations. For an example configuration, see what I've done in wp-Typography (especially the .scoper.inc.php and the Grunt-based build process).

@HongPong
Copy link
Owner Author

Sweet thanks - looks like someone pulled your PHP library into drupal world also https://www.drupal.org/project/twig_typography ... gotta check em both out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants