Open HongPong opened 5 years ago
GuzzleHttp\Client::head: Sends a HEAD request
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...
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)
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).
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.
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: