-2

When I run bin/console make:entity in Symfony v6.4.6 it no longer makes add and remove methods in the new ServiceEntityRepository. All of my previously generated repositories have those methods, and I'm not seeing any guidance about why this is different now.

Is there a new best practice?

I couldn't find any documentation about this change so far.

1
  • The real question is why were they added in the first place. The developer in charge of the Doctrine maker stuff is not super good at communicating and just does stuff. You can try checking the github issues or the Symfony github support. Who knows. The methods might just get added back.
    – Cerad
    Commented May 20 at 13:45

1 Answer 1

1

The reason is based on this issue : https://github.com/symfony/maker-bundle/issues/1327

That led to this PR : https://github.com/symfony/maker-bundle/pull/1328

1
  • Thank you. I'm unable to edit this answer. If you could block quote the "Flush should be done..." sentence from the issue page, I will accept! Commented May 21 at 13:56

Not the answer you're looking for? Browse other questions tagged or ask your own question.