Skip to content

Commit 2554a05

Browse files
committed
Merge branch '2.x'
* 2.x: clean up the readme file Improve deprecations DX
2 parents 11dae50 + cc53e99 commit 2554a05

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

DependencyInjection/Configuration.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,23 @@ private function addExceptionSection(ArrayNodeDefinition $rootNode): void
372372
->fixXmlConfig('message', 'messages')
373373
->addDefaultsIfNotSet()
374374
->canBeEnabled()
375+
->validate()
376+
->always()
377+
->then(function ($v) {
378+
if (!$v['enabled']) {
379+
return $v;
380+
}
381+
382+
if ($v['exception_listener']) {
383+
@trigger_error('Enabling the "fos_rest.exception.exception_listener" option is deprecated since FOSRestBundle 2.8.', E_USER_DEPRECATED);
384+
}
385+
if ($v['serialize_exceptions']) {
386+
@trigger_error('Enabling the "fos_rest.exception.serialize_exceptions" option is deprecated since FOSRestBundle 2.8.', E_USER_DEPRECATED);
387+
}
388+
389+
return $v;
390+
})
391+
->end()
375392
->children()
376393
->booleanNode('map_exception_codes')
377394
->defaultFalse()

README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ This bundle provides various tools to rapidly develop RESTful API's &
55
applications with Symfony. Features include:
66

77
- A View layer to enable output and format agnostic Controllers
8-
- A custom route loader to generate url's following REST conventions
98
- Accept header format negotiation including handling for custom mime types
109
- RESTful decoding of HTTP request body and Accept headers
11-
- Exception controller for sending appropriate HTTP status codes
10+
- Map exception codes to HTTP response status codes
11+
- A serializer error renderer that returns exceptions and errors in a format
12+
compatible with RFC 7807 using the Symfony Serializer component or the
13+
JMS Serializer
1214

1315
[![Build Status](https://travis-ci.org/FriendsOfSymfony/FOSRestBundle.svg?branch=master)](https://travis-ci.org/FriendsOfSymfony/FOSRestBundle)
1416
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSRestBundle/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/FriendsOfSymfony/FOSRestBundle/?branch=master)
@@ -17,18 +19,12 @@ applications with Symfony. Features include:
1719
[![Latest Stable Version](https://poser.pugx.org/FriendsOfSymfony/rest-bundle/v/stable.svg)](https://packagist.org/packages/FriendsOfSymfony/rest-bundle)
1820
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/0be23389-2e85-49cf-b333-caaa36d11c62/mini.png)](https://insight.sensiolabs.com/projects/0be23389-2e85-49cf-b333-caaa36d11c62)
1921

20-
Note
21-
----
22-
23-
FOSRestBundle 1.x is no longer maintained, 1.8 only receives security fixes. Please upgrade to FOSRestBundle 2.x as soon as possible.
24-
2522
Documentation
2623
-------------
2724

2825
[Read the Documentation](http://symfony.com/doc/master/bundles/FOSRestBundle/index.html)
2926

30-
Please see the [UPGRADING-3.0.md](https://github.com/FriendsOfSymfony/FOSRestBundle/blob/master/UPGRADING-3.0.md) for any
31-
relevant instructions when upgrading to a newer version.
27+
Please see the upgrade files (`UPGRADING-X.X.md`) for any relevant instructions when upgrading to a newer version.
3228

3329
Installation
3430
------------

0 commit comments

Comments
 (0)