Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-415

Introduce UnitOfWork Stages and throw exceptions for wrong method uses

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0-ALPHA4
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      Currently the event architecture is fragile when used wrong. I already see lots of "bug reports" popping up on this issue due to people dont understanding what is doable and what is not.

      How about we introduce an instance variable stage into the UnitOfWork and introduce an assertIsInStages($stages) protected method which is called ineach major command method of the UnitOfWork to verify its applied correctly?

      Stages could be:

      UNFLUSHED
      PRE_COMPUTE_CHANGESETS
      POST_COMPUTE_CHANGESETS
      FLUSH_LOOP
      TRANSACTION_COMPLETED

        Activity

        Benjamin Eberlei created issue -
        Roman S. Borschel made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Benjamin Eberlei made changes -
        Workflow jira [ 11039 ] jira-feedback [ 13844 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback [ 13844 ] jira-feedback2 [ 15708 ]
        Benjamin Eberlei made changes -
        Workflow jira-feedback2 [ 15708 ] jira-feedback3 [ 17965 ]

          People

          • Assignee:
            Roman S. Borschel
            Reporter:
            Benjamin Eberlei
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: