Skip to content

Commit

Permalink
minor #2185 clean up legacy config options (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 3.0-dev branch.

Discussion
----------

clean up legacy config options

Commits
-------

9cd3fd0 clean up legacy config options
  • Loading branch information
xabbuh committed May 7, 2020
2 parents dbe76a0 + 9cd3fd0 commit 67756de
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 92 deletions.
45 changes: 2 additions & 43 deletions Tests/DependencyInjection/FOSRestExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,6 @@ public function testResponseStatusCodeListenerEnabled()
'exception' => [
'map_exception_codes' => true,
],
'routing_loader' => false,
'service' => [
'templating' => null,
],
'view' => [
'default_engine' => null,
'force_redirects' => [],
],
],
], $this->container);

Expand All @@ -452,17 +444,7 @@ public function testResponseStatusCodeListenerEnabled()
public function testExceptionListenerDisabled()
{
$extension = new FOSRestExtension();
$extension->load([
[
'service' => [
'templating' => null,
],
'view' => [
'default_engine' => null,
'force_redirects' => [],
],
],
], $this->container);
$extension->load([], $this->container);

$this->assertFalse($this->container->hasDefinition('fos_rest.fos_rest.error_listener'));
}
Expand Down Expand Up @@ -595,20 +577,7 @@ public function testMimeTypesArePassedArrays()
public function testSerializerErrorRendererNotRegisteredByDefault()
{
$config = array(
'fos_rest' => array(
'exception' => [
'exception_listener' => false,
'serialize_exceptions' => false,
],
'routing_loader' => false,
'service' => [
'templating' => null,
],
'view' => [
'default_engine' => null,
'force_redirects' => [],
],
),
'fos_rest' => array(),
);
$this->extension->load($config, $this->container);

Expand All @@ -625,18 +594,8 @@ public function testRegisterSerializerErrorRenderer()
$config = array(
'fos_rest' => array(
'exception' => [
'exception_listener' => false,
'serialize_exceptions' => false,
'serializer_error_renderer' => true,
],
'routing_loader' => false,
'service' => [
'templating' => null,
],
'view' => [
'default_engine' => null,
'force_redirects' => [],
],
),
);
$this->extension->load($config, $this->container);
Expand Down
9 changes: 0 additions & 9 deletions Tests/Functional/app/AccessDeniedListener/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,5 @@ framework:
fos_rest:
access_denied_listener:
json: true
exception:
exception_listener: false
serialize_exceptions: false
routing_loader: false
service:
templating: null
view:
default_engine: null
force_redirects: []
zone:
- { path: ^/api/* }
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,3 @@ fos_rest:
exception:
flatten_exception_format: 'legacy'
serializer_error_renderer: true
routing_loader: false
service:
templating: ~
view:
default_engine: ~
force_redirects: []
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,3 @@ fos_rest:
exception:
flatten_exception_format: 'rfc7807'
serializer_error_renderer: true
routing_loader: false
service:
templating: ~
view:
default_engine: ~
force_redirects: []
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ framework:
fos_rest:
exception:
flatten_exception_format: 'legacy'
routing_loader: false
service:
templating: ~
view:
default_engine: ~
force_redirects: []
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ fos_rest:
exception:
debug: true
flatten_exception_format: 'legacy'
routing_loader: false
service:
templating: ~
view:
default_engine: ~
force_redirects: []
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ framework:
fos_rest:
exception:
flatten_exception_format: 'rfc7807'
routing_loader: false
service:
templating: ~
view:
default_engine: ~
force_redirects: []
5 changes: 0 additions & 5 deletions Tests/Functional/app/FormErrorHandler/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,5 @@ imports:
- { resource: ../config/exception_listener.yml }

fos_rest:
routing_loader: false
service:
templating: ~
view:
default_engine: ~
force_redirects: []
view_response_listener: 'force'
5 changes: 0 additions & 5 deletions Tests/Functional/app/FormErrorNormalizer/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,5 @@ framework:
enabled: true

fos_rest:
routing_loader: false
service:
templating: ~
view:
default_engine: ~
force_redirects: []
view_response_listener: 'force'

0 comments on commit 67756de

Please sign in to comment.