Skip to content

Commit 896f8e5

Browse files
committed
Fix missing service before modxcms/revolution#16696 gets merged
1 parent b3290d7 commit 896f8e5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

core/components/aikit/bootstrap.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
<?php
2+
23
/**
34
* @var \MODX\Revolution\modX $modx
45
* @var array $namespace
56
*/
67

8+
use GuzzleHttp\Psr7\HttpFactory;
79
use xPDO\xPDO;
810

911
if (!file_exists(__DIR__ . '/vendor/autoload.php')) {
@@ -16,3 +18,9 @@
1618
if (!$modx->addPackage('modmore\\AIKit\\Model', __DIR__ . '/src/Model/', null, 'modmore\\AIKit\\Model')) {
1719
$modx->log(xPDO::LOG_LEVEL_ERROR, 'Failed adding AIKit package');
1820
}
21+
22+
if (!$modx->services->has(\Psr\Http\Message\ResponseFactoryInterface::class)) {
23+
$modx->services->add(\Psr\Http\Message\ResponseFactoryInterface::class, function () {
24+
return new HttpFactory();
25+
});
26+
}

0 commit comments

Comments
 (0)