flux-se / sylius-hcaptcha-plugin
Plugin adding the hCaptcha field to some frontend FormType of Sylius
Installs: 2 999
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- meteo-concept/hcaptcha-bundle: >=2
- sylius/sylius: ^1.4
Requires (Dev)
- ext-json: *
- behat/behat: ^3.7
- behat/mink: ^1.9
- dbrekelmans/bdi: ^1.0
- friends-of-behat/mink: ^1.9
- friends-of-behat/mink-browserkit-driver: ^1.4
- friends-of-behat/mink-debug-extension: ^2.0
- friends-of-behat/mink-extension: ^2.4
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/symfony-extension: ^2.1
- friends-of-behat/variadic-extension: ^1.3
- nyholm/psr7: ^1.4
- phpspec/phpspec: ^7.0
- phpstan/extension-installer: ^1.2
- phpstan/phpstan-doctrine: ^1
- phpstan/phpstan-strict-rules: ^1
- phpstan/phpstan-webmozart-assert: ^1
- phpunit/phpunit: ^9.5
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- robertfausk/behat-panther-extension: ^1.1
- sylius-labs/coding-standard: ^4.0
- symfony/browser-kit: ^5.4|^6.0
- symfony/debug-bundle: ^5.4|^6.0
- symfony/dotenv: ^5.4|^6.0
- symfony/http-client: ^5.4|^6.0
- symfony/intl: ^5.4|^6.0
- symfony/runtime: ^5.4|^6.0
- symfony/web-profiler-bundle: ^5.4|^6.0
- symfony/webpack-encore-bundle: ^1.16
- vimeo/psalm: ^4|^5
Suggests
- nyholm/psr7: A library that implements PSR-7 HTTP client interface
- symfony/http-client: A Symfony component that implements PSR-18 HTTP client interface
This package is auto-updated.
Last update: 2024-10-27 15:32:29 UTC
README
Sylius Plugin adding hCaptcha integration
This plugin is adding hCaptcha to the following forms :
- Contact form
- Registration form
But an abstract class is available to add the captcha field to any other Form\Extension
Installation
composer require flux-se/sylius-hcaptcha-plugin symfony/http-client nyholm/psr7
Configuration
Enable this plugin :
<?php # config/bundles.php return [ // ... FluxSE\SyliusHCaptchaPlugin\FluxSESyliusHCaptchaPlugin::class => ['all' => true], // ... ];
This plugin is using the meteo-concept/hcaptcha-bundle
to handle the validation of the
hCaptcha, so a little configuration have to be made.
Add or modify the meteo-concept/hcaptcha-bundle
configuration :
# config/packages/meteo_concept_hcaptcha.yaml meteo_concept_h_captcha: hcaptcha: site_key: '%env(resolve:HCAPTCHA_SITE_KEY)%' secret: '%env(resolve:HCAPTCHA_SECRET)%' validation: 'strict'
Finally, add your site key and secret to your .env.local
file :
###> meteo-concept/hcaptcha-bundle ### HCAPTCHA_SITE_KEY=10000000-ffff-ffff-ffff-000000000001 HCAPTCHA_SECRET=0x0000000000000000000000000000000000000000 ###< meteo-concept/hcaptcha-bundle ###