symfony/symfony — pull request #11558 by kerdany (2014-08-04 10:06:41+00:00)
Title: [DependencyInjection] fixed missing 'factory-class' attribute in XmlDumper output

Problem: XmlDumper doesn't write 'factory-class' XML attribute for definitions on which setFactoryClass() was called.

Impact: Container[Builder] to throws an exception when the relevant service is being requested/initiated after loading the dumped XML.
`Uncaught Exception Symfony\Component\DependencyInjection\Exception\RuntimeException: "Cannot create service "xxx" from factory method without a factory service or factory class." at ////DependencyInjection/ContainerBuilder.php`

Solution: Made XmlDumper write the 'factory-class' attribute, and updated the relevant test fixture.

Another related problem, is that XMLFileLoader doesn't complain if the 'factory-class' attribute is missing for a 'service' elements that include 'factory-method' attribute, resulting in an ill-configured Definition object in the ContainerBuilder. I'll post an issue/ticket, and probably send another PR for that.