diff --git a/phpparsejob.cpp b/phpparsejob.cpp --- a/phpparsejob.cpp +++ b/phpparsejob.cpp @@ -75,10 +75,9 @@ static std::once_flag once; std::call_once(once, [phpSupport] { qCDebug(PHP) << "Initializing internal function file" << internalFunctionFile(); - ParseJob internalJob(internalFunctionFile(), phpSupport); - internalJob.setMinimumFeatures(TopDUContext::AllDeclarationsAndContexts); - internalJob.run({}, nullptr); - Q_ASSERT(internalJob.success()); + auto minimumFeatures = TopDUContext::AllDeclarationsAndContexts; + KDevelop::ICore::self()->languageController()->backgroundParser()->addDocument( + internalFunctionFile(), minimumFeatures, 100); }); }