schmittjoh / JMSSerializerBundle

Easily serialize, and deserialize data of any complexity (supports XML, JSON, YAML)
http://jmsyst.com/bundles/JMSSerializerBundle
MIT License
1.8k stars 311 forks source link

JMSSerializerBundle does not work #865

Closed ghost closed 9 months ago

ghost commented 3 years ago
Q A
Bug report? yes/no
Feature request? yes/no
BC Break report? yes/no
RFC? yes/no

The documentation (https://jmsyst.com/bundles/JMSSerializerBundle) tells first how to install the bundle.

We have the first problem there, since there is no "AppKernel::registerBundles()" function in AppKernel.

Then, in usage, things get worse:

"The configured serializer is available as jms_serializer service:

$serializer = $container->get('jms_serializer'); $serializer->serialize($data, $format); $data = $serializer->deserialize($inputStr, $typeName, $format);"

Running this code gives "Notice: Undefined variable: container". Of course, because you did not abide by PHP's basic rules: a variable must be defined before it is used. There is no variable called "$container", so how would that usage example possibly work?

mvhirsch commented 9 months ago

Looks like an unknown usage of Symfony(?) if any. Since user got already deleted, there is no chance to help him/her anymore.

@goetas I think this can be closed.