Please follow the steps given here to install this bundle.
To install APYJsFormValidationBundle with Composer just add the following to your composer.json file:
// composer.json
{
// ...
require: {
// ...
"apy/jsfv-bundle":"dev-master"
}
}
Note: dev-master version of this bundle is compatible only with symfony 2.1.x. Please use the deps file if you install this bundle for Symfony 2.0.x.
Then, you can install the new dependencies by running Composer's update command from the directory where your composer.json file is located:
php composer.phar updateNow, Composer will automatically download all required files, and install them for you. Let's go to step 3.
Ultimately, the JsFormValidationBundle files should be downloaded to the
vendor/bundles/APY/JsFormValidationBundle directory.
This can be done in several ways, depending on your preference. The first method is the standard Symfony2 method.
Using the vendors script
Add the following lines in your deps file:
[JsFormValidationBundle]
git=git://github.com/Abhoryo/APYJsFormValidationBundle.git
target=bundles/APY/JsFormValidationBundle
version=2.0
Now, run the vendors script to download the bundle:
$ php bin/vendors installUsing submodules
If you prefer instead to use git submodules, the run the following:
$ git submodule add git://github.com/Abhoryo/APYJsFormValidationBundle.git vendor/bundles/APY/JsFormValidationBundle
$ git submodule update --initConfigure the Autoloader
Add the APY namespace to your autoloader:
<?php
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'APY' => __DIR__.'/../vendor/bundles',
));Enable the bundles in the kernel:
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
// ...
new APY\JsFormValidationBundle\APYJsFormValidationBundle(),
);
}Finally, register the routing in app/config/routing.yml:
# app/config/routing.yml
_apy_jsformvalidation:
resource: "@APYJsFormValidationBundle/Resources/config/routing/routing.yml"