Help:Upgrade/Switching to native Composer support

From semantic-mediawiki.org
< Help:Upgrade
Administrator manualInstallationUpgradeHelp:Upgrade/Switching to native Composer support

Switching to native Composer support[edit]

As documented on the Upgrade from SMW 1.9.x or later to SMW 2.1.x (MW 1.19.0 to MW 1.21.x) page the "Extension Installer" extension is only required for MediaWiki 1.19.x to MW 1.21.x since these versions of MediaWiki do not natively support Composer. Thus you will have to adapt the way to upgrade and update Semantic MediaWiki after upgrading to MediaWiki 1.22+:

  1. Backup your database and installation.
  2. Move the "composer.json" file from the …/extensions/ExtensionInstaller/ directory to the base directory of your MediaWiki installation.
  3. Delete the directories SemanticMediaWiki/, Validator/ and vendor/ from within the …/extensions/ directory as well as the directories of the extensions which were also previously installed using the "Extension Installer" extension, e.g. Semantic Results Formats, etc. if applicable. See the "composer.json" file for the list of these extensions.
  4. Run the update script from the base directory of your MediaWiki installation:
    php composer.phar update
    
  5. See the page "Special:Version" on your wiki to verify that the extension(s) was/were successfully installed.
  6. Delete the directory ExtensionInstaller/ from within the …/extensions/ directory
  7. Remove the following line from the "LocalSettings.php" file:
    require_once "$IP/extensions/ExtensionInstaller/ExtensionInstaller.php";
    
  8. Done!

NoteNote:  These instructions deliberately do not involve an upgrade of Semantic MediaWiki. If a newer version is available than the one used prior to the switch described above when do the upgrading in a second step.

See also[edit]