Drupal8: Can't call CRM_Utils_System::url() from CLI with absolute URL
This is easy to replicate. Run the following command on a D8 site and compare it to a non-D8 site:
cv ev 'return CRM_Utils_System::url("civicrm", NULL, TRUE)'
On D7 etc., you'll get something like:
"http://dmaster.localhost/civicrm"
On D8, you'll get:
"http://:/civicrm"
CRM_Utils_System_Drupal8::url()
calls a Drupal-specific method to construct the URL. Ultimately, this calls Symfony's getHost() method, which populates the URL from PHP superglobals which aren't populated when running from CLI.
After digging, I found that there's no way D8 can auto-detect the correct base when run from the CLI, so I'm submitting a PR to pre-set the base when an absolute URL is needed.