Latest Doctrine versions are removing features that we use on Symfony Docs. We should double check everything, remove no longer relevant docs and provide alternatives when possible:
(we can already make these changes in Symfony Docs)
App:User no longer works, use User::class or App\Entity\User: https://github.com/doctrine/doctrine2/commit/63cb8018dd1a889be4e08a31fad1e76f4cc876d0::class in annotations: https://github.com/doctrine/doctrine2/commit/cd590f2f3309d15c680079076838a55ecd30dab1diff
/**
<ul>
<li>@ORM\ManyToOne(targetEntity="NotifyChangedEntity", inversedBy="items") */</li>
<li>@ORM\ManyToOne(targetEntity=NotifyChangedEntity::class, inversedBy="items")<br />
*/<br />
EntityManager::copy: https://github.com/doctrine/doctrine2/commit/c4eb2b016d7beb5ec5ede2bfa1971752a4a3f35bconvert:mapping) and entity generation (generate:entity): https://github.com/doctrine/doctrine2/commit/e4ce75a8dc775f9b7414668b1fac2759d661992f(please don't make any of these changes until Doctrine 3 is released)
EntityManager::detach: https://github.com/doctrine/doctrine2/commit/df397e1d685b22aa11942a7f55ba18cd16abd9f0PDO::PARAM_*, PDO::FETCH_*, PDO::CASE_* and PDO::PARAM_INPUT_OUTPUT constants in the DBAL API is removed. \Doctrine\DBAL\Driver\PDOStatement does not extend \PDOStatement anymore: https://github.com/doctrine/dbal/pull/2958Some explanation about the entity code generator removal can be found here https://github.com/doctrine/doctrine2/issues/6418
Part of these updates can be done already (for instance, using ::class in annotation works in Doctrine 2.x already). But some of these are related to BC breaks in the future Doctrine 3, which has no ETA yet (and so working on the update right now is not worth it)
btw, I'm quite sure some of these changes won't impact the Symfony doc:
EntityManager::copy was never implemented in Doctrine, so it is probably not documented anywhere in Symfony (and should be removed immediately if it is)@stof thanks for the details. I've updated the description to separate the issues between "doable now" and "wait for Doctrine 3". If there's any error, please edit the description. Thanks!
EntityManager::copy is doable now. It is removed from 3.x, but it never worked in 2.x (see the removed implementation: throw new \BadMethodCallException("Not implemented.");). But I don't think we have any doc using it, because of that (so probably nothing to do).
regarding the mapping conversion and the entity generation, I think we should already work today on removing them from the Symfony documentation. The Doctrine team discourages their usage since years, so we should not push for it.
Here's a list of everything removed in DBAL 3.0: https://github.com/doctrine/dbal/pull/3518
I'm closing this one as fixed because I've verified that we no longer use features removed in 2.x. For the future 3.x, we'll take care of that when it's released. Thanks!
Most helpful comment
EntityManager::copyis doable now. It is removed from 3.x, but it never worked in 2.x (see the removed implementation:throw new \BadMethodCallException("Not implemented.");). But I don't think we have any doc using it, because of that (so probably nothing to do).regarding the mapping conversion and the entity generation, I think we should already work today on removing them from the Symfony documentation. The Doctrine team discourages their usage since years, so we should not push for it.