PHP extensions
Prebuilt extensions from Devid's catalog, and which ones can be added.
devid php ext available 8.4 # what the catalog offers for PHP 8.4
devid php ext install 8.4 imagick igbinary # one or more; php-fpm restarts once
devid php ext list 8.4 # bundled, Xdebug/pcov, and installed catalog extensions
devid php ext remove 8.4 imagickIn the TUI: PHP page, enter on a version, then Extensions…: space ticks, enter on the Install button installs, r removes. In the desktop app: PHP, then Extensions on a version.
The catalog (PHP 8.3, 8.4 and 8.5): apcu, igbinary, imagick, ldap, memcached, mongodb, msgpack and swoole.
- Each comes only from Devid's releases. It is built in CI from its official source for that exact PHP release, and its checksum is verified before install. Nothing is compiled on your Mac.
installchecks that the extension loads inphpandphp-fpmbefore it restarts php-fpm. If it does not load, nothing changes and the sites keep running. Several extensions install in one go, with a single php-fpm restart.devid updateupdates them together with PHP.devid doctorreports one that no longer loads.
| Extension | Notes |
|---|---|
| apcu | Also on in the CLI (apc.enable_cli=1). |
| igbinary | Laravel's Redis and cache serializer option. PHP 8.5 gets 3.2.17RC1, the only igbinary release that supports it; 8.3 and 8.4 get the stable 3.2.16. |
| imagick | JPEG, PNG, GIF, WebP, AVIF, JPEG XL, TIFF and SVG; HEIC can be read but not written. PDF cannot be read (that needs Ghostscript). SVG gradients in objectBoundingBox units, SVG's default, are not drawn correctly (ImageMagick#9093). Text uses macOS fonts. |
| ldap | From PHP's own source, with OpenLDAP built in. |
| memcached | libmemcached built in. Serializers: PHP's and JSON, plus the session handler. The igbinary and msgpack serializers are left out, so memcached does not depend on loading those first. |
| mongodb | Carries its own OpenSSL. |
| msgpack | Redis serializer option. |
| swoole | For the CLI (php artisan octane:start). TLS, HTTP/2, brotli, async DNS and the coroutine curl hook. It does not change how php-fpm serves .test sites. |
TLS in mongodb and ldap trusts the macOS system certificates. For a server with a Devid .test certificate, pass tlsCAFile (mongodb) or LDAP_OPT_X_TLS_CACERTFILE (ldap) pointing at ~/.devid/ca/cacert.pem.
Which extensions can be added
| Kind | Examples | Can be added? |
|---|---|---|
| Bundled in Devid's PHP | bcmath, curl, gd, intl, mbstring, mysqli, pdo_pgsql, redis, soap, sodium, zip | Nothing to install (devid php ext list). |
| Shipped with Devid's PHP, off by default | Xdebug, pcov | devid php ext <version> xdebug on |
| Open source, no extra library | apcu, igbinary, msgpack, ds, uuid | Yes |
| Open source, with an open-source C library | imagick, memcached, mongodb, swoole, amqp, rdkafka, yaml | Yes. The library is built into the extension, so nothing else is installed. |
| In PHP's source but not in Devid's build | ldap, xsl, gmp, tidy | Yes, built from the same PHP source as the release. |
Cannot be added, and why:
| Reason | Examples |
|---|---|
| Needs a proprietary client library | oci8 / pdo_oci (Oracle Instant Client), sqlsrv / pdo_sqlsrv (Microsoft ODBC Driver) |
| Needs thread-safe PHP; Devid's PHP is non-thread-safe, as php-fpm uses it | parallel |
| The vendor no longer builds it for Intel Macs | ionCube Loader: its Intel loaders stop at PHP 8.3 |
| Closed source without a license to redistribute | vendor loaders whose license allows neither mirroring nor downloads from the vendor |
| Windows only, or no support for PHP 8.3 and newer | com_dotnet; Zend Guard Loader, pthreads |
| A closed-source agent with its own background service | New Relic, Datadog, Blackfire (not planned) |
Asking for another extension: open a Feature request in this repository. Each catalog extension is a reviewed recipe (extensions/<name>.sh): the official source pinned by checksum, its build options and a smoke test. The pull request builds and tests it for every PHP version, and a merge publishes it in a new release, with no Devid update needed.