Download the PHP package alexsabur/antispam-bundle without Composer
On this page you can find all versions of the php package alexsabur/antispam-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package antispam-bundle
The original author has deleted the package, but it was used in local project.
NucleosAntiSpamBundle
This bundle provides some basic features to reduce spam in Symfony. It is the successor of core23/antispam-bundle
, but not related to isometriks/spam-bundle
.
Features
-
Honeypot protection for forms: An additional "hidden" (i.e. made invisible with CSS) field will be added to your form. Whoever fills out this field, is considered to be a spam bot.
-
Time protection for forms: The time between displaying the form and submitting the form is measured. Anybody who submits the form quicker than a certain number of seconds, is considered to be a spam bot. The timestamp is stored in the session.
- Email address obfuscation filter for Twig: To prevent spam harvest bots from detecting your email address, they are obfuscated by e.g. replacing
@
with[AT]
. The filter will find email addresses automatically, so you can apply it to your entire text.
Installation
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
Enable the Bundle
In older versions of Symfony, you need to enable it manually:
Usage
Form based protection
In a controller:
In a form class:
Twig email address obfuscation
The Twig filter antispam
replaces @
by e.g. [AT]
.
If you want a JavaScript decoding for the encoded email addresses, you should use the AntiSpam.js
library:
It is recommended to use webpack / webpack-encore
to include the JavaScript library in your page. This file is located in the assets
folder.
Configure the Bundle
Create a configuration file called nucleos_antispam.yaml
:
License
This bundle is under the MIT license.
All versions of antispam-bundle with dependencies
ext-pcre Version *
symfony/config Version ^5.4 || ^6.2
symfony/dependency-injection Version ^5.4 || ^6.2
symfony/event-dispatcher Version ^5.4 || ^6.2
symfony/expression-language Version ^5.4 || ^6.2
symfony/form Version ^5.4 || ^6.2
symfony/framework-bundle Version ^5.4.19 || ^6.2.5
symfony/http-foundation Version ^5.4 || ^6.2
symfony/http-kernel Version ^5.4 || ^6.2
symfony/options-resolver Version ^5.4 || ^6.2
symfony/translation-contracts Version ^1.1 || ^2.0 || ^3.0
twig/twig Version ^2.4 || ^3.0