File tree Expand file tree Collapse file tree 4 files changed +4
-91
lines changed
Tests/DependencyInjection Expand file tree Collapse file tree 4 files changed +4
-91
lines changed Original file line number Diff line number Diff line change @@ -37,7 +37,11 @@ CHANGELOG
3737 * ` fos_rest.exception.exception_controller `
3838 * ` fos_rest.exception.exception_listener `
3939 * ` fos_rest.exception.service `
40+ * ` fos_rest.service.inflector `
4041 * ` fos_rest.service.router `
42+ * ` fos_rest.service.templating `
43+ * ` fos_rest.view.default_engine `
44+ * ` fos_rest.view.force_redirects `
4145 * ` fos_rest.view.templating_formats `
4246
4347* removed the following classes and interfaces:
Original file line number Diff line number Diff line change @@ -118,24 +118,8 @@ public function getConfigTreeBuilder(): TreeBuilder
118118 ->arrayNode ('service ' )
119119 ->addDefaultsIfNotSet ()
120120 ->children ()
121- ->scalarNode ('templating ' )
122- ->defaultNull ()
123- ->validate ()
124- ->ifString ()
125- ->thenInvalid ('only null is supported ' )
126- ->end ()
127- ->setDeprecated ('The "%path%.%node%" option is deprecated since FOSRestBundle 2.8. ' )
128- ->end ()
129121 ->scalarNode ('serializer ' )->defaultNull ()->end ()
130122 ->scalarNode ('view_handler ' )->defaultValue ('fos_rest.view_handler.default ' )->end ()
131- ->scalarNode ('inflector ' )
132- ->defaultNull ()
133- ->validate ()
134- ->ifString ()
135- ->thenInvalid ('only null is supported ' )
136- ->end ()
137- ->setDeprecated ('The "%path%.%node%" option is deprecated since FOSRestBundle 2.8. ' )
138- ->end ()
139123 ->scalarNode ('validator ' )->defaultValue ('validator ' )->end ()
140124 ->end ()
141125 ->end ()
@@ -196,24 +180,6 @@ private function addViewSection(ArrayNodeDefinition $rootNode): void
196180 ->fixXmlConfig ('force_redirect ' , 'force_redirects ' )
197181 ->addDefaultsIfNotSet ()
198182 ->children ()
199- ->scalarNode ('default_engine ' )
200- ->defaultNull ()
201- ->validate ()
202- ->ifString ()
203- ->thenInvalid ('only null is supported ' )
204- ->end ()
205- ->setDeprecated ('The "%path%.%node%" option has been deprecated in FOSRestBundle 2.8. ' )
206- ->end ()
207- ->arrayNode ('force_redirects ' )
208- ->setDeprecated ('The "%path%.%node%" option has been deprecated in FOSRestBundle 2.8. ' )
209- ->useAttributeAsKey ('name ' )
210- ->defaultValue ([])
211- ->validate ()
212- ->ifTrue (function ($ v ) { return [] !== $ v ; })
213- ->thenInvalid ('only the empty array is supported ' )
214- ->end ()
215- ->prototype ('boolean ' )->end ()
216- ->end ()
217183 ->arrayNode ('mime_types ' )
218184 ->canBeEnabled ()
219185 ->beforeNormalization ()
Original file line number Diff line number Diff line change @@ -215,50 +215,6 @@ public function incorrectExceptionCodeProvider()
215215 ];
216216 }
217217
218- public function testTemplatingServiceMustBeNull ()
219- {
220- $ this ->expectException (InvalidConfigurationException::class);
221- $ this ->expectExceptionMessage ('only null is supported ' );
222-
223- $ this ->processor ->processConfiguration ($ this ->configuration , [
224- [
225- 'service ' => [
226- 'templating ' => 'twig ' ,
227- ],
228- ],
229- ]);
230- }
231-
232- public function testDefaultEngineMustBeNull ()
233- {
234- $ this ->expectException (InvalidConfigurationException::class);
235- $ this ->expectExceptionMessage ('only null is supported ' );
236-
237- $ this ->processor ->processConfiguration ($ this ->configuration , [
238- [
239- 'view ' => [
240- 'default_engine ' => 'twig ' ,
241- ],
242- ],
243- ]);
244- }
245-
246- public function testForceRedirectsMustBeEmptyArray ()
247- {
248- $ this ->expectException (InvalidConfigurationException::class);
249- $ this ->expectExceptionMessage ('only the empty array is supported ' );
250-
251- $ this ->processor ->processConfiguration ($ this ->configuration , [
252- [
253- 'view ' => [
254- 'force_redirects ' => [
255- 'html ' => true ,
256- ],
257- ],
258- ],
259- ]);
260- }
261-
262218 /**
263219 * {@inheritdoc}
264220 */
Original file line number Diff line number Diff line change @@ -581,17 +581,4 @@ public function testRegisterSerializerErrorRenderer()
581581 $ this ->assertTrue ($ this ->container ->hasAlias ('error_renderer ' ));
582582 $ this ->assertSame ('fos_rest.error_renderer.serializer ' , (string ) $ this ->container ->getAlias ('error_renderer ' ));
583583 }
584-
585- public function testLegacyAliasesAreDeprecated ()
586- {
587- if (!method_exists (Alias::class, 'isDeprecated ' )) {
588- $ this ->markTestSkipped ();
589- }
590-
591- $ this ->extension ->load ([], $ this ->container );
592-
593- $ this ->assertTrue ($ this ->container ->getAlias ('fos_rest.inflector ' )->isDeprecated ());
594- $ this ->assertTrue ($ this ->container ->getAlias ('fos_rest.router ' )->isDeprecated ());
595- $ this ->assertTrue ($ this ->container ->getAlias ('fos_rest.templating ' )->isDeprecated ());
596- }
597584}
You can’t perform that action at this time.
0 commit comments