4 <meta http-equiv=
"X-UA-Compatible" content=
"IE=edge">
5 <meta name=
"viewport" content=
"width=device-width, initial-scale=1">
6 <meta name=
"description" content=
"">
7 <meta name=
"keywords" content=
" ">
8 <title>package.xml | WoltLab Suite
5.3 Documentation
</title>
10 <link rel=
"stylesheet" href=
"https://docs.woltlab.com/5.3/css/syntax.css">
11 <link rel=
"stylesheet" href=
"https://fonts.googleapis.com/css?family=Open+Sans:400,300,600">
12 <link rel=
"stylesheet" href=
"https://docs.woltlab.com/5.3/css/font-awesome.min.css">
13 <!--<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">-->
14 <link rel=
"stylesheet" href=
"https://docs.woltlab.com/5.3/css/modern-business.css">
15 <link rel=
"stylesheet" href=
"https://docs.woltlab.com/5.3/css/lavish-bootstrap.css">
16 <link rel=
"stylesheet" href=
"https://docs.woltlab.com/5.3/css/customstyles.css">
17 <link rel=
"stylesheet" href=
"https://docs.woltlab.com/5.3/css/theme-blue.css?v=3">
19 <script src=
"https://docs.woltlab.com/5.3/js/jquery.min.js"></script>
20 <script src=
"https://docs.woltlab.com/5.3/js/jquery.cookie.min.js"></script>
21 <script src=
"https://docs.woltlab.com/5.3/js/jquery.navgoco.min.js"></script>
22 <script src=
"https://docs.woltlab.com/5.3/js/bootstrap.min.js"></script>
23 <script src=
"https://docs.woltlab.com/5.3/js/anchor.min.js"></script>
24 <script src=
"https://docs.woltlab.com/5.3/js/toc.js"></script>
25 <script src=
"https://docs.woltlab.com/5.3/js/customscripts.js"></script>
27 <link rel=
"shortcut icon" href=
"https://docs.woltlab.com/5.3/images/favicon.ico">
29 <link rel=
"alternate" type=
"application/rss+xml" title=
"woltlab.github.io" href=
"https://docs.woltlab.com/5.3feed.xml">
32 $(document).ready(function() {
33 // Initialize navgoco with default options
34 $(
"#mysidebar").navgoco({
37 openClass: 'active', // open
38 save: false, // leave false or nav highlighting doesn't work right
50 $(
"#collapseAll").click(function(e) {
52 $(
"#mysidebar").navgoco('toggle', false);
55 $(
"#expandAll").click(function(e) {
57 $(
"#mysidebar").navgoco('toggle', true);
65 $('[
data-toggle=
"tooltip"]').tooltip()
73 <nav class=
"navbar navbar-inverse navbar-fixed-top">
74 <div class=
"container topnavlinks">
75 <div class=
"navbar-header">
76 <button type=
"button" class=
"navbar-toggle" data-toggle=
"collapse" data-target=
"#bs-example-navbar-collapse-1">
77 <span class=
"sr-only">Toggle navigation
</span>
78 <span class=
"icon-bar"></span>
79 <span class=
"icon-bar"></span>
80 <span class=
"icon-bar"></span>
82 <a class=
"fa fa-home fa-lg navbar-brand" href=
"index.html"> <span class=
"projectTitle"> WoltLab Suite
5.3 Documentation
</span></a>
84 <div class=
"collapse navbar-collapse" id=
"bs-example-navbar-collapse-1">
85 <ul class=
"nav navbar-nav navbar-right">
86 <!-- entries without drop-downs appear here -->
90 <li><a href=
"https://www.woltlab.com" target=
"_blank">woltlab.com
</a></li>
96 <li><a href=
"https://github.com/WoltLab/WCF/" target=
"_blank">Code on github.com
</a></li>
100 <!-- entries with drop-downs appear here -->
101 <!-- conditional logic to control which topnav appears for the audience defined in the configuration file.-->
104 <!--comment out this block if you want to hide search-->
107 <div id=
"search-demo-container">
108 <input type=
"text" id=
"search-input" placeholder=
"search...">
109 <ul id=
"results-container"></ul>
111 <script src=
"https://docs.woltlab.com/5.3/js/jekyll-search.js" type=
"text/javascript"></script>
112 <script type=
"text/javascript">
113 SimpleJekyllSearch.init({
114 searchInput: document.getElementById('search-input'),
115 resultsContainer: document.getElementById('results-container'),
116 dataSource: 'https://docs.woltlab.com/
5.3/search.json',
117 searchResultTemplate: '
<li><a href=
"{url}" title=
"package.xml">{title}
</a></li>',
118 noResultsText: 'No results found.',
132 <div class=
"container">
133 <div class=
"col-lg-12"> </div>
136 <div class=
"col-md-3">
140 <ul id=
"mysidebar" class=
"nav">
141 <li class=
"sidebarTitle">WoltLab Suite
5.3</li>
146 <a href=
"#">Getting Started
</a>
152 <li data-identifier=
"index"><a href=
"index.html">Introduction
</a></li>
161 <li data-identifier=
"getting-started_quick-start"><a href=
"getting-started_quick-start.html">Quick Start
</a></li>
171 <a href=
"#">PHP API
</a>
177 <li data-identifier=
"php_pages"><a href=
"php_pages.html">Pages
</a></li>
186 <li data-identifier=
"php_database-objects"><a href=
"php_database-objects.html">Database Objects
</a></li>
195 <li data-identifier=
"php_database-access"><a href=
"php_database-access.html">Database Access
</a></li>
204 <li data-identifier=
"php_exceptions"><a href=
"php_exceptions.html">Exceptions
</a></li>
213 <li class=
"subfolders">
219 <li data-identifier=
"php_api_caches"><a href=
"php_api_caches.html">Caches
</a></li>
224 <li data-identifier=
"php_api_comments"><a href=
"php_api_comments.html">Comments
</a></li>
229 <li data-identifier=
"php_api_cronjobs"><a href=
"php_api_cronjobs.html">Cronjobs
</a></li>
234 <li data-identifier=
"php_api_events"><a href=
"php_api_events.html">Events
</a></li>
239 <li data-identifier=
"php_api_form_builder"><a href=
"php_api_form_builder.html">Form Builder
</a></li>
244 <li data-identifier=
"php_api_package_installation_plugins"><a href=
"php_api_package_installation_plugins.html">Package Installation Plugins
</a></li>
249 <li data-identifier=
"php_api_user_activity_points"><a href=
"php_api_user_activity_points.html">User Activity Points
</a></li>
254 <li data-identifier=
"php_api_user_notifications"><a href=
"php_api_user_notifications.html">User Notifications
</a></li>
259 <li data-identifier=
"php_api_sitemaps"><a href=
"php_api_sitemaps.html">Sitemaps
</a></li>
269 <li data-identifier=
"php_code-style"><a href=
"php_code-style.html">Code Style
</a></li>
278 <li data-identifier=
"php_apps"><a href=
"php_apps.html">Apps
</a></li>
287 <li data-identifier=
"php_gdpr"><a href=
"php_gdpr.html">GDPR
</a></li>
297 <a href=
"#">Languages, Templates & CSS
</a>
303 <li data-identifier=
"view_languages"><a href=
"view_languages.html">Languages
</a></li>
312 <li data-identifier=
"view_templates"><a href=
"view_templates.html">Templates
</a></li>
321 <li data-identifier=
"view_css"><a href=
"view_css.html">CSS
</a></li>
331 <a href=
"#">JavaScript API
</a>
337 <li data-identifier=
"javascript_general-usage"><a href=
"javascript_general-usage.html">General Usage
</a></li>
346 <li class=
"subfolders">
347 <a href=
"#">New API
</a>
352 <li data-identifier=
"javascript_new-api_writing-a-module"><a href=
"javascript_new-api_writing-a-module.html">Writing a module
</a></li>
357 <li data-identifier=
"javascript_new-api_data-structures"><a href=
"javascript_new-api_data-structures.html">Data Structures
</a></li>
362 <li data-identifier=
"javascript_new-api_core"><a href=
"javascript_new-api_core.html">Core Functions
</a></li>
367 <li data-identifier=
"javascript_new-api_dom"><a href=
"javascript_new-api_dom.html">DOM
</a></li>
372 <li data-identifier=
"javascript_new-api_events"><a href=
"javascript_new-api_events.html">Event Handling
</a></li>
377 <li data-identifier=
"javascript_new-api_ajax"><a href=
"javascript_new-api_ajax.html">Ajax
</a></li>
382 <li data-identifier=
"javascript_new-api_dialogs"><a href=
"javascript_new-api_dialogs.html">Dialogs
</a></li>
387 <li data-identifier=
"javascript_new-api_browser"><a href=
"javascript_new-api_browser.html">Browser and Screen Sizes
</a></li>
392 <li data-identifier=
"javascript_new-api_ui"><a href=
"javascript_new-api_ui.html">User Interface
</a></li>
402 <li data-identifier=
"javascript_legacy-api"><a href=
"javascript_legacy-api.html">Legacy API
</a></li>
411 <li data-identifier=
"javascript_helper-functions"><a href=
"javascript_helper-functions.html">Helper Functions
</a></li>
420 <li data-identifier=
"javascript_code-snippets"><a href=
"javascript_code-snippets.html">Code Snippets
</a></li>
430 <a href=
"#">Package Components
</a>
436 <li class=
"active" data-identifier=
"package_package-xml"><a href=
"package_package-xml.html">package.xml
</a></li>
445 <li data-identifier=
"package_pip"><a href=
"package_pip.html">PIPs
</a></li>
455 <a href=
"#">Migration
</a>
461 <li class=
"subfolders">
462 <a href=
"#">Migrating from WSC
5.2</a>
467 <li data-identifier=
"migration_wsc-52_php"><a href=
"migration_wsc-52_php.html">PHP API
</a></li>
472 <li data-identifier=
"migration_wsc-52_templates"><a href=
"migration_wsc-52_templates.html">Templates and Languages
</a></li>
477 <li data-identifier=
"migration_wsc-52_libraries"><a href=
"migration_wsc-52_libraries.html">Third Party Libraries
</a></li>
483 <li class=
"subfolders">
484 <a href=
"#">Migrating from WSC
3.1</a>
489 <li data-identifier=
"migration_wsc-31_php"><a href=
"migration_wsc-31_php.html">PHP API
</a></li>
495 <li class=
"subfolders">
496 <a href=
"#">Migrating from WSC
3.0</a>
501 <li data-identifier=
"migration_wsc-30_php"><a href=
"migration_wsc-30_php.html">PHP API
</a></li>
506 <li data-identifier=
"migration_wsc-30_javascript"><a href=
"migration_wsc-30_javascript.html">JavaScript API
</a></li>
511 <li data-identifier=
"migration_wsc-30_templates"><a href=
"migration_wsc-30_templates.html">Templates
</a></li>
516 <li data-identifier=
"migration_wsc-30_css"><a href=
"migration_wsc-30_css.html">CSS
</a></li>
521 <li data-identifier=
"migration_wsc-30_package"><a href=
"migration_wsc-30_package.html">Package Components
</a></li>
527 <li class=
"subfolders">
528 <a href=
"#">Migrating from WCF
2.1</a>
533 <li data-identifier=
"migration_wcf-21_php"><a href=
"migration_wcf-21_php.html">PHP API
</a></li>
538 <li data-identifier=
"migration_wcf-21_templates"><a href=
"migration_wcf-21_templates.html">Templates
</a></li>
543 <li data-identifier=
"migration_wcf-21_css"><a href=
"migration_wcf-21_css.html">CSS
</a></li>
548 <li data-identifier=
"migration_wcf-21_package"><a href=
"migration_wcf-21_package.html">Package Components
</a></li>
559 <a href=
"#">Tutorials
</a>
565 <li data-identifier=
"tutorial_tutorial-series"><a href=
"tutorial_tutorial-series.html">Tutorial Series
</a></li>
579 var sidebar = $('#mysidebar');
580 var item = sidebar.find('.active');
581 if (item.length ===
0) {
584 sidebar.find('li[
data-identifier=
"' + parent + '"]').addClass('active');
588 sidebar.find(
".active").parents('li').toggleClass(
"active");
594 <div class=
"col-md-9">
595 <div class=
"post-header">
596 <h1 class=
"post-title-main">package.xml
</h1>
601 <div class=
"post-content">
607 <!-- this handles the automatic toc. use ## for subheads to auto-generate the on-page minitoc. if you use html tags, you must supply an ID for the heading element in order for it to appear in the minitoc. -->
609 $( document ).ready(function() {
610 // Handler for .ready() called.
612 $('#toc').toc({ minimumHeaders:
0, listType: 'ul', showSpeed:
0, headers: 'h2,h3,h4' });
614 /* this offset helps account for the space taken up by the floating toolbar. */
615 $('#toc').on('click', 'a', function() {
616 var target = $(this.getAttribute('href'))
617 , scroll_target = target.offset().top
619 $(window).scrollTop(scroll_target -
10);
630 <p>The
<code class=
"language-plaintext highlighter-rouge">package.xml
</code> is the core component of every package.
631 It provides the meta data (e.g. package name, description, author) and the instruction set for a new installation and/or updating from a previous version.
</p>
633 <h2 id=
"example">Example
</h2>
635 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"cp"><?xml
version=
"1.0" encoding=
"UTF-8"?
></span>
636 <span class=
"nt"><package
</span> <span class=
"na">name=
</span><span class=
"s">"com.example.package"</span> <span class=
"na">xmlns=
</span><span class=
"s">"http://www.woltlab.com"</span> <span class=
"na">xmlns:xsi=
</span><span class=
"s">"http://www.w3.org/2001/XMLSchema-instance"</span> <span class=
"na">xsi:schemaLocation=
</span><span class=
"s">"http://www.woltlab.com http://www.woltlab.com/XSD/2019/package.xsd"</span><span class=
"nt">></span>
637 <span class=
"nt"><packageinformation
></span>
638 <span class=
"nt"><packagename
></span>Simple Package
<span class=
"nt"></packagename
></span>
639 <span class=
"nt"><packagedescription
></span>A simple package to demonstrate the package system of WoltLab Suite Core
<span class=
"nt"></packagedescription
></span>
640 <span class=
"nt"><version
></span>1.0.0<span class=
"nt"></version
></span>
641 <span class=
"nt"><date
></span>2016-
12-
18<span class=
"nt"></date
></span>
642 <span class=
"nt"></packageinformation
></span>
644 <span class=
"nt"><authorinformation
></span>
645 <span class=
"nt"><author
></span>YOUR NAME
<span class=
"nt"></author
></span>
646 <span class=
"nt"><authorurl
></span>http://www.example.com
<span class=
"nt"></authorurl
></span>
647 <span class=
"nt"></authorinformation
></span>
649 <span class=
"nt"><requiredpackages
></span>
650 <span class=
"nt"><requiredpackage
</span> <span class=
"na">minversion=
</span><span class=
"s">"3.0.0"</span><span class=
"nt">></span>com.woltlab.wcf
<span class=
"nt"></requiredpackage
></span>
651 <span class=
"nt"></requiredpackages
></span>
653 <span class=
"nt"><excludedpackages
></span>
654 <span class=
"nt"><excludedpackage
</span> <span class=
"na">version=
</span><span class=
"s">"6.0.0 Alpha 1"</span><span class=
"nt">></span>com.woltlab.wcf
<span class=
"nt"></excludedpackage
></span>
655 <span class=
"nt"></excludedpackages
></span>
657 <span class=
"nt"><instructions
</span> <span class=
"na">type=
</span><span class=
"s">"install"</span><span class=
"nt">></span>
658 <span class=
"nt"><instruction
</span> <span class=
"na">type=
</span><span class=
"s">"file"</span> <span class=
"nt">/
></span>
659 <span class=
"nt"><instruction
</span> <span class=
"na">type=
</span><span class=
"s">"template"</span><span class=
"nt">></span>templates.tar
<span class=
"nt"></instruction
></span>
660 <span class=
"nt"></instructions
></span>
661 <span class=
"nt"></package
></span>
662 </code></pre></div></div>
664 <h2 id=
"elements">Elements
</h2>
666 <h3 id=
"package"><code class=
"language-plaintext highlighter-rouge"><package
></code></h3>
668 <p>The root node of every
<code class=
"language-plaintext highlighter-rouge">package.xml
</code> it contains the reference to the namespace and the location of the XML Schema Definition (XSD).
</p>
670 <p>The attribute
<code class=
"language-plaintext highlighter-rouge">name
</code> is the most important part, it holds the unique package identifier and is mandatory.
671 It is based upon your domain name and the package name of your choice.
</p>
673 <p>For example WoltLab Suite Forum (formerly know an WoltLab Burning Board and usually abbreviated as
<code class=
"language-plaintext highlighter-rouge">wbb
</code>) is created by WoltLab which owns the domain
<code class=
"language-plaintext highlighter-rouge">woltlab.com
</code>.
674 The resulting package identifier is
<code class=
"language-plaintext highlighter-rouge">com.woltlab.wbb
</code> (
<code class=
"language-plaintext highlighter-rouge"><tld
>.
<domain
>.
<packageName
></code>).
</p>
676 <h3 id=
"packageinformation"><code class=
"language-plaintext highlighter-rouge"><packageinformation
></code></h3>
678 <p>Holds the entire meta data of the package.
</p>
680 <h4 id=
"packagename"><code class=
"language-plaintext highlighter-rouge"><packagename
></code></h4>
682 <p>This is the actual package name displayed to the end user, this can be anything you want, try to keep it short.
683 It supports the attribute
<code class=
"language-plaintext highlighter-rouge">languagecode
</code> which allows you to provide the package name in different languages, please be aware that if it is not present,
<code class=
"language-plaintext highlighter-rouge">en
</code> (English) is assumed:
</p>
685 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><packageinformation
></span>
686 <span class=
"nt"><packagename
></span>Simple Package
<span class=
"nt"></packagename
></span>
687 <span class=
"nt"><packagename
</span> <span class=
"na">languagecode=
</span><span class=
"s">"de"</span><span class=
"nt">></span>Einfaches Paket
<span class=
"nt"></packagename
></span>
688 <span class=
"nt"></packageinformation
></span>
689 </code></pre></div></div>
691 <h4 id=
"packagedescription"><code class=
"language-plaintext highlighter-rouge"><packagedescription
></code></h4>
693 <p>Brief summary of the package, use it to explain what it does since the package name might not always be clear enough.
694 The attribute
<code class=
"language-plaintext highlighter-rouge">languagecode
</code> is available here too, please reference to
<a href=
"#packageName"><code class=
"language-plaintext highlighter-rouge"><packagename
></code></a> for details.
</p>
696 <h4 id=
"version"><code class=
"language-plaintext highlighter-rouge"><version
></code></h4>
698 <p>The package’s version number, this is a string consisting of three numbers separated with a dot and optionally followed by a keyword (must be followed with another number).
</p>
700 <p>The possible keywords are:
</p>
703 <li>Alpha/dev (both is regarded to be the same)
</li>
705 <li>RC (release candidate)
</li>
706 <li>pl (patch level)
</li>
709 <p>Valid examples:
</p>
713 <li>1.12.13 Alpha
19</li>
717 <p>Invalid examples:
</p>
720 <li>1.0.0 Beta (keyword Beta must be followed by a number)
</li>
721 <li>2.0 RC
3 (version number must consists of
3 blocks of numbers)
</li>
722 <li>1.2.3 dev
4.5 (
4.5 is not an integer,
4 or
5 would be valid but not the fraction)
</li>
725 <h4 id=
"date"><code class=
"language-plaintext highlighter-rouge"><date
></code></h4>
727 <p>Must be a valid
<a href=
"http://en.wikipedia.org/wiki/ISO_8601">ISO
8601</a> date, e.g.
<code class=
"language-plaintext highlighter-rouge">2013-
12-
27</code>.
</p>
729 <h3 id=
"authorinformation"><code class=
"language-plaintext highlighter-rouge"><authorinformation
></code></h3>
731 <p>Holds meta data regarding the package’s author.
</p>
733 <h4 id=
"author"><code class=
"language-plaintext highlighter-rouge"><author
></code></h4>
735 <p>Can be anything you want.
</p>
737 <h4 id=
"authorurl"><code class=
"language-plaintext highlighter-rouge"><authorurl
></code></h4>
743 <p>URL to the author’s website.
</p>
745 <h3 id=
"requiredpackages"><code class=
"language-plaintext highlighter-rouge"><requiredpackages
></code></h3>
747 <p>A list of packages including their version required for this package to work.
</p>
749 <h4 id=
"requiredpackage"><code class=
"language-plaintext highlighter-rouge"><requiredpackage
></code></h4>
753 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><requiredpackage
</span> <span class=
"na">minversion=
</span><span class=
"s">"2.0.0"</span> <span class=
"na">file=
</span><span class=
"s">"requirements/com.woltlab.wcf.tar"</span><span class=
"nt">></span>com.woltlab.wcf
<span class=
"nt"></requiredpackage
></span>
754 </code></pre></div></div>
756 <p>The attribute
<code class=
"language-plaintext highlighter-rouge">minversion
</code> must be a valid version number as described in
<a href=
"#version"><code class=
"language-plaintext highlighter-rouge"><version
></code></a>.
757 The
<code class=
"language-plaintext highlighter-rouge">file
</code> attribute is optional and specifies the location of the required package’s archive relative to the
<code class=
"language-plaintext highlighter-rouge">package.xml
</code>.
</p>
759 <h3 id=
"optionalpackage"><code class=
"language-plaintext highlighter-rouge"><optionalpackage
></code></h3>
761 <p>A list of optional packages which can be selected by the user at the very end of the installation process.
</p>
763 <h4 id=
"optionalpackage-1"><code class=
"language-plaintext highlighter-rouge"><optionalpackage
></code></h4>
767 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><optionalpackage
</span> <span class=
"na">file=
</span><span class=
"s">"optionals/com.woltlab.wcf.moderatedUserGroup.tar"</span><span class=
"nt">></span>com.woltlab.wcf.moderatedUserGroup
<span class=
"nt"></optionalpackage
></span>
768 </code></pre></div></div>
770 <p>The
<code class=
"language-plaintext highlighter-rouge">file
</code> attribute specifies the location of the optional package’s archive relative to the
<code class=
"language-plaintext highlighter-rouge">package.xml
</code>.
</p>
772 <h3 id=
"excludedpackages"><code class=
"language-plaintext highlighter-rouge"><excludedpackages
></code></h3>
774 <p>List of packages which conflict with this package. It is not possible to install it if any of the specified packages is installed. In return you cannot install an excluded package if this package is installed.
</p>
776 <h4 id=
"excludedpackage"><code class=
"language-plaintext highlighter-rouge"><excludedpackage
></code></h4>
780 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><excludedpackage
</span> <span class=
"na">version=
</span><span class=
"s">"3.1.0 Alpha 1"</span><span class=
"nt">></span>com.woltlab.wcf
<span class=
"nt"></excludedpackage
></span>
781 </code></pre></div></div>
783 <p>The attribute
<code class=
"language-plaintext highlighter-rouge">version
</code> must be a valid version number as described in the
<a href=
"#version"><version
></a> section. In the example above it will be impossible to install this package in WoltLab Suite Core
3.1.0 Alpha
1 or higher.
</p>
785 <h3 id=
"compatibility"><code class=
"language-plaintext highlighter-rouge"><compatibility
></code></h3>
786 <div class=
"bs-callout bs-callout-info">Available since WoltLab Suite
3.1</div>
788 <div class=
"bs-callout bs-callout-warning">With the release of WoltLab Suite
5.2 the API versions were abolished. Instead of using API versions packages should exclude version
<code class=
"language-plaintext highlighter-rouge">6.0.0 Alpha
1</code> of
<code class=
"language-plaintext highlighter-rouge">com.woltlab.wcf
</code> going forward.
</div>
790 <p>WoltLab Suite
3.1 introduced a new versioning system that focused around the API compatibility and is intended to replace the
<code class=
"language-plaintext highlighter-rouge"><excludedpackage
></code> instruction for the Core for most plugins.
</p>
792 <p>The
<code class=
"language-plaintext highlighter-rouge"><compatibility
></code>-tag holds a list of compatible API versions, and while only a single version is available at the time of writing, future versions will add more versions with backwards-compatibility in mind.
</p>
796 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><compatibility
></span>
797 <span class=
"nt"><api
</span> <span class=
"na">version=
</span><span class=
"s">"2018"</span> <span class=
"nt">/
></span>
798 <span class=
"nt"></compatibility
></span>
799 </code></pre></div></div>
801 <h4 id=
"existing-api-versions">Existing API versions
</h4>
806 <th>WoltLab Suite Core
</th>
808 <th>Backwards-Compatible to API-Version
</th>
820 <h3 id=
"instructions"><code class=
"language-plaintext highlighter-rouge"><instructions
></code></h3>
822 <p>List of instructions to be executed upon install or update. The order is important, the topmost
<code class=
"language-plaintext highlighter-rouge"><instruction
></code> will be executed first.
</p>
824 <h4 id=
"instructions-typeinstall"><code class=
"language-plaintext highlighter-rouge"><instructions
type=
"install"></code></h4>
826 <p>List of instructions for a new installation of this package.
</p>
828 <h4 id=
"instructions-typeupdate-fromversion"><code class=
"language-plaintext highlighter-rouge"><instructions
type=
"update" fromversion=
"…"></code></h4>
830 <p>The attribute
<code class=
"language-plaintext highlighter-rouge">fromversion
</code> must be a valid version number as described in the
<a href=
"#version"><version
></a> section and specifies a possible update from that very version to the package’s version.
</p>
832 <div class=
"bs-callout bs-callout-warning">The installation process will pick exactly one update instruction, ignoring everything else. Please read the explanation below!
</div>
837 <li>Installed version:
<code class=
"language-plaintext highlighter-rouge">1.0.0</code></li>
838 <li>Package version:
<code class=
"language-plaintext highlighter-rouge">1.0.2</code></li>
841 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><instructions
</span> <span class=
"na">type=
</span><span class=
"s">"update"</span> <span class=
"na">fromversion=
</span><span class=
"s">"1.0.0"</span><span class=
"nt">></span>
842 <span class=
"c"><!-- … --
></span>
843 <span class=
"nt"></instructions
></span>
844 <span class=
"nt"><instructions
</span> <span class=
"na">type=
</span><span class=
"s">"update"</span> <span class=
"na">fromversion=
</span><span class=
"s">"1.0.1"</span><span class=
"nt">></span>
845 <span class=
"c"><!-- … --
></span>
846 <span class=
"nt"></instructions
></span>
847 </code></pre></div></div>
849 <p>In this example WoltLab Suite Core will pick the first update block since it allows an update from
<code class=
"language-plaintext highlighter-rouge">1.0.0 -
> 1.0.2</code>.
850 The other block is not considered, since the currently installed version is
<code class=
"language-plaintext highlighter-rouge">1.0.0</code>. After applying the update block (
<code class=
"language-plaintext highlighter-rouge">fromversion=
"1.0.0"</code>), the version now reads
<code class=
"language-plaintext highlighter-rouge">1.0.2</code>.
</p>
852 <h4 id=
"instruction"><code class=
"language-plaintext highlighter-rouge"><instruction
></code></h4>
856 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><instruction
</span> <span class=
"na">type=
</span><span class=
"s">"objectTypeDefinition"</span><span class=
"nt">></span>objectTypeDefinition.xml
<span class=
"nt"></instruction
></span>
857 </code></pre></div></div>
859 <p>The attribute
<code class=
"language-plaintext highlighter-rouge">type
</code> specifies the instruction type which is used to determine the package installation plugin (PIP) invoked to handle its value.
860 The value must be a valid file relative to the location of
<code class=
"language-plaintext highlighter-rouge">package.xml
</code>.
861 Many PIPs provide default file names which are used if no value is given:
</p>
863 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><instruction
</span> <span class=
"na">type=
</span><span class=
"s">"objectTypeDefinition"</span> <span class=
"nt">/
></span>
864 </code></pre></div></div>
866 <p>There is a
<a href=
"package_pip.html">list of all default PIPs
</a> available.
</p>
868 <div class=
"bs-callout bs-callout-warning">Both the
<code class=
"language-plaintext highlighter-rouge">type
</code>-attribute and the element value are case-sensitive. Windows does not care if the file is called
<code class=
"language-plaintext highlighter-rouge">objecttypedefinition.xml
</code> but was referenced as
<code class=
"language-plaintext highlighter-rouge">objectTypeDefinition.xml
</code>, but both Linux and Mac systems will be unable to find the file.
</div>
870 <p>In addition to the
<code class=
"language-plaintext highlighter-rouge">type
</code> attribute, an optional
<code class=
"language-plaintext highlighter-rouge">run
</code> attribute (with
<code class=
"language-plaintext highlighter-rouge">standalone
</code> as the only valid value) is supported which forces the installation to execute this PIP in an isolated request, allowing a single, resource-heavy PIP to execute without encountering restrictions such as PHP’s
<code class=
"language-plaintext highlighter-rouge">memory_limit
</code> or
<code class=
"language-plaintext highlighter-rouge">max_execution_time
</code>:
</p>
872 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><instruction
</span> <span class=
"na">type=
</span><span class=
"s">"file"</span> <span class=
"na">run=
</span><span class=
"s">"standalone"</span> <span class=
"nt">/
></span>
873 </code></pre></div></div>
875 <h4 id=
"void"><code class=
"language-plaintext highlighter-rouge"><void/
></code></h4>
877 <p>Sometimes a package update should only adjust the metadata of the package, for example, an optional package was added.
878 However, WoltLab Suite Core requires that the list of
<code class=
"language-plaintext highlighter-rouge"><instructions
></code> is non-empty.
879 Instead of using a dummy
<code class=
"language-plaintext highlighter-rouge"><instruction
></code> that idempotently updates some PIP, the
<code class=
"language-plaintext highlighter-rouge"><void/
></code> tag can be used for this use-case.
</p>
881 <p>Using the
<code class=
"language-plaintext highlighter-rouge"><void/
></code> tag is only valid for
<code class=
"language-plaintext highlighter-rouge"><instructions
type=
"update"></code> and must not be accompanied by other
<code class=
"language-plaintext highlighter-rouge"><instruction
></code> tags.
</p>
885 <div class=
"language-xml highlighter-rouge"><div class=
"highlight"><pre class=
"highlight"><code><span class=
"nt"><instructions
</span> <span class=
"na">type=
</span><span class=
"s">"update"</span> <span class=
"na">fromversion=
</span><span class=
"s">"1.0.0"</span><span class=
"nt">></span>
886 <span class=
"nt"><void/
></span>
887 <span class=
"nt"></instructions
></span>
888 </code></pre></div></div>
903 <div class=
"footerBox">
904 <div class=
"container">
905 <div class=
"footerBoxLeft">
907 <a target=
"_blank" href=
"https://github.com/woltlab/woltlab.github.io/blob/master/pages/package/package_package-xml.md" class=
"btn btn-default githubEditButton no_icon" role=
"button"><i class=
"fa fa-github fa-lg"></i> Edit on GitHub
</a>
908 <p>Site last generated: Mar
5,
2021</p>
910 <div class=
"footerBoxRight">
911 <a class=
"no_icon" href=
"https://www.woltlab.com"><img src=
"https://docs.woltlab.com/5.3/images/woltlab-black.png" srcset=
"https://docs.woltlab.com/5.3/images/woltlab-black@2x.png 2x" height=
"40" width=
"204" alt=
""></a>
916 <div class=
"pageFooter">
917 <div class=
"container">
918 © 2001 ‐
2021 <a class=
"no_icon" href=
"https://www.woltlab.com">WoltLab GmbH
</a>. All rights reserved. |
<a class=
"no_icon" href=
"https://www.woltlab.com/legal-notice/">Legal Notice
</a> |
<a class=
"no_icon" href=
"https://www.woltlab.com/privacy-policy/">Privacy Policy
</a>