Roots Discourse

Php_extensions_custom must be formatted as dicts

If you try to add custom PHP extensions via group_vars/all/main.yml using the syntax suggested in several answers (e.g. to install ImageMagick)…

php_extensions_custom:
  - php-imagick

You’ll get this error:

The following variables must be formatted as dicts:
  - php_extensions_custom

This is the right syntax:

php_extensions_custom:
  php-imagick: "{{ apt_package_state }}"

Bye :wink:

4 Likes

I ran into this when updating a copy of Trellis for a site that needed soap. I figured it out, too, but I wonder if a commented-out example would help future generations.

1 Like

Indeed.

Can anyone explain what that apt_package_state part does?

2 Likes

Sorry for reviving this discussion, but will WordPress use ImageMagick/Imagick instead of PHP GD?
Must a plugin be used for forcing WordPress to use ImageMagick/Imagick instead of PHP GD?