For developers
Custom checks
A custom check is a class implementing Pdir\AntiSpamBundle\AntiSpam\Check\SpamCheckInterface. In a bundle with
autoconfiguration it is registered automatically (tag pdir_anti_spam.check) and contributes to the score.
Checks don’t return finished texts but a key under
$GLOBALS['TL_LANG']['MSC']['pdir_anti_spam']['reason'][…] plus parameters. Translation happens on output.
Languages
All texts (back-end settings, notice text, honeypot label, log entries, error messages) are located in
contao/languages/<language>/. German and English are included; for other languages Contao falls back to English.
You can override individual texts as usual in your installation’s contao/languages/<language>/default.php.
New language: create the folder contao/languages/<language>/ with default.php and tl_settings.php.
composer test checks keys and placeholders against the German texts.
Tests
The tests include anonymised real spam samples as well as legitimate requests that must never be blocked.
Add new spam patterns as a fixture in tests/Fixtures/Submissions.php first.