Waddle keeps settings that are pointless or dangerous on a remote (xDebug, display_errors,
OPcache file-revalidation, and similar) off every remote by specifying them in specific ini files that are intentionally git-ignored.
How PHP loads the config
PHP is compiled with a scan directory (config-file-scan-dir) pointing at php/conf/conf.d.
At startup PHP loads every *.ini file in that directory, in alphabetical order, each one
layering on top of the previous. Waddle uses a numeric prefix on the file names to make that
order explicit:
| File | git tracked? | What it does |
|---|---|---|
00-opcache.ini |
yes | OPcache sizing, identical everywhere |
10-waddle.ini |
yes | Shared settings, including hardened, remote-safe defaults (display_errors = Off, expose_php = Off, OPcache timestamp validation off, …) |
80-dev.ini |
no, git-ignored | Development overrides (display_errors = On, OPcache revalidation on, verbose errors, aggressive session GC) |
90-xdebug.ini |
no, git-ignored | xDebug debugger configuration |
Why this gives the right behaviour in each environment
- Locally, all four files are present. Because
80-dev.iniand90-xdebug.inisort after10-waddle.ini, their values win, so you get developer-friendly error reporting, live code reloading and a working debugger. - On a remote,
80-dev.iniand90-xdebug.iniwere never pushed (they are git-ignored), so only00-opcache.iniand10-waddle.iniload. The hardened, remote-safe baseline in10-waddle.iniis what runs: errors are hidden, the PHP version is not advertised, OPcache trusts its cache for speed, and no debugger is present.
Sharing a project with a colleague
The same git-ignored files raise an obvious question when handing a project off. If your colleague builds it with Waddle, there’s no problem: the missing files are just absent templates, and Waddle renders them again on their machine. If they don’t use Waddle, see Running a Project Without Waddle for what to pack up and send along instead.