massmedia / files_finder_bundle
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.3.9
- friendsofsymfony/rest-bundle: ^1.7
- jms/serializer-bundle: ^1.1
- nelmio/api-doc-bundle: ^2.4
- sensio/framework-extra-bundle: ^3.0.2
- symfony/console: ~2.1|~3.0
- symfony/framework-bundle: ~2.3|~3.0
- symfony/monolog-bundle: ~2.4
- willdurand/rest-extra-bundle: ^1.0
This package is not auto-updated.
Last update: 2024-11-09 20:06:12 UTC
README
Installation
Step 1: Download the Bundle
Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:
$ composer require massmedia/files_finder_bundle
This command requires you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.
Step 2: Enable the Bundle
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 JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\RestBundle\FOSRestBundle(),
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
new Massmedia\FilesFinderBundle\FilesFinderBundle(),
new Bazinga\Bundle\RestExtraBundle\BazingaRestExtraBundle(),
);
// ...
}
// ...
}
Step 2: Configure
Routes file:
# app/config/routing.yml
NelmioApiDocBundle:
resource: "@NelmioApiDocBundle/Resources/config/routing.yml"
prefix: /api/doc
Configure rest:
# app/config/config.yml
fos_rest:
param_fetcher_listener: true
body_listener: true
view:
view_response_listener: 'force'
format_listener:
rules:
- { path: ^/api, priorities: [ json ], fallback_format: json, prefer_extension: true }
- { path: '^/', priorities: [ 'html', '*/*'], fallback_format: ~, prefer_extension: true }