Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
cdbe566acc | |||
93f9d3c1a7 | |||
d4475118d0 | |||
b8a129fc2a | |||
fe4b0dea2b | |||
640acadeea |
30
README.md
30
README.md
@ -11,11 +11,11 @@ It uses [gregwar/captcha](https://github.com/Gregwar/Captcha) as captcha generat
|
|||||||
Compatibility with Symfony
|
Compatibility with Symfony
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
| CaptchaBundle | Symfony | PHP |
|
| CaptchaBundle | Symfony | PHP |
|
||||||
|:---------------:|:---------:|:-------:|
|
|:---------------:|:---------:|:--------:|
|
||||||
| 3.* | 4.* - 5.* | 7.1 > |
|
| 2.1.* | 4.* - 5.* | >= 7.1 |
|
||||||
| 2.* | 2.8 - 3.* | 5.3.9 > |
|
| 2.0.* | 2.8 - 3.* | >= 5.3.9 |
|
||||||
| 1.* | 2.1 - 2.7 | 5.3.0 > |
|
| 1.* | 2.1 - 2.7 | >= 5.3.0 |
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
@ -24,20 +24,30 @@ Installation
|
|||||||
### Step 1: Download the GregwarCaptchaBundle
|
### Step 1: Download the GregwarCaptchaBundle
|
||||||
|
|
||||||
Use composer require to download and install the package.
|
Use composer require to download and install the package.
|
||||||
At the end of the installation you can automaticly create the configuration thanks to the Symfony recipe.
|
At the end of the installation, the bundle is automatically registered thanks to the Symfony recipe.
|
||||||
|
|
||||||
``` bash
|
``` bash
|
||||||
composer require gregwar/captcha-bundle
|
composer require gregwar/captcha-bundle
|
||||||
```
|
```
|
||||||
|
|
||||||
|
If you don't use flex, register it manually:
|
||||||
|
```php
|
||||||
|
<?php
|
||||||
|
// config/bundles.php
|
||||||
|
return [
|
||||||
|
// ...
|
||||||
|
Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true]
|
||||||
|
];
|
||||||
|
```
|
||||||
|
|
||||||
Configuration
|
Configuration
|
||||||
=============
|
=============
|
||||||
|
|
||||||
If you made the configuration automaticly trough the Symfony recipe, you should have the following config file `/config/packages/gregwar_captcha.yaml`
|
If you need to customize the global bundle configuration, you can create a `/config/packages/gregwar_captcha.yaml` file with your configuration:
|
||||||
|
|
||||||
Otherwise you can create it manually `/config/packages/gregwar_captcha.yaml` with the following default configuration:
|
|
||||||
``` yaml
|
``` yaml
|
||||||
gregwar_captcha: ~
|
gregwar_captcha:
|
||||||
|
width: 160
|
||||||
|
height: 50
|
||||||
```
|
```
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
@ -7,6 +7,10 @@ parameters:
|
|||||||
gregwar_captcha.phrase_builder.class: Gregwar\Captcha\PhraseBuilder
|
gregwar_captcha.phrase_builder.class: Gregwar\Captcha\PhraseBuilder
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
Gregwar\CaptchaBundle\Controller\CaptchaController:
|
||||||
|
public: true
|
||||||
|
alias: 'gregwar_captcha.controller'
|
||||||
|
|
||||||
gregwar_captcha.controller:
|
gregwar_captcha.controller:
|
||||||
class: '%gregwar_captcha.controller.class%'
|
class: '%gregwar_captcha.controller.class%'
|
||||||
public: true
|
public: true
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "gregwar/captcha-bundle",
|
"name": "gregwar/captcha-bundle",
|
||||||
"type": "captcha-bundle",
|
"type": "symfony-bundle",
|
||||||
"description": "Captcha bundle",
|
"description": "Captcha bundle",
|
||||||
"keywords": ["symfony2", "symfony", "captcha", "bot", "visual", "code", "security", "spam"],
|
"keywords": ["symfony2", "symfony", "captcha", "bot", "visual", "code", "security", "spam"],
|
||||||
"homepage": "https://github.com/Gregwar/CaptchaBundle",
|
"homepage": "https://github.com/Gregwar/CaptchaBundle",
|
||||||
|
Reference in New Issue
Block a user