This help page contains our migration guide for wikis using Semantic MediaWiki 2.5.x to Semantic MediaWiki 3.0.0Released on 11 October 2018 and compatible with MW 1.27.0 - 1.31.x..
See also the detailed change description.
Migration guide
This document contains migration information both for users and administratiors as well as developers when upgrading from Semantic MediaWiki 2.5.x to Semantic MediaWiki 3.0.x. Please consult the respective RELEASE-NOTES when upgrading from an earlier version of Semantic MediaWiki.
Users and administrators
List formats (incl. list, ol, ul, template)
- Wrapped components of the
listformat in HTML elements - Added class attributes to HTML elements of
list,olandulformats to facilitate styling - Added
plainlistformat templateformat becomes alias of theplainlistformattemplateparameter is used when present, even if format is nottemplate- Standardized parameters to templates: All standard parameters start with a
# - Dedicated separators for values, properties and result "rows":
sep,propsep,valuesep - Removed final list separator (", and")
- Removed
?as prefix for template arguments - Removed
template argumentsparameter - Removed
columnsparameter
For details also see the change description.
Maintenance scripts
- If you are still using maintenance scripts starting with the
SMW_prefix you must now migrate to the new maintenance script names. See the help pages on maintenance scrips for further information.
Resources export
- Resources are now being exported as Internationalized Resource Identifiers (IRI).
This means that the URIs are now being exported using Universal Coded Character Set (UCS) instead of American Standard Code for Information Interchange (ASCII). See the help page on configuration parameter
$smwgExportResourcesAsIrifor further information.
Developers
Removed classes and methods
- Removed
DIProperty::findPropertyID, deprecated since 2.1, use PropertyRegistry::findPropertyIdByLabel - Removed
DIProperty::getPredefinedPropertyTypeId, deprecated since 2.1, use PropertyRegistry::getPropertyValueTypeById - Removed
DIProperty::findPropertyLabel, deprecated since 2.1, use PropertyRegistry::findPropertyLabelById - Removed
DIProperty::registerProperty, deprecated since 2.1, use PropertyRegistry::registerProperty - Removed
DIProperty::registerPropertyAlias, deprecated since 2.1, use PropertyRegistry::registerPropertyAlias - Deprecated
PropertyValue::makeUserProperty, use DataValueFactory::getInstance()->newPropertyValueByLabel; - Removed
PropertyValue::makeProperty, use DataValueFactory
Result formats
- Removed
RequestContextfrom theResultPrinterclass; If for some reason someone requires access to theRequestContextthen it is suggested to useRequestContext::getMain().
Hooks
- Renamed
smwAddToRDFExporttoSMW::Exporter::Controller::AddExpData
Store
Store::getPropertySubjectsis to return anIteratorhence anarraytype check should be avoided and if necessary useiterator_to_arrayto transform a result instance into a standard array
Register predefined property
\Hooks::register( 'SMW::Property::initProperties', function( $propertyRegistry ) {
$propertyRegistry->registerProperty( '__FOO', '_txt', 'Foo' );
$propertyRegistry->registerPropertyDescriptionByMsgKey(
'__FOO',
'a-mediawiki-msg-key-with-a-description'
);
return true;
} );