doctrine/doctrine2 — pull request #880 by peetersdiet (2013-12-16 18:56:20+00:00)
Title: (v2.3.4) corrected inheritance when generating (updating) existing entities 

I have modified the EntityGenerator-class so the script to generate entities takes inheritance of existing entities into account when generating getters and setters. This will only affect existing entities, not newly created.

The command 'orm:generate-entities' (and related symfony2 command 'doctrine:generate:entities') will now generate properties and methods in existing entitities that will not clash with those higher in the inheritance-chain. This effectively fixes the errors like 'PHP Fatal error: Access level to ... must be (protected|private|public) ...' after running the generate-entities command.

Basic rules added for updating existing entities if a property|method is found higher up the hierarchy:
- when private higher up it will be copied into the child-entity,
- when protected or public higher up it will be skipped

I have tested this with the command 'doctrine:generate:entities' on Symfony 2.3 with doctrine/orm v2.3.4. .