Skip to content

Commit f3bd73e

Browse files
committed
Tester 2.6: updated documentation for php.ini loading behavior change
1 parent 10e5a56 commit f3bd73e

4 files changed

Lines changed: 30 additions & 40 deletions

File tree

tester/cs/guide.texy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,9 @@ Výstup může vypadat takto:
116116
/--pre .[terminal]
117117
_____ ___ ___ _____ ___ ___
118118
|_ _/ __)( __/_ _/ __)| _ )
119-
|_| \___ /___) |_| \___ |_|_\ v2.5.2
119+
|_| \___ /___) |_| \___ |_|_\ v2.6.0
120120

121-
Note: No php.ini is used.
122-
PHP 8.3.2 (cli) | php -n | 8 threads
121+
PHP 8.5.2 (cli) | php | 8 threads
123122

124123
........s................<span style="color: #FFF; background-color: #900">F</span>.........
125124

@@ -160,7 +159,8 @@ Podporované verze PHP
160159

161160
| verze | kompatibilní s PHP
162161
|------------------|-------------------
163-
| Tester 2.5 | PHP 8.0 – 8.3
162+
| Tester 2.6 | PHP 8.0 – 8.5
163+
| Tester 2.5 | PHP 8.0 – 8.5
164164
| Tester 2.4 | PHP 7.2 – 8.2
165165
| Tester 2.3 | PHP 7.1 – 8.0
166166
| Tester 2.1 – 2.2 | PHP 7.1 – 7.3

tester/cs/running-tests.texy

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ Výstup může vypadat třeba takto:
2323
/--pre .[terminal]
2424
_____ ___ ___ _____ ___ ___
2525
|_ _/ __)( __/_ _/ __)| _ )
26-
|_| \___ /___) |_| \___ |_|_\ v2.5.2
26+
|_| \___ /___) |_| \___ |_|_\ v2.6.0
2727

28-
Note: No php.ini is used.
29-
PHP 8.3.2 (cli) | php -n | 8 threads
28+
PHP 8.5.2 (cli) | php | 8 threads
3029

3130
........s..........................
3231

@@ -37,9 +36,6 @@ Při opakovaném spuštění nejprve provádí testy, které při předchozím b
3736

3837
Pokud žádný test neselže, návratový kód Testeru je nula. Jinak je návratový kód nenulový.
3938

40-
.[warning]
41-
Tester spouští PHP procesy bez `php.ini`. Detailněji v části [#Vlastní php.ini].
42-
4339

4440
Parametry příkazové řádky
4541
=========================
@@ -56,8 +52,8 @@ Usage:
5652

5753
Options:
5854
-p <path> Specify PHP interpreter to run (default: php).
59-
-c <path> Look for php.ini file (or look in directory) <path>.
60-
-C Use system-wide php.ini.
55+
-c <path> Use custom php.ini, ignore system configuration.
56+
-C With -c, include system configuration as well.
6157
-d <key=value>... Define INI entry 'key' with value 'value'.
6258
-s Show information about skipped tests.
6359
--stop-on-fail Stop execution upon the first failure.
@@ -86,12 +82,12 @@ tester -p /home/user/php-7.2.0-beta/php-cgi tests
8682

8783
-c <path> .[filter]
8884
-------------------
89-
Určuje, který `php.ini` se bude používat při spouštění testů. Ve výchozím stavu se žádný php.ini nepoužije. Více v části [#Vlastní php.ini].
85+
Použije vlastní `php.ini` soubor a ignoruje systémovou konfiguraci. Více v části [#Vlastní php.ini].
9086

9187

9288
-C .[filter]
9389
------------
94-
Použije se systémové `php.ini`. Na UNIXu také všechny příslušné INI soubory `/etc/php/{sapi}/conf.d/*.ini`. Více v části [#Vlastní php.ini].
90+
Při použití společně s `-c` zachová i systémovou konfiguraci (neignoruje ji). Více v části [#Vlastní php.ini].
9591

9692

9793
-d <key=value> .[filter]
@@ -221,11 +217,7 @@ Použijeme současně s volbou `--coverage`. `<path>` je cesta ke zdrojovým kó
221217

222218
Vlastní php.ini
223219
===============
224-
Tester spouští PHP procesy s parametrem `-n`, což znamená, že žádné `php.ini` není načteno. V UNIXu ani ty z `/etc/php/conf.d/*.ini`. To zajistí shodné prostředí pro běh testů, ale také vyřadí všechna PHP rozšíření běžně načtená systémovým PHP.
225-
226-
Chcete-li načítání systémových php.ini souborů zachovat, použijte parametr `-C`.
227-
228-
Pokud nějaká rozšíření nebo speciální INI nastavení pro testy potřebujete, doporučujeme vytvoření vlastního `php.ini` souboru, který bude distribuován s testy. Tester pak spouštíme s parametrem `-c`, například `tester -c tests/php.ini tests`, kde INI soubor může vypadat takto:
220+
Pro testy můžete použít vlastní `php.ini` soubor. Pokud potřebujete specifická rozšíření nebo speciální INI nastavení, doporučujeme vytvořit vlastní `php.ini`, který bude distribuován s testy. Tester pak spouštíme s parametrem `-c`, například `tester -c tests/php.ini tests`, kde INI soubor může vypadat takto:
229221

230222
```ini
231223
[PHP]
@@ -236,4 +228,7 @@ extension=php_pdo_pgsql.dll
236228
memory_limit=512M
237229
```
238230

239-
Spuštění Testeru v UNIXu se systémovým `php.ini`, například `tester -c /etc/php/cli/php.ini` nenačte ostatní INI z `/etc/php/conf.d/*.ini`. To je vlastnost PHP, ne Testeru.
231+
Při použití `-c` Tester **ignoruje systémovou konfiguraci** (spouští PHP s příznakem `-n`). Chcete-li zachovat i systémovou konfiguraci, přidejte volbu `-C`: `tester -c tests/php.ini -C tests`. Ani při kombinaci `-c` a `-C` se nenačtou v UNIXu ostatní INI soubory z `/etc/php/conf.d/*.ini`. To je vlastnost PHP, ne Testeru.
232+
233+
.[note]
234+
Do verze 2.6 Tester bez uvedení `-c` spouštěl PHP s parametrem `-n`, tedy bez php.ini; volba `-C` toto potlačila. Od verze 2.6 se systémové php.ini načítá automaticky. Chování při použití `-c` zůstává stejné.

tester/en/guide.texy

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,9 @@ The output may look like this:
116116
/--pre .[terminal]
117117
_____ ___ ___ _____ ___ ___
118118
|_ _/ __)( __/_ _/ __)| _ )
119-
|_| \___ /___) |_| \___ |_|_\ v2.5.2
119+
|_| \___ /___) |_| \___ |_|_\ v2.6.0
120120

121-
Note: No php.ini is used.
122-
PHP 8.3.2 (cli) | php -n | 8 threads
121+
PHP 8.5.2 (cli) | php | 8 threads
123122

124123
........s................<span style="color: #FFF; background-color: #900">F</span>.........
125124

@@ -160,7 +159,8 @@ Supported PHP versions
160159

161160
| Version | Compatible with PHP
162161
|------------------|-------------------
163-
| Tester 2.5 | PHP 8.0 – 8.3
162+
| Tester 2.6 | PHP 8.0 – 8.5
163+
| Tester 2.5 | PHP 8.0 – 8.5
164164
| Tester 2.4 | PHP 7.2 – 8.2
165165
| Tester 2.3 | PHP 7.1 – 8.0
166166
| Tester 2.1 – 2.2 | PHP 7.1 – 7.3

tester/en/running-tests.texy

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ The output may look like this:
2323
/--pre .[terminal]
2424
_____ ___ ___ _____ ___ ___
2525
|_ _/ __)( __/_ _/ __)| _ )
26-
|_| \___ /___) |_| \___ |_|_\ v2.5.2
26+
|_| \___ /___) |_| \___ |_|_\ v2.6.0
2727

28-
Note: No php.ini is used.
29-
PHP 8.3.2 (cli) | php -n | 8 threads
28+
PHP 8.5.2 (cli) | php | 8 threads
3029

3130
........s..........................
3231

@@ -37,9 +36,6 @@ When run again, it first executes the tests that failed in the previous run, so
3736

3837
The Tester's exit code is zero if no test fails. Otherwise, it is non-zero.
3938

40-
.[warning]
41-
The Tester runs PHP processes without `php.ini`. More details in the [#Own php.ini] section.
42-
4339

4440
Command-Line Options
4541
====================
@@ -56,8 +52,8 @@ Usage:
5652

5753
Options:
5854
-p <path> Specify PHP interpreter to run (default: php).
59-
-c <path> Look for php.ini file (or look in directory) <path>.
60-
-C Use system-wide php.ini.
55+
-c <path> Use custom php.ini, ignore system configuration.
56+
-C With -c, include system configuration as well.
6157
-d <key=value>... Define INI entry 'key' with value 'value'.
6258
-s Show information about skipped tests.
6359
--stop-on-fail Stop execution upon the first failure.
@@ -86,12 +82,12 @@ tester -p /home/user/php-7.2.0-beta/php-cgi tests
8682

8783
-c <path> .[filter]
8884
-------------------
89-
Specifies which `php.ini` will be used when running tests. By default, no php.ini is used. See [#Own php.ini] for more information.
85+
Uses a custom `php.ini` file and ignores the system configuration. This is useful for running tests with specific settings. See [#Own php.ini] for more information.
9086

9187

9288
-C .[filter]
9389
------------
94-
A system-wide `php.ini` is used. So on UNIX platform, all the `/etc/php/{sapi}/conf.d/*.ini` files too. See [#Own php.ini] section.
90+
When used together with `-c`, includes the system configuration as well (does not ignore it). See [#Own php.ini] section.
9591

9692

9793
-d <key=value> .[filter]
@@ -221,11 +217,7 @@ Used in conjunction with the `--coverage` option. `<path>` is the path to the so
221217

222218
Own php.ini
223219
===========
224-
Tester runs PHP processes with the `-n` option, which means that no `php.ini` is loaded (not even those from `/etc/php/conf.d/*.ini` on UNIX systems). This ensures a consistent environment for running tests, but it also disables all external PHP extensions normally loaded by the system's PHP.
225-
226-
To preserve the loading of system php.ini files, use the `-C` parameter.
227-
228-
If you need specific extensions or special INI settings for your tests, we recommend creating your own `php.ini` file and distributing it with your tests. Then, run Tester with the `-c` option, for example, `tester -c tests/php.ini tests`. The INI file might look like this:
220+
You can use a custom `php.ini` file for your tests. If you need specific extensions or special INI settings, we recommend creating your own `php.ini` file and distributing it with your tests. Then, run Tester with the `-c` option, for example, `tester -c tests/php.ini tests`. The INI file might look like this:
229221

230222
```ini
231223
[PHP]
@@ -236,4 +228,7 @@ extension=php_pdo_pgsql.dll
236228
memory_limit=512M
237229
```
238230

239-
Running Tester on UNIX with a system `php.ini`, like `tester -c /etc/php/cli/php.ini`, does not load other INIs from `/etc/php/conf.d/*.ini`. This is a PHP behavior, not specific to Tester.
231+
When using `-c`, Tester **ignores the system configuration** (runs PHP with `-n` flag). If you want to include system configuration as well, add the `-C` option: `tester -c tests/php.ini -C tests`. Even when combining `-c` and `-C`, other INI files from `/etc/php/conf.d/*.ini` are not loaded on UNIX. This is a PHP behavior, not specific to Tester.
232+
233+
.[note]
234+
Prior to version 2.6, without `-c`, Tester ran PHP with `-n` flag, i.e., without php.ini; the `-C` option suppressed this. From version 2.6, system php.ini is loaded by default. The behavior when using `-c` remains unchanged.

0 commit comments

Comments
 (0)