Open StoppingBuck opened 4 years ago
Thanks for the suggestion @StoppingBuck - I've often thought that this would be really helpful!
Simply take your source code
https://github.com/mautic/mautic/blob/b584b356315fea69208daac881541f4c7d01311a/composer.json#L6-L16
ask PHP CompatInfo what extensions are used
https://github.com/llaville/php-compat-info
and remove default extensions (mainly php -n -m
)
Done 🍏
For 2.16 (since I haven't upgraded to M3 yet):
Going through https://github.com/mautic/mautic/blob/2.16/app/bundles/InstallBundle/Configurator/Step/CheckStep.php together with https://github.com/mautic/mautic/blob/2.16/app/bundles/InstallBundle/Translations/en_US/messages.ini I seem to find these PHP modules:
Mandatory:
php-simplexml
is a virtual package pointing to php-xml
. It might also be referring to libxml.Optional:
Some not-directly-module-related checks:
mautic.install.apc.version="When using APC, you must use version %minapc% or newer. You have version %currentapc% installed. Please update your APC extension."
mautic.install.suhosin.whitelist="Suhosin is not properly configured, add <strong>phar</strong> to <strong>suhosin.executor.include.whitelist</strong> in your PHP configuration."
mautic.install.xdebug.exception.trace="Xdebug's 'show_exception_trace' option should be disabled in your PHP configuration."
and mautic.install.xdebug.scream="Xdebug's 'scream' option should be disabled in your PHP configuration."
mautic.install.xdebug.nesting="Set <strong>xdebug.max_nesting_level</strong> to at least <strong>250</strong> in your PHP configuration to stop Xdebug's infinite recursion protection from erroneously throwing a fatal error."
mautic.install.extension.eaccelerator="eAccelerator is incompatible with Mautic. Please disable it."
Next step is to check what has changed for M3 - and then, find where to put the list :slightly_smiling_face:
Some PHP extensions are build into the php binary.
You may survey your php binary by issuing php -n -m
💡 There are funky linux distributions lacking some extension from the php binary.
PHP 7.3.21-1+0~20200807.66+debian9~1.gbp18a1c2
has
Core date filter hash libxml openssl pcntl pcre Reflection session sodium SPL standard zlib
php7.3-xml on e.g. Debian contains
/usr/lib/php/20180731/dom.so
/usr/lib/php/20180731/simplexml.so
/usr/lib/php/20180731/wddx.so
/usr/lib/php/20180731/xml.so
/usr/lib/php/20180731/xmlreader.so
/usr/lib/php/20180731/xmlwriter.so
/usr/lib/php/20180731/xsl.so
Another one that's needed (found out by accident) is php-mysqli
(if you are using mysqli as database connector)
What about imagemagick/graphicsmagick or (My)SQL client, cron? Is this documented anywhere already?
Thanks @CybotTM for your many comments today! Indeed as the issue highlights, this is not currently documented but we want to improve this. One of our strategic initiatives is to improve the install upgrade process and the accompanying documentation however we have not yet managed to get folk together to form the team. Would that be of interest?
If you would like to kick it off you can make a PR to this repo and review the styleguide for contributing here.
@RCheesley , thanks for the hint, but I'm currently busy with building a Mautic container image. Which is updatable and for all major 3 versions: https://github.com/netresearch/docker-mautic - my findings are added there.
Great - would be awesome if you would consider joining the team who are maintaining the official Docker image - it is very much under resourced and we would welcome more involvement!
Inspired by this old, closed Mautic issue I think it would be a good idea to have a list of the required PHP modules somewhere in the Documentation - the docs mention the required PHP version, but not what extensions should be enabled. There is an extensions check done during installation, as the Getting started mentions in passing, but it would be nice to have a list somewhere in the docs so we don't have to go digging in
app/bundles/InstallBundle/Configurator/Step/CheckStep.php
to find it :slightly_smiling_face: