Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

extension.xml: metadata and dependencies

The extension.xml file: the metadata read before ezinfo.php, and the requires, uses and extends dependencies that the Extensions page shows and that decide the loading order.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/extension-development/part-3-extension-developer/extension-xml.md

On this page

extension.xml: metadata and dependencies

Part 3, chapter 3. extension.xml does two jobs: it carries the same metadata as ezinfo.php (and is read first), and it declares dependencies on other extensions, which the Extensions page shows and which can decide the loading order.

A complete file

<?xml version="1.0" encoding="utf-8" ?>
<software>
    <metadata>
        <name>My Site Hello</name>
        <version>1.0.0</version>
        <copyright>Copyright (C) 2026 Your Organization</copyright>
        <license>GNU General Public License v2.0 (or any later version)</license>
        <info_url>https://github.com/your-organization/mysite_hello</info_url>
    </metadata>
    <dependencies>
        <requires>
            <extension name="ezjscore" />
        </requires>
        <uses>
            <extension name="eztags" />
        </uses>
        <extends>
            <extension name="ezwebin" />
        </extends>
    </dependencies>
</software>

Check it:

xmllint --noout extension/mysite_hello/extension.xml

No output means it is well formed. An extension.xml that does not parse is ignored (its errors go to the debug output) and ezinfo.php is used instead.

The metadata block

<name>, <version>, <copyright>, <license>, <info_url>, and optionally <description>, <summary> and <author>. The rules are those of ezinfo.php: readable name, version without v, full license name, the project page as info_url. Never //autogentag// or dev-master as a version.

An older flat form, <extension><name>..</name><version>..</version></extension> without a <metadata> block, is read the same way from the top level.

Dependencies

ElementMeansShown on the Extensions page asLoading order with ExtensionOrdering=enabled
<requires>yours does not work without itRequires; a problem if it is not activethe required extension is loaded before yours
<uses>yours uses it when it is thereUsesthe used extension is loaded before yours
<extends>yours builds on it and changes itExtendsyours is loaded before the extended one

The order comes from ezpExtension::getLoadingOrder() (kernel/private/classes/ezpextension.php), which turns requires and uses into "after" and extends into "before", and eZExtension::extensionOrdering(), which sorts the active extensions topologically. A test with the kernel's sorter shows the direction: an extension a that requires b comes out as b,a.

Why it matters: an extension earlier in the loading order wins for settings and design templates. So:

  • declare <extends> when your extension overrides another's templates or settings: yours loads first and wins;
  • declare <requires> for a library you need: it loads first, and the Extensions page warns when it is missing.

site.ini [ExtensionSettings] ExtensionOrdering=enabled is the default. The Extensions page shows, per card, where an extension really loads when that differs from its written position (The Extensions page).

Reading dependencies from code

expExtensionCatalogue::dependenciesFromXml( $xml ) (kernel/classes/expextensioncatalogue.php) parses an extension.xml string into requires, uses and extends lists, the same way the loading order reads them:

<?php
$xml = file_get_contents( 'extension/ezwebin/extension.xml' );
print_r( expExtensionCatalogue::dependenciesFromXml( $xml ) );

At every release

<version> must equal the release version and the Version of ezinfo.php, in the commit the tag points at. See Bumping ezinfo.php and extension.xml.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Since 29 October 2026 the copyright of Exponential is held by the Exponential Foundation and 7x together, the Foundation named first: "Exponential Copyright © 1998-2026 Exponential Foundation and 7x", in files "Copyright (C) 1998 - 2026 Exponential Foundation and 7x. All rights reserved." Who holds it and why, what the GPL lets you do, the third-party notices that stay and how to write the notice in new files and extensions: Copyright and copyleft.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x