This help page contains migration information for users, administrators, and developers when upgrading from 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.. Please consult the respective RELEASE-NOTES when upgrading from an earlier version of Semantic MediaWiki.
Contents
Users and administrators[edit]
List formats (incl. list, ol, ul, template)[edit]
- 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 the 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[edit]
- 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 scripts for further information.
Resources export[edit]
- 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[edit]
Removed classes and methods[edit]
- 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[edit]
- Removed
RequestContextfrom theResultPrinterclass; If for some reason someone requires access to theRequestContextthen it is suggested to useRequestContext::getMain().
Hooks[edit]
- Renamed
smwAddToRDFExporttoSMW::Exporter::Controller::AddExpData
Store[edit]
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[edit]
\Hooks::register( 'SMW::Property::initProperties', function( $propertyRegistry ) {
$propertyRegistry->registerProperty( '__FOO', '_txt', 'Foo' );
$propertyRegistry->registerPropertyDescriptionByMsgKey(
'__FOO',
'a-mediawiki-msg-key-with-a-description'
);
return true;
} );
See also the detailed change description.
Content taken from Migration guide