Reputation: 31
NOTE: The doctrine:generate:entities command has been deprecated. To read more about the differences between anemic and rich models go her http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/tutorials/get ing-started.html#adding-behavior-to-entities. If you wish to generate your entities, use make:entity --regenerate from MakerBundle instead.
Upvotes: 0
Views: 3155
Reputation: 7881
I encountered this message in a Symfony 3.4 project.
The message is recommending that you use the Symfony Maker Bundle's make:entity
command instead of doctrine:generate:entities
.
Symfony Maker Bundle is compatible with Symfony 3.4, but not included.
Solution #1: ignore the message and continue using doctrine:generate:entities
since it's only generating code and that code won't stop working if you upgrade Symfony later and doctrine:generate:entities
is removed.
Solution #2: install Symfony Maker Bundle and use the suggested replacement command: composer require symfony/maker-bundle --dev
. ( I had to update doctrine/inflector
as well)
https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html
I would personally go with Solution #1 if you are indeed using Symfony 3.4. The maker bundle seems quite fussy about the location and structure if your entities and repositories and there are still a few bugs by the look of it.
The part about 'differences between anemic and rich models' appears to be a warning about the make command overwriting your getters and setters. If you have custom code in those you may loose it.
Upvotes: 1