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
list
format in HTML elements - Added class attributes to HTML elements of
list
,ol
andul
formats to facilitate styling - Added
plainlist
format template
format becomes alias of theplainlist
formattemplate
parameter 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 arguments
parameter - Removed
columns
parameter
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
$smwgExportResourcesAsIri
for 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
RequestContext
from theResultPrinter
class; If for some reason someone requires access to theRequestContext
then it is suggested to useRequestContext::getMain()
.
Hooks
- Renamed
smwAddToRDFExport
toSMW::Exporter::Controller::AddExpData
Store
Store::getPropertySubjects
is to return anIterator
hence anarray
type check should be avoided and if necessary useiterator_to_array
to 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; } );