Skip to content

Fix garbled memory_limit warning in CLI install output example - #926

Draft
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17100-cli-installer-memory-warning-7.2
Draft

Fix garbled memory_limit warning in CLI install output example#926
promptless-for-oss wants to merge 1 commit into
mautic:7.2from
Promptless:promptless/pr-17100-cli-installer-memory-warning-7.2

Conversation

@promptless-for-oss

Copy link
Copy Markdown
Contributor

Open in Promptless

The installation guide's sample mautic:install terminal output reproduced a broken low-memory warning — it showed raw <strong> HTML tags and an unfilled %min_memory_limit% placeholder. Mautic PR #17100 fixes the CLI installer so this warning now prints as clean plain text with the placeholder resolved. This updates the documented example to match: the HTML tags are removed and %min_memory_limit% becomes 512M.

Trigger Events

Update the sample mautic:install output to match the corrected CLI
warning from mautic/mautic PR #17100: strip the <strong> HTML tags and
replace the unfilled %min_memory_limit% placeholder with 512M.
0 - Checking installation requirements...
Missing optional settings:
- [0] The <strong>memory_limit</strong> setting in your PHP configuration is lower than the suggested minimum limit of %min_memory_limit%. Mautic can have performance issues with large datasets without sufficient memory.
- [0] The memory_limit setting in your PHP configuration is lower than the suggested minimum limit of 512M. Mautic can have performance issues with large datasets without sufficient memory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CheckStep::RECOMMENDED_MEMORY_LIMIT is '512M', the minimum memory_limit value the CLI installer warning now substitutes in place of the %min_memory_limit% placeholder.

Source: https://github.com/mautic/mautic/blob/84a62818961b2f4496e7109e4858745b317538dc/app/bundles/InstallBundle/Configurator/Step/CheckStep.php#L47

0 - Checking installation requirements...
Missing optional settings:
- [0] The <strong>memory_limit</strong> setting in your PHP configuration is lower than the suggested minimum limit of %min_memory_limit%. Mautic can have performance issues with large datasets without sufficient memory.
- [0] The memory_limit setting in your PHP configuration is lower than the suggested minimum limit of 512M. Mautic can have performance issues with large datasets without sufficient memory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InstallService::getTranslationParameters() maps the mautic.install.memory.limit translation key to ['%min_memory_limit%' => CheckStep::RECOMMENDED_MEMORY_LIMIT], so the CLI output substitutes 512M for the placeholder (PR mautic/mautic#17100, fixes #17088; open at time of verification).

Source: https://github.com/mautic/mautic/blob/89ec6a2f194b7a2d8d935e9beb41d8c2561937bc/app/bundles/InstallBundle/Install/InstallService.php#L160-L168

0 - Checking installation requirements...
Missing optional settings:
- [0] The <strong>memory_limit</strong> setting in your PHP configuration is lower than the suggested minimum limit of %min_memory_limit%. Mautic can have performance issues with large datasets without sufficient memory.
- [0] The memory_limit setting in your PHP configuration is lower than the suggested minimum limit of 512M. Mautic can have performance issues with large datasets without sufficient memory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

InstallCommand::handleInstallerErrors() applies strip_tags() to each optional-setting message before writing it to the CLI, so HTML tags like no longer appear in the terminal output (PR mautic/mautic#17100, fixes #17088; open at time of verification).

Source: https://github.com/mautic/mautic/blob/89ec6a2f194b7a2d8d935e9beb41d8c2561937bc/app/bundles/InstallBundle/Command/InstallCommand.php#L437-L443

0 - Checking installation requirements...
Missing optional settings:
- [0] The <strong>memory_limit</strong> setting in your PHP configuration is lower than the suggested minimum limit of %min_memory_limit%. Mautic can have performance issues with large datasets without sufficient memory.
- [0] The memory_limit setting in your PHP configuration is lower than the suggested minimum limit of 512M. Mautic can have performance issues with large datasets without sufficient memory.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Source translation string mautic.install.memory.limit: "The memory_limit setting in your PHP configuration is lower than the suggested minimum limit of %min_memory_limit%. Mautic can have performance issues with large datasets without sufficient memory." — matches the rest of the doc's example sentence once tags are stripped and the placeholder is substituted.

Source: https://github.com/mautic/mautic/blob/84a62818961b2f4496e7109e4858745b317538dc/app/bundles/InstallBundle/Translations/en_US/messages.ini#L43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant