forked from GNUsocial/gnu-social
[CONFIG] Various fixes to use new configuration format
This commit is contained in:
@@ -126,6 +126,7 @@ abstract class DB
|
||||
public static function __callStatic(string $name, array $args)
|
||||
{
|
||||
foreach (['find', 'getReference', 'getPartialReference', 'getRepository'] as $m) {
|
||||
// TODO Plugins
|
||||
$pref = '\App\Entity\\';
|
||||
if ($name == $m && Formatting::startsWith($name, $pref) === false) {
|
||||
$args[0] = $pref . ucfirst(Formatting::snakeCaseToCamelCase($args[0]));
|
||||
|
||||
@@ -130,7 +130,7 @@ class GNUsocial implements EventSubscriberInterface
|
||||
public function initialize(): void
|
||||
{
|
||||
if (!$this->initialized) {
|
||||
Common::setConfigBag($this->config);
|
||||
Common::setupConfig($this->config);
|
||||
Log::setLogger($this->logger);
|
||||
Event::setDispatcher($this->event_dispatcher);
|
||||
I18n::setTranslator($this->translator);
|
||||
|
||||
@@ -89,7 +89,6 @@ class ModuleManager
|
||||
$module_manager = new self();
|
||||
$entity_paths = [];
|
||||
foreach ($module_paths as $path) {
|
||||
// 'modules' and 'plugins' have the same length
|
||||
$type = ucfirst(preg_replace('%' . INSTALLDIR . '/(component|plugin)s/.*%', '\1', $path));
|
||||
$dir = dirname($path);
|
||||
$module = basename($dir);
|
||||
|
||||
Reference in New Issue
Block a user