Browse Source

reverted some of the configuration changes

The object constructor can easily configured inside the config.yml
itself, and is more flexible than allowing to specify an id in the
semantic configuration. An example for YML can look like this:

```yml
services:
    jms_serializer.object_constructor:
        alias: jms_serializer.doctrine_object_constructor
        public: false
```
Johannes M. Schmitt 12 years ago
parent
commit
94d52c9553

+ 0 - 7
DependencyInjection/Configuration.php

@@ -46,7 +46,6 @@ class Configuration implements ConfigurationInterface
                 ->children()
         ;
 
-        $this->addConstructorSection($root);
         $this->addSerializersSection($root);
         $this->addMetadataSection($root);
         $this->addVisitorsSection($root);
@@ -54,12 +53,6 @@ class Configuration implements ConfigurationInterface
         return $tb;
     }
 
-    private function addConstructorSection(NodeBuilder $builder)
-    {
-        $builder
-            ->scalarNode('constructor')->defaultNull()->end();
-    }
-
     private function addSerializersSection(NodeBuilder $builder)
     {
         $builder

+ 0 - 5
DependencyInjection/JMSSerializerExtension.php

@@ -41,11 +41,6 @@ class JMSSerializerExtension extends ConfigurableExtension
                         __DIR__.'/../Resources/config/')));
         $loader->load('services.xml');
 
-        // constructor
-        if ($config['constructor']) {
-            $container->setAlias('jms_serializer.object_constructor', $config['constructor']);
-        }
-
         // add factories as resource
         foreach ($this->factories as $factory) {
             $container->addObjectResource($factory);