This help page contains our migration guide for wikis using Semantic MediaWiki 6.0.x to Semantic MediaWiki 7.0.0Released on 4 June 2026 and compatible with MW 1.43.x - 1.46.x.. For the narrative overview of what changed, see the 7.0.0 release notes.
Contents
Users and administrators[edit]
String-based configuration[edit]
Settings that took SMW_* constants now accept plain strings; bitmask settings take arrays of strings. The constant form still works in 7.x with a deprecation notice and is removed in 8.0.
| Setting | Legacy form (deprecated) | New default | Accepted values |
|---|---|---|---|
$smwgShowFactbox |
SMW_FACTBOX_NONEMPTY |
'nonempty' |
'hidden', 'special', 'nonempty', 'shown'
|
$smwgShowFactboxEdit |
SMW_FACTBOX_NONEMPTY |
'nonempty' |
'hidden', 'special', 'nonempty', 'shown'
|
$smwgFactboxFeatures |
... | [ 'cache', 'purge-refresh', 'display-subobject', 'display-attachment' ] |
'cache', 'purge-refresh', 'display-subobject', 'display-attachment'
|
$smwgQEqualitySupport |
SMW_EQ_SOME |
'some' |
'none', 'some', 'full'
|
$smwgQConceptCaching |
CONCEPT_CACHE_HARD |
'hard' |
'none', 'hard', 'all'
|
$smwgSparqlRepositoryFeatures |
SMW_SPARQL_NONE |
'none' |
'none', 'connection-ping'
|
$smwgResultFormatsFeatures |
SMW_RF_TEMPLATE_OUTSEP |
'template-outsep' |
'none', 'template-outsep'
|
$smwgQFeatures |
SMW_CATEGORY_QUERY | ... | [ 'property', 'category', 'concept', 'namespace', 'conjunction', 'disjunction' ] |
'property', 'category', 'concept', 'namespace', 'conjunction', 'disjunction'
|
$smwgQConceptFeatures |
SMW_CATEGORY_QUERY | ... | [ 'property', 'category', 'concept', 'namespace', 'conjunction', 'disjunction' ] |
'property', 'category', 'concept', 'namespace', 'conjunction', 'disjunction'
|
$smwgQSortFeatures |
SMW_QSORT_RANDOM | [ 'sort', 'random' ] |
'sort', 'random', 'unconditional'
|
$smwgSparqlQFeatures |
SMW_SPARQL_QF_SUBP | SMW_SPARQL_QF_SUBC | [ 'redirects', 'subproperties', 'subcategories' ] |
'redirects', 'subproperties', 'subcategories', 'collation', 'no-case'
|
$smwgCategoryFeatures |
SMW_CAT_INSTANCE | SMW_CAT_HIERARCHY | [ 'redirect', 'instance', 'hierarchy' ] |
'redirect', 'instance', 'hierarchy'
|
$smwgBrowseFeatures |
... | [ 'toolbox-link', 'show-incoming', 'show-group', 'use-api' ] |
'toolbox-link', 'show-inverse', 'show-incoming', 'show-group', 'show-sortkey', 'use-api'
|
$smwgAdminFeatures |
... | [ 'refresh', 'setup', 'disposal', 'pstats', 'fullt', 'maintenance-script-docs', 'show-overview', 'alert-last-optimization-run' ] |
'refresh', 'disposal', 'setup', 'pstats', 'fullt', 'maintenance-script-docs', 'show-overview', 'alert-last-optimization-run'
|
$smwgParserFeatures |
SMW_PARSER_INL_ERROR | SMW_PARSER_HID_CATS | [ 'strict', 'inline-errors', 'hidden-categories' ] |
'strict', 'unstrip', 'inline-errors', 'hidden-categories', 'links-in-values'
|
$smwgDVFeatures |
SMW_DV_MLTV_LCODE | ... | [ 'provider-redirect', 'monolingual-langcode', 'pattern-validation', 'wpv-display-title', 'time-calendar-model', 'preferred-label', 'provider-link-hint' ] |
'provider-redirect', 'monolingual-langcode', 'number-value-usespaces', 'pattern-validation', 'wpv-display-title', 'provider-display-title', 'unique-constraint', 'time-calendar-model', 'preferred-label', 'provider-link-hint', 'wpv-pipetrick'
|
$smwgFulltextSearchIndexableDataTypes |
SMW_FT_URI | [ 'blob', 'uri' ] |
'blob', 'uri', 'wikipage'
|
$smwgRemoteReqFeatures |
SMW_REMOTE_REQ_SHOW_NOTE | [ 'send-response', 'show-note' ] |
'send-response', 'show-note'
|
$smwgExperimentalFeatures |
SMW_SHOWPARSER_USE_CURTAILMENT | [ 'queryresult-prefetch', 'showparser-curtailment' ] |
'queryresult-prefetch', 'showparser-curtailment'
|
$smwgFieldTypeFeatures |
SMW_FIELDT_CHAR_LONG | false |
false (component disabled), or any subset of 'char-nocase', 'char-long'
|
$smwgQueryProfiler |
SMW_QPRFL_PARAMS | [] |
false (profiling disabled), [] (basic, no detail fields), or any subset of 'parameters', 'duration'
|
$smwgSpecialAskFormSubmitMethod |
SMW_SASK_SUBMIT_POST |
'post' |
'get', 'get.redirect', 'post'
|
$smwgCheckForConstraintErrors |
SMW_CONSTRAINT_ERR_CHECK_ALL |
'check/all' |
false, 'check/main', 'check/all'
|
Unknown strings are ignored with a structured-log warning. The last two settings ($smwgSpecialAskFormSubmitMethod, $smwgCheckForConstraintErrors) need no normalizer entry because their SMW_SASK_SUBMIT_* / SMW_CONSTRAINT_ERR_CHECK_* constants already resolve to the listed string values; the constants continue to work.
$smwgQueryProfiler's extension.json default changes from true to []; behaviour is unchanged because both forms produce zero flag bits in Options::isFlagSet. Note that [] enables basic profiling (no detail fields), it does NOT disable; use false to disable profiling entirely. The legacy true form is also accepted with a deprecation notice and will be removed in 8.0.
Removed legacy settings[edit]
The runtime shim that rewrote settings deprecated in SMW 3.1 and 3.2 to their replacements is gone. Update any of these names in LocalSettings.php to the replacement below; otherwise the legacy names are silently ignored. Special:Admin no longer surfaces them as deprecation notices.
| Removed setting | Use instead |
|---|---|
$smwgEnabledInTextAnnotationParserStrictMode |
$smwgParserFeatures (option 'strict')
|
$smwgInlineErrors |
$smwgParserFeatures (option 'inline-errors')
|
$smwgShowHiddenCategories |
$smwgParserFeatures (option 'hidden-categories')
|
$smwgLinksInValues |
$smwgParserFeatures (option 'links-in-values')
|
$smwgFactboxUseCache |
$smwgFactboxFeatures (option 'cache')
|
$smwgFactboxCacheRefreshOnPurge |
$smwgFactboxFeatures (option 'purge-refresh')
|
$smwgUseCategoryRedirect |
$smwgCategoryFeatures (option 'redirect')
|
$smwgCategoriesAsInstances |
$smwgCategoryFeatures (option 'instance')
|
$smwgUseCategoryHierarchy |
$smwgCategoryFeatures (option 'hierarchy')
|
$smwgQSortingSupport |
$smwgQSortFeatures (option 'sort')
|
$smwgQRandSortingSupport |
$smwgQSortFeatures (option 'random')
|
$smwgToolboxBrowseLink |
$smwgBrowseFeatures (option 'toolbox-link')
|
$smwgBrowseShowInverse |
$smwgBrowseFeatures (option 'show-inverse')
|
$smwgBrowseShowAll |
$smwgBrowseFeatures (option 'show-incoming')
|
$smwgBrowseByApi |
$smwgBrowseFeatures (option 'use-api')
|
$smwgAdminRefreshStore |
$smwgAdminFeatures (option 'refresh')
|
$smwgQueryProfiler['smwgQueryDurationEnabled'] |
$smwgQueryProfiler (option 'duration')
|
$smwgQueryProfiler['smwgQueryParametersEnabled'] |
$smwgQueryProfiler (option 'parameters')
|
$smwgCacheType |
$smwgMainCacheType
|
$smwgImportFileDir |
$smwgImportFileDirs
|
$smwgDeclarationProperties |
$smwgChangePropagationWatchlist
|
$smwgQueryDependencyPropertyExemptionlist |
$smwgQueryDependencyPropertyExemptionList (capital L)
|
$smwgSparqlDatabaseConnector |
$smwgSparqlRepositoryConnector
|
$smwgSparqlDatabase |
$smwgSparqlCustomConnector
|
$smwgSparqlQueryEndpoint |
$smwgSparqlEndpoint['query']
|
$smwgSparqlUpdateEndpoint |
$smwgSparqlEndpoint['update']
|
$smwgSparqlDataEndpoint |
$smwgSparqlEndpoint['data']
|
$smwgTypePagingLimit |
$smwgPagingLimit['type']
|
$smwgConceptPagingLimit |
$smwgPagingLimit['concept']
|
$smwgPropertyPagingLimit |
$smwgPagingLimit['property']
|
$smwgSubPropertyListLimit |
$smwgPropertyListLimit['subproperty']
|
$smwgRedirectPropertyListLimit |
$smwgPropertyListLimit['redirect']
|
$smwgCacheUsage['smwgStatisticsCacheExpiry'] |
$smwgCacheUsage['special.statistics']
|
$smwgCacheUsage['smwgPropertiesCacheExpiry'] |
$smwgCacheUsage['special.properties']
|
$smwgCacheUsage['smwgUnusedPropertiesCacheExpiry'] |
$smwgCacheUsage['special.unusedproperties']
|
$smwgCacheUsage['smwgWantedPropertiesCacheExpiry'] |
$smwgCacheUsage['special.wantedproperties']
|
Renamed <section> parser tag[edit]
SMW's <section> parser tag is renamed to <smwsection> so it no longer collides with the <section> tag registered by extensions such as LabeledSectionTransclusion. The rendered output is unchanged (still an HTML <section class="smw-property-specification"> element), so styling and property-page tabs are unaffected; only the wikitext tag name changes.
Saved pages are not migrated automatically. Update any page (typically in the Property: namespace) that wraps content in <section>...</section> for SMW, replacing the tags with <smwsection>...</smwsection>. The $smwgSupportSectionTag setting still controls whether SMW registers its tag; with the collision resolved, most wikis no longer need to disable it.
Developers[edit]
Query API module subclasses now require a QuerySourceFactory[edit]
SMW\MediaWiki\Api\Query, the base class for SMW's query API modules, gained a required third constructor argument:
public function __construct(
ApiMain $main,
string $action,
QuerySourceFactory $querySourceFactory
)
SMW's own ask and askargs modules are registered so MediaWiki's ObjectFactory injects the dependency. Extensions that register an API module subclassing Api\Query must do the same — add the SMW.QuerySourceFactory service to the module's extension.json registration:
"APIModules": {
"yourmodule": {
"class": "Your\\Api\\Module",
"services": [
"SMW.QuerySourceFactory"
]
}
}
A subclass still registered by bare class name — or instantiated with only $main and $action — fails with an ArgumentCountError.
Removed job aliases[edit]
All job types must now use their smw.* names. The following aliases no longer work:
| Removed alias | Use instead |
|---|---|
SMW\UpdateJob |
smw.update
|
SMW\RefreshJob |
smw.refresh
|
SMW\UpdateDispatcherJob |
smw.updateDispatcher
|
SMW\FulltextSearchTableUpdateJob |
smw.fulltextSearchTableUpdate
|
SMW\EntityIdDisposerJob |
smw.entityIdDisposer
|
SMW\PropertyStatisticsRebuildJob |
smw.propertyStatisticsRebuild
|
SMW\FulltextSearchTableRebuildJob |
smw.fulltextSearchTableRebuild
|
SMW\ChangePropagationDispatchJob |
smw.changePropagationDispatch
|
SMW\ChangePropagationUpdateJob |
smw.changePropagationUpdate
|
SMW\ChangePropagationClassUpdateJob |
smw.changePropagationClassUpdate
|
SMWUpdateJob |
smw.update
|
SMWRefreshJob |
smw.refresh
|
Deprecated class aliases[edit]
These aliases are deprecated and will be removed in a future release. Update code to the new namespaced class names.
| Deprecated alias | New class name |
|---|---|
SMWDIBlob |
SMW\DataItems\Blob
|
SMWDIBoolean |
SMW\DataItems\Boolean
|
SMW\DIConcept |
SMW\DataItems\Concept
|
SMWDIContainer |
SMW\DataItems\Container
|
SMWDataItem |
SMW\DataItems\DataItem
|
SMWDIError |
SMW\DataItems\Error
|
SMWDIGeoCoord |
SMW\DataItems\GeoCoord
|
SMWDINumber |
SMW\DataItems\Number
|
SMW\DIProperty |
SMW\DataItems\Property
|
SMWDITime |
SMW\DataItems\Time
|
SMWDIUri |
SMW\DataItems\Uri
|
SMW\DIWikiPage |
SMW\DataItems\WikiPage
|
SMWDataValue |
SMW\DataValues\DataValue
|
SMWConceptValue |
SMW\DataValues\ConceptValue
|
SMWErrorValue |
SMW\DataValues\ErrorValue
|
SMWNumberValue |
SMW\DataValues\NumberValue
|
SMWPropertyListValue |
SMW\DataValues\PropertyListValue
|
SMWQuantityValue |
SMW\DataValues\QuantityValue
|
SMWRecordValue |
SMW\DataValues\RecordValue
|
SMWTimeValue |
SMW\DataValues\TimeValue
|
SMWURIValue |
SMW\DataValues\URIValue
|
SMWWikiPageValue |
SMW\DataValues\WikiPageValue
|
SMWExpData |
SMW\Export\ExpData
|
SMWExportController |
SMW\Export\ExportController
|
SMWExporter |
SMW\Export\Exporter
|
SMWQuery |
SMW\Query\Query
|
SMWQueryProcessor |
SMW\Query\QueryProcessor
|
SMW\QueryPrinterFactory |
SMW\Query\QueryPrinterFactory
|
SMW\PropertiesQueryPage |
SMW\QueryPages\PropertiesQueryPage
|
SMW\QueryPage |
SMW\QueryPages\QueryPage
|
SMW\UnusedPropertiesQueryPage |
SMW\QueryPages\UnusedPropertiesQueryPage
|
SMW\WantedPropertiesQueryPage |
SMW\QueryPages\WantedPropertiesQueryPage
|
SMWSpecialOWLExport |
SMW\MediaWiki\Specials\SpecialOWLExport
|
SMWSpecialTypes |
SMW\MediaWiki\Specials\SpecialTypes
|
SMW\SpecialConcepts |
SMW\MediaWiki\Specials\SpecialConcepts
|
SMW\SpecialProperties |
SMW\MediaWiki\Specials\SpecialProperties
|
SMW\SpecialUnusedProperties |
SMW\MediaWiki\Specials\SpecialUnusedProperties
|
SMW\SpecialWantedProperties |
SMW\MediaWiki\Specials\SpecialWantedProperties
|
SMW\MessageFormatter |
SMW\Formatters\MessageFormatter
|
SMWInfolink |
SMW\Formatters\Infolink
|
SMWPageLister |
SMW\Formatters\PageLister
|
SMW\Highlighter |
SMW\Formatters\Highlighter
|
SMW\RecurringEvents |
SMW\Utils\RecurringEvents
|
SMW\SemanticData |
SMW\DataModel\SemanticData
|
SMW\Subobject |
SMW\DataModel\Subobject
|
SMWElasticStore |
SMW\Elastic\ElasticStore
|
SMWSearch |
SMW\MediaWiki\Search\ExtendedSearchEngine
|
SMWOutputs |
SMW\MediaWiki\Outputs
|
SMWPageSchemas |
SMW\MediaWiki\PageSchemas
|
SMW\ContentParser |
SMW\Parser\ContentParser
|
SMW\SQLStore\Lookup\ListLookup |
SMW\Lookup\ListLookup
|
SMW\SQLStore\Lookup\CachedListLookup |
SMW\Lookup\CachedListLookup
|
SMW\SQLStore\ConceptCache |
SMW\SQLStore\ConceptMaterializer
|
Removed long-deprecated methods[edit]
The following long-deprecated functions and methods were removed. Use the listed replacement.
smwfNormalTitleText()— useLocalizer::getInstance()->normalizeTitleText()(deprecated since 3.2)smwfNumberFormat()— useIntlNumberFormatter::getInstance()->getLocalizedFormattedNumber()(deprecated since 2.1)SMW_HEADER_TOOLTIP,SMW_HEADER_SORTTABLE,SMW_HEADER_STYLEconstants and the numeric-id branch inOutputs::requireHeadItem()TimeValue::getXMLSchemaDate()— usegetISO8601Date()ValueDescription::getDataValue()— usegetDataItem()ResultPrinter::getParameters()— usegetParamDefinitions()ParserData::setData()/getData()— usesetSemanticData()/getSemanticData()Subobject::setSemanticData()— usesetEmptyContainerForId()PropertyRegistry::findPropertyLabel()— usefindPropertyLabelById()PropertyRegistry::getPredefinedPropertyTypeId()— usegetPropertyValueTypeById()PropertyRegistry::findPropertyId()— usefindPropertyIdByLabel()ParserFunctionFactory::getSubobjectParser()— usenewSubobjectParserFunction()ParserFunctionFactory::getRecurringEventsParser()— usenewRecurringEventsParserFunction()smwInitPropertieshook — useSMW::Property::initPropertiesSMWSQLStore3::deleteSubjectBefore/deleteSubjectAfterhooks — useSMW::SQLStore::BeforeDeleteSubjectComplete/AfterDeleteSubjectCompleteParserParameterProcessor::getFirst()— usegetFirstParameter()DataValue::prepareValue()— useDescriptionBuilderHashBuilder::createHashIdFromSegments()— usecreateFromSegments()DataValueFactory::newDataItemValue()— usenewDataValueByItem()DataValueFactory::newPropertyObjectValue()— usenewDataValueByProperty()DataValueFactory::newTypeIdValue()— usenewDataValueByType()DataValueFactory::newPropertyValue()— usenewDataValueByText()InMemoryPoolCache::getPoolCacheFor()— usegetPoolCacheById()ParserParameterProcessor::getParameterValuesFor()— usegetParameterValuesByKey()Localizer::getLanguageCodeFrom()— usegetAnnotatedLanguageCodeFrom()ServicesFactory::newQueryParser()— useQueryFactory::newQueryParser()DataTypeRegistry::getDataItemId()— usegetDataItemByType()DataTypeRegistry::getDefaultDataItemTypeId()— usegetDefaultDataItemByType()QueryResult::getLink()— usegetQueryLink()Options::getOptions()— usetoArray()(deprecated since 3.0)PropertyRegistry::isKnownPropertyId()— useisRegistered()(deprecated since 3.0)PropertyRegistry::getPropertyTypeId()— usegetPropertyValueTypeById()(deprecated since 3.0)PropertyRegistry::registerPropertyDescriptionMsgKeyById()— useregisterPropertyDescriptionByMsgKey()(deprecated since 3.0)ParserData::setSemanticDataStateToParserOutputProperty()— usecopyToParserOutput()(deprecated since 3.0)ChangeOp::getCombinedIdListOfChangedEntities()— usegetChangedEntityIdSummaryList()(deprecated since 3.0)TableChangeOp::getFixedPropertyValueBy()— usegetFixedPropertyValByField()(deprecated since 3.0)DataTypeRegistry::findTypeId()— usefindTypeByLabel()(deprecated since 3.0)DataValue::checkAllowedValues()— usecheckConstraints()(deprecated since 3.1)EntityIdManager::getDataItemPoolHashListFor()— usegetDataItemsFromList()(deprecated since 3.0)CallableUpdate::enabledDeferredUpdate()— useisDeferrableUpdate()(deprecated since 3.0)TaskHandler::setEnabledFeatures()— usesetFeatureSet()(deprecated since 3.1)MwCollaboratorFactory::newEditInfoProvider()— usenewEditInfo()(deprecated since 3.1)LocalLanguage::fetchByLanguageCode()— usefetch()(deprecated since 3.0)LocalLanguage::getPropertyId(),findMonth(),getMonthLabel()— usegetPropertyIdByLabel(),findMonthNumberByLabel(),getMonthLabelByNumber()LoadBalancerConnectionProvider::asConnectionRef()(deprecated since 5.0)ParserData::pushSemanticDataToParserOutput()— usecopyToParserOutput()(deprecated since 3.0)DataValue::isEnabledFeature()— usehasFeature()(deprecated since 3.0)TaskHandler::isEnabledFeature()— usehasFeature()(deprecated since 3.1)Property::setPropertyTypeId()— usesetPropertyValueType()(deprecated since 3.0)Property::findPropertyTypeId()— usefindPropertyValueType()(deprecated since 3.0)
Removed internal APIs[edit]
ServicesFactory::getMediaWikiLogger()and theSMW\Utils\Loggerwrapper — useMediaWiki\Logger\LoggerFactory::getInstance( $channel )directly- Cache services moved to MediaWiki primitives (the bundled
onoi/cacheandonoi/blob-storedependencies are gone):ServicesFactory::getCache()and theSMW.Cacheservice are removed — useServicesFactory::getObjectCache()(or theSMW.ObjectCacheservice), which returns aWikimedia\ObjectCache\BagOStuffover$smwgMainCacheType.CacheFactory::newFixedInMemoryCache(),newNullCache(),newMediaWikiCache(),newMediaWikiCompositeCache(), andnewCacheByType()are removed — use MediaWiki'sWikimedia\ObjectCache\BagOStuff/MapCacheLRU, or the in-treeSMW\Cache\InMemoryLruCache, directly.ServicesFactory::newBlobStore()andCacheFactory::newBlobStore()are renamed tonewQueryResultStore(), and the'BlobStore'service route is now'QueryResultStore'(they construct aSMW\Query\Cache\QueryResultStore).CacheFactory::getPurgeCacheKey()is removed — build the key withsmwfCacheKey( SMW\MediaWiki\Hooks\ArticlePurge::CACHE_NAMESPACE, $articleId ).SMW\InMemoryPoolCache::__construct()no longer takes aCacheFactoryargument — resolve the pool viaInMemoryPoolCache::getInstance().