Files
CanbiZ (MickLesk) 710884c90b fix(php): improve module handling and prevent installation failures (#11358)
Changes to setup_php():
- Add version detection for PHP 8.5+ built-in opcache
- Define BUILTIN_MODULES list for modules included in php-common
  (ctype, fileinfo, iconv, tokenizer, phar, posix, etc.)
- Filter out built-in modules before attempting installation
- Verify each package exists via apt-cache before adding to install list
- Skip unavailable packages with informational message instead of error
- Add extended default modules (mysql, sqlite3, pgsql, redis, imagick,
  bz2, apcu) to cover ~90% of typical use cases
- Improve error handling with graceful degradation

This prevents installation failures when:
- PHP version has module built into core (e.g., opcache in 8.5+)
- Module is provided by php-common (ctype, fileinfo, etc.)
- Package is renamed or unavailable in specific PHP version

Fixes #11359
2026-01-30 10:29:51 +01:00
..