From a6526cc1434e24d392dc243c532b9ca86b6e3746 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 4 Jun 2015 21:22:57 +0200 Subject: [PATCH 1/2] use the ref role to reference internal resources --- Resources/doc/format_listener.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Resources/doc/format_listener.rst b/Resources/doc/format_listener.rst index 70d2fc9dd..f9fe34152 100644 --- a/Resources/doc/format_listener.rst +++ b/Resources/doc/format_listener.rst @@ -106,6 +106,8 @@ format will remain unchanged. - { path: '^/api', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: false } - { path: '^/', stop: true } # Available for version >= 1.5 +.. _media-type-version-extraction: + Media Type Version Extraction ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -140,7 +142,7 @@ To make the version mechanism working : view: mime_types: json: ['application/json', 'application/json;version=1.0', 'application/json;version=1.1'] - + 3 - You should have tagged your entities with version information (@Since, @Until ...) See `this JMS Serializer article`_ for details about versioning objects. @@ -157,7 +159,7 @@ If you have to verify if the version is correctly catched you can use something print $this->container->get('fos_rest.version_listener')->getVersion(); } -Note that this version mechanism is configurable by your own by changing the regular expression in the `media type version regex configuration`_. +Note that this version mechanism is configurable by your own by changing the regular expression in the +:ref:`media type version regex configuration `. -.. _`media type version regex configuration`: http://symfony.com/doc/master/bundles/FOSRestBundle/format_listener.html#media-type-version-extraction .. _`mime type listener`: http://symfony.com/doc/current/cookbook/request/mime_type.html From 81966a05ea92c87d21604a38ba867ebefa439802 Mon Sep 17 00:00:00 2001 From: Lukas Kahwe Smith Date: Wed, 10 Jun 2015 19:14:01 +0200 Subject: [PATCH 2/2] typo fix --- DependencyInjection/FOSRestExtension.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DependencyInjection/FOSRestExtension.php b/DependencyInjection/FOSRestExtension.php index d9d004a93..9b508b8bd 100644 --- a/DependencyInjection/FOSRestExtension.php +++ b/DependencyInjection/FOSRestExtension.php @@ -99,7 +99,7 @@ private function loadAccessDeniedListener(array $config, XmlFileLoader $loader, $loader->load('access_denied_listener.xml'); if (!empty($config['access_denied_listener']['service'])) { - $service = $container->getDefinition('fos_rest.allowed_methods_listener'); + $service = $container->getDefinition('fos_rest.access_denied_listener'); $service->clearTag('kernel.event_listener'); }