flux-se / sylius-hcaptcha-plugin
Plugin adding the hCaptcha field to some frontend FormType of Sylius
Installs: 3 085
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 0
Open Issues: 0
Type:sylius-plugin
Requires
- meteo-concept/hcaptcha-bundle: ^3|^4
- sylius/shop-bundle: ^2.0
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.4
- phpstan/phpstan: ^1.12
- phpstan/phpstan-doctrine: ^1.5
- phpstan/phpstan-symfony: ^1.4
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^10
- polishsymfonycommunity/symfony-mocker-container: ^1.0
- robertfausk/behat-panther-extension: ^1.1
- sylius-labs/coding-standard: ^4.0
- sylius/sylius: ^2.0
- symfony/browser-kit: ^6.4 || ^7.1
- symfony/debug-bundle: ^6.4 || ^7.1
- symfony/dotenv: ^6.4 || ^7.1
- symfony/http-client: ^6.4 || ^7.1
- symfony/intl: ^6.4 || ^7.1
- symfony/runtime: ^6.4 || ^7.1
- symfony/web-profiler-bundle: ^6.4 || ^7.1
- symfony/webpack-encore-bundle: ^2.2
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-12-20 22:20: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], // ... ];
Import global configuration, by creating a new file config/packages/fluxse_sylius_hcaptcha.yaml
:
imports: - { resource: "@FluxSESyliusHCaptchaPlugin/config/config.yaml" }
Meteo Concept hCaptcha Bundle configuration
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 ###