This document describes the .horde.yml file format used by Horde Framework 6 components. The .horde.yml file serves as the canonical source of component metadata and is used by the horde-components tool to generate composer.json files and manage releases. For older versions of this format, see Doc/Dev/HordeYmlFormat
The .horde.yml format has evolved from Horde Framework 5.2 through the git split and into Horde 6.
It provides a unified way to declare component metadata, dependencies, autoloading rules and other configuration that can be transformed into various package management formats.
Key characteristics:
These fields appear at the top level of the .horde.yml file and define the component's identity and basic properties.
id (string, mandatory)
name (string, mandatory)
full (string, mandatory)
description (string, mandatory)
list (string, mandatory)
type (string, mandatory)
authors (list, mandatory)
name (string): Full name of the contributor
user (string): Horde username or identifier
email (string): Email address
active (boolean): true if currently active, false if inactive
** role (string): Contributor role (lead, developer, contributor)
version (object, mandatory)
release (string): Current release version in semantic versioning format (e.g., 3.0.0-alpha10)
api (string): Current API version (e.g., 3.0.0alpha1)
state (object, mandatory)
release (string): Release stability (stable, beta, alpha)
api (string): API stability (stable, beta, alpha)
license (object, mandatory)
identifier (string): SPDX license identifier (e.g., LGPL-2.1-only, BSD-2-Clause, GPL-2.0-only)
uri (string): Link to full license text (e.g., http://www.horde.org/licenses/lgpl21)
homepage (string)
vendor (string)
!++ Example Meta Data
^
---
id: Browser
name: Browser
full: Browser detection library
description: >-
A library for getting information about the current user's browser and its
capabilities.
list: dev
type: library
homepage: https://www.horde.org/libraries/Horde_Browser
authors:
-
name: Chuck Hagenbuch
user: chuck
email: chuck@horde.org
active: false
role: lead
-
name: Michael Slusarz
user: slusarz
email: slusarz@horde.org
active: false
role: developer
version:
release: 3.0.0-alpha10
api: 3.0.0alpha1
state:
release: alpha
api: alpha
license:
identifier: LGPL-2.1-only
uri: http://www.horde.org/licenses/lgpl21
vendor: horde
^
The dependencies section declares required, optional and development dependencies. It supports PHP version constraints, PHP extensions, composer packages and legacy PEAR packages.
Don't use PEAR packages anymore. It's strictly for Backwards Compatibility.
!++ Structure
^
dependencies:
uses: readonly-parameters # Optional: special feature flags
required:
php: version-constraint # PHP version requirement
ext: # PHP binary extensions
extension-name: version-constraint
composer: # Composer packages
vendor/package: version-constraint
pear: # Legacy PEAR packages
channel/package: version-constraint
optional:
composer: # Optional composer packages
vendor/package: version-constraint
ext: # Optional PHP extensions
extension-name: version-constraint
pear: # Optional PEAR packages
channel/package: version-constraint
dev:
composer: # Development-only composer packages
vendor/package: version-constraint
^
!++ Required Dependencies
dependencies: required: php (string)
dependencies: required: ext (object)
dependencies: required: composer (object)
dependencies: required: pear (object)
!++ Optional Dependencies
dependencies: optional (object)
!++ Development Dependencies
dependencies: dev: composer (object)
!++ Special Features
dependencies: uses (string)
!++ Example Dependencies
^
dependencies:
uses: readonly-parameters
required:
php: ^8.2
ext:
hash: '*'
gettext: '*'
composer:
horde/exception: ^3
horde/translation: ^3
horde/util: ^3
optional:
ext:
gd: '*'
imagick: '*'
composer:
horde/cache: ^3
horde/log: ^3
dev:
composer:
horde/test: ^3
phpunit/phpunit: ^12 || ^11
phpstan/phpstan: ^2
^
The autoload section defines how PHP classes should be found within the component. It supports PSR-0, PSR-4 and classmap strategies.
!++ Structure
^
autoload:
psr-0: # PSR-0 autoloading
Class_Prefix: lib/
psr-4: # PSR-4 autoloading
Vendor\Namespace\: src/
classmap: # Classmap autoloading
- lib/
- other-dir/
^
The horde-components tool auto-senses some common autoloading patterns and sets up defaults if no autoload section is present.
!++ Autoload Strategies
autoload: psr-0 (object)
autoload: psr-4 (object)
autoload: classmap (array)
!++ Autoload-Dev Section
autoload-dev (object)
!++ Default Behavior
If no autoload section is present, horde-components will auto-detect:
!++ Example Autoload
^
autoload:
psr-0:
Horde_Browser: lib/
psr-4:
Horde\Browser\: src/
classmap:
- lib/legacy/
^
^
autoload:
classmap:
- lib/
psr-4:
Horde\Ansel\: src/
^
Several additional sections support composer-specific features.
!++ Commands Section
commands (array, optional)
nocommands (array, optional)
nocommands:
- bin/horde-bootstrap
- bin/horde-components-prototype-transpile
^
!++ Conflicts Section
conflicts (object, optional)
conflicts:
horde/base: <= 5.9.9
horde/horde: <= 5.9.9
^
Use conflicts when already-released packages have overly liberal constraints that allow problematic combinations.
!++ Provides Section
provides (object, optional)
provides:
horde/base: 6.1.1
horde/user-management-api-implementation: 1.0
^
Use provides when:
!++ Allow-Plugins Section
allow-plugins (mixed, optional)
allow-plugins: ~
^
allow-plugins:
horde/horde-installer-plugin: true
composer/installers: true
^
The quality section configures code quality tools.
!++ Structure
^
quality:
phpstan:
level: 9
php-cs-fixer:
enabled: true
^
!++ PHPStan Configuration
quality: phpstan: level (integer)
This setting instructs the horde-components qc and ci to FAIL if a previous water mark was no longer achieved.
!++ Modern Horde 6 Library
^
---
id: Browser
name: Browser
full: Browser detection library
description: >-
A library for getting information about the current user's browser and its
capabilities.
list: dev
type: library
homepage: https://www.horde.org/libraries/Horde_Browser
authors:
-
name: Chuck Hagenbuch
user: chuck
email: chuck@horde.org
active: false
role: lead
version:
release: 3.0.0-alpha10
api: 3.0.0alpha1
state:
release: alpha
api: alpha
license:
identifier: LGPL-2.1-only
uri: http://www.horde.org/licenses/lgpl21
dependencies:
required:
php: ^7.4 || ^8
composer:
horde/exception: ^3
horde/translation: ^3
horde/util: ^3
vendor: horde
^
!++ Application with Mixed Dependencies
^
---
id: ansel
name: Ansel
full: Photo gallery application
description: Ansel is a full featured photo gallery application.
list: ansel
type: application
homepage: https://www.horde.org/apps/ansel
authors:
-
name: Michael J Rubinsky
user: mrubinsk
email: mrubinsk@horde.org
active: true
role: lead
version:
release: 4.0.0-alpha6
api: 4.0.0alpha1
state:
release: alpha
api: beta
license:
identifier: GPL-2.0-only
uri: http://www.horde.org/licenses/gpl
dependencies:
required:
php: ^7.4 || ^8
composer:
horde/horde: ^6
horde/core: ^3
horde/form: ^3
horde/image: ^3
ext:
gettext: '*'
hash: '*'
optional:
composer:
horde/service_twitter: ^3
horde/service_facebook: ^3
ext:
gd: '*'
imagick: '*'
autoload:
classmap:
- lib/
psr-4:
Horde\Ansel\: src/
vendor: horde
^
!++ Component with Quality Tools
^
---
id: components
name: Components
full: Developer tool for managing Horde components
description: >-
The package provides utility methods required when preparing a new component
release for Horde. It also includes quality control checks.
list: horde
type: component
authors:
-
name: Jan Schneider
user: jan
email: jan@horde.org
active: true
role: lead
version:
release: 1.0.0-alpha39
api: 1.0.0alpha1
state:
release: alpha
api: alpha
license:
identifier: LGPL-2.1-only
uri: http://www.horde.org/licenses/lgpl21
dependencies:
required:
php: ^8.2
composer:
horde/cli: ^3
horde/argv: '*'
horde/util: '*'
optional:
composer:
horde/test: ^3
phpunit/phpunit: ^9
dev:
composer:
horde/test: ^3
phpunit/phpunit: ^12 || ^11 || ^10 || ^9
nocommands:
- bin/horde-bootstrap
- bin/horde-components-prototype-transpile
allow-plugins: ~
quality:
phpstan:
level: 9
vendor: horde
^
The .horde.yml file is primarily managed by the horde-components? tool:
For more information on release management, see Doc/Dev/ReleaseProcess?.
When migrating from Horde 5 to Horde 6: