-
Notifications
You must be signed in to change notification settings - Fork 17
/
hidev.yml
55 lines (49 loc) · 2.44 KB
/
hidev.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package:
type: composer-plugin
name: composer-config-plugin
title: Composer plugin for config assembling
headline: Composer Config Plugin
keywords: composer, config, assembling, plugin
description: |
This [Composer] plugin provides assembling
of configurations distributed with composer packages.
This allows to put configuration needed to use package right inside of
the package thus implementing plugin system: package becomes a plugin
holding both the code and it's configuration.
How it works?
- scans installed packages for `config-plugin` extra option in their
`composer.json`
- loads `dotenv` files to set `$_ENV` variables
- requires `defines` files to set constants
- requires `params` files
- requires config files
- options collected on earlier steps could and should be used in later
steps, e.g. `$_ENV` should be used for constants and parameters, which
in turn should be used for configs
- files processing order is crucial to achieve expected behavior: options
in root package have priority over options from included packages, more
about it see below in **Files processing order** section
- collected configs are written as PHP files in
`vendor/hiqdev/composer-config-plugin-output`
directory along with information needed to rebuild configs on demand
- then assembled configs can be loaded into application with `require`
**Read more** about the general idea behind this plugin in [english] or
[russian].
[composer]: https://getcomposer.org/
[english]: https://hiqdev.com/pages/articles/app-organization
[russian]: https://habrahabr.ru/post/329286/
readme:
forceRewrite: false
plugins:
hiqdev/composer-config-plugin: "dev-master"
hiqdev/hidev-php: "dev-master"
hiqdev/hidev-hiqdev: "dev-master"
hiqdev/hidev-readme: "dev-master"
hiqdev/hidev-chkipper: "dev-master"
hiqdev/hidev-composer: "dev-master"
hiqdev/hidev-license: "dev-master"
hiqdev/hidev-php-cs-fixer: "dev-master"
hiqdev/hidev-phpstan: "dev-master"
hiqdev/hidev-phpunit: "dev-master"
hiqdev/hidev-scrutinizer: "dev-master"
hiqdev/hidev-travis: "dev-master"