Download the PHP package tomfun/recaptcha-bundle without Composer

On this page you can find all versions of the php package tomfun/recaptcha-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package recaptcha-bundle

EWZRecaptchaBundle

This bundle provides easy reCAPTCHA form field for Symfony.

Installation

Step 1: Using Composer (recommended)

To install EWZRecaptchaBundle with Composer just add the following to your composer.json file:

NOTE: Please replace dev-master in the snippet above with the latest stable branch, for example 2.0.*.

Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:

Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:

Step 1 (alternative): Using deps file (Symfony 2.0.x)

First, checkout a copy of the code. Just add the following to the deps file of your Symfony Standard Distribution:

NOTE: You can add version tag in the snippet above with the latest stable branch, for example version=origin/2.0.

Then register the bundle with your kernel:

Make sure that you also register the namespace with the autoloader:

Now use the vendors script to clone the newly added repositories into your project:

Step 1 (alternative): Using submodules (Symfony 2.0.x)

If you're managing your vendor libraries with submodules, first create the vendor/bundles/EWZ/Bundle directory:

Next, add the necessary submodule:

Step2: Configure the autoloader

Add the following entry to your autoloader:

Step3: Enable the bundle

Finally, enable the bundle in the kernel:

Step4: Configure the bundle's

Finally, add the following to your config file:

NOTE: If you use secure url for reCAPTCHA put true in secure (false is the default value).

You can easily disable reCAPTCHA (for example in a local or test environment):

Congratulations! You're ready!

Basic Usage

When creating a new form class add the following line to create the field:

You can pass extra options to reCAPTCHA with the "attr > options" option:

To validate the field use:

Another method would consist to pass the validation constraints as an options of your FormType. This way, your data class contains only meaningful properties. If we take the example from above, the buildForm method would look like this. Please note that if you set then the annotation will not work. You have to also set :

Cool, now you are ready to implement the form widget:

PHP:

Twig:

If you are not using a form, you can still implement the reCAPTCHA field using JavaScript:

PHP:

Twig:

Customization

If you want to use a custom theme, put your chunk of code before setting the theme:

Further reading: Customizing the Look and Feel of reCAPTCHA


All versions of recaptcha-bundle with dependencies

PHP Build Version
Package Version
Requires symfony/framework-bundle Version 2.*
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tomfun/recaptcha-bundle contains the following files

Loading the files please wait ....