drupflare/worker - v1.0.4
    Preparing search index...

    Variable VERIFY_MODULES_PHPConst

    VERIFY_MODULES_PHP: "\nuse Drupal\\Core\\Extension\\ExtensionDiscovery;\n\ntry {\n\t$kernel = $GLOBALS['__pw_kernel'] ?? null;\n\tif ($kernel === null || !Drupal::hasContainer()) {\n\t\techo json_encode(['ok' => false, 'error' => 'no kernel to verify against']);\n\t} else {\n\t\t// delivered code can add an extension, so the scan and every list rediscover, as a cache\n\t\t// rebuild would (a profile uploaded after the claim read as not installed)\n\t\ttry {\n\t\t\t$prop = new ReflectionProperty(ExtensionDiscovery::class, 'files');\n\t\t\t$prop->setValue(null, []);\n\t\t} catch (Throwable $e) {\n\t\t}\n\t\tforeach (['module', 'theme', 'profile'] as $type) {\n\t\t\tDrupal::service('extension.list.' . $type)->reset();\n\t\t}\n\t\t$handler = Drupal::service('module_handler');\n\t\t$handler->loadAll();\n\t\t$modules = array_keys($handler->getModuleList());\n\t\tsort($modules);\n\t\techo json_encode(['ok' => true, 'modules' => count($modules)]);\n\t}\n} catch (Throwable $e) {\n\techo json_encode(['ok' => false, 'error' => get_class($e) . ': ' . $e->getMessage()]);\n}\n"