Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require osm/easy-rest-bundle "~1"This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Then, enable the bundle by adding it to the list of registered bundles
in the app/AppKernel.php file of your project:
<?php
// app/AppKernel.php
// ...
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Osm\EasyRestBundle\OsmEasyRestBundle(),
);
// ...
}
// ...
}Enable the bundle's configuration in app/config/config.yml:
osm_easy_rest: ~
With default configuration, listeners and exception controller will be enabled. You can change this behaviour with following parameters:
osm_easy_rest:
enable_listeners: false
enable_exception_controller: true
enable_content_type_json: true