Symfony-docs: Update docs for latest Doctrine removals

Created on 6 Mar 2018  路  7Comments  路  Source: symfony/symfony-docs

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:

Changes already included in Doctrine 2.x

(we can already make these changes in Symfony Docs)

  • [x] Removed support for named queries: https://github.com/doctrine/doctrine2/commit/e6557cbee3c318090c7993944c8aa5b56fa17c82
  • [x] Removed EntityManager::copy: https://github.com/doctrine/doctrine2/commit/c4eb2b016d7beb5ec5ede2bfa1971752a4a3f35b
  • [x] Removed reverse engineering (convert:mapping) and entity generation (generate:entity): https://github.com/doctrine/doctrine2/commit/e4ce75a8dc775f9b7414668b1fac2759d661992f
  • Changes planned for the upcoming Doctrine 3.x

    (please don't make any of these changes until Doctrine 3 is released)

    Doctrine

    Most helpful comment

    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.

    All 7 comments

    Some 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)
    • named queries are a very advanced feature of Doctrine (for which I never found a use case btw), and I don't think we document it either.

    @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!

    Was this page helpful?
    0 / 5 - 0 ratings

    Related issues

    anush picture anush  路  5Comments

    steevanb picture steevanb  路  4Comments

    javiereguiluz picture javiereguiluz  路  5Comments

    Kwadz picture Kwadz  路  3Comments

    dannyvw picture dannyvw  路  3Comments