Skip to content

Commit f00077a

Browse files
committed
Finalize Contibutors documentation
1 parent bf3dffc commit f00077a

File tree

2 files changed

+130
-2
lines changed

2 files changed

+130
-2
lines changed

doc/contributor/PHP-EXT-options.yml.md

Lines changed: 117 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,122 @@ PHP Mods: `options.yml` |
1111

1212
# Extension definition: `options.yml`
1313

14-
To be done
14+
These options are purely for the module generator to decide whether or not to build the module, in what order to build it (order of dependencies) and when to enable it for PHP cli and PHP-FPM.
1515

1616

17-
For now have a look at the existing modules into the respective `options.yml` files as they are mostly the same.
17+
### `name`
18+
19+
* Required: Yes
20+
* Type: `str`
21+
22+
The lower-case name of the extension as it is shown by `php -m`.
23+
24+
25+
### `exclude`
26+
27+
* Required: Yes
28+
* Type: `list[str]`
29+
* Empty: `[]`
30+
31+
Add PHP versions to exclude from building/installing this extension. This could be due to build errors or deprecations.
32+
33+
Example:
34+
```yaml
35+
# Exclude PHP 5.2 and PHP 5.3
36+
exclude: [5.2, 5.3]
37+
```
38+
39+
**Note:** If this extension is already present, do not exclude it in here, but rather use `already_avail` in `build.yml`.
40+
41+
42+
### `depends_build`
43+
44+
* Required: Yes
45+
* Type: `list[str]`
46+
* Empty: `[]`
47+
48+
If this PHP module requires another PHP module to be present prior building, you have to specify them in this list. The module generator will then ensure to build all available modules in order of dependencies.
49+
50+
Example:
51+
```yaml
52+
# Before building the current extension, it will be ensured that
53+
# igbinary and msgpack are build and installed beforehand.
54+
depends_build:
55+
- igbinary
56+
- msgpack
57+
```
58+
59+
60+
### `depends_load`
61+
62+
* Required: Yes
63+
* Type: `list[str]`
64+
* Empty: `[]`
65+
66+
If this PHP module requires another PHP module to be loaded beforehand in order to function correctly, you have to specify them in this list. The PHP docker image will then respect the order of loading modules as per specification in here.
67+
68+
Example:
69+
```yaml
70+
# Before loading the current module, ensure to load
71+
# igbinary and msgpack first.
72+
depends_load:
73+
- igbinary
74+
- msgpack
75+
```
76+
77+
**Note:** This is the opposite of `loads_before`
78+
79+
80+
81+
### `loads_before`
82+
83+
* Required: No
84+
* Type: `list[str]`
85+
* Empty: `[]`
86+
87+
If this PHP module requires to be loaded before certain other PHP modules, specify them in this list. The PHP docker image will then respect the order of loading modules as per specification in here.
88+
89+
Example:
90+
```yaml
91+
# Before loading igbinary and msgpack, ensure to load
92+
# the current module.
93+
depends_load:
94+
- igbinary
95+
- msgpack
96+
```
97+
98+
**Note:** This is the opposite of `depends_load`
99+
100+
101+
102+
### `conflicts_load`
103+
104+
* Required: Yes
105+
* Type: `list[str]`
106+
* Empty: `[]`
107+
108+
Specify any PHP modules that cause the current module to malfunction when loaded.
109+
110+
Example:
111+
```yaml
112+
# Make igbinary and msgpack as incompatible to load with this module.
113+
conflicts_load:
114+
- igbinary
115+
- msgpack
116+
```
117+
118+
119+
### `enabled_php_cli`
120+
121+
* Required: Yes
122+
* Type: `bool`
123+
124+
Specify if this module should be loaded and made available to the PHP cli (does not affect PHP-FPM).
125+
126+
127+
### `enabled_php_fpm`
128+
129+
* Required: Yes
130+
* Type: `bool`
131+
132+
Specify if this module should be loaded and made available to the PHP-FPM process (does not affect PHP cli).

doc/contributor/PHP-EXT-test.yml.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,17 @@ PHP Mods: `test.yml`
1111

1212
# Extension definition: `test.yml`
1313

14+
### Goal
15+
The goal of these tests will be to ensure that each compiled module works as expected:
16+
* Required system libraries are present
17+
* Module has been loaded in correct order
18+
* Module works properly
19+
20+
This will be accomplished by providing example PHP code, which makes calls to functions of the respective module. The tests will then check PHP error logs, stderr, unforseen exits and segfaults for potential errors.
21+
22+
Currently some basic tests already exist or a few modules **[here](../../tests/mods/modules)**.
23+
24+
25+
### Configuration
26+
1427
This is not yet implemented and thus no documentation exists.

0 commit comments

Comments
 (0)