Hi :)
I'm facing an issue when trying to create a new Guzzle HTTP client with default headers.
<?php
// config.php
$config['container']['my-api-client'] = function (\XF\Container $c) {
return $c['http']->createClient([
'base_uri' => 'http://example.com',
'headers' => [...
What about using Reflection as a workaround?
Something like this would work I think:
$reflectionProperty = new \ReflectionProperty(XF::class, 'app');
$reflectionProperty->setAccessible(true);
$reflectionProperty->setValue(null);