Uploaded image for project: 'PHP Driver: Extension'
  1. PHP Driver: Extension
  2. PHPC-1230

Support object cloning for BSON classes

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Labels:

      Description

      PHPLIB-190 implemented __clone() handlers for the BSONArray and BSONDocument classes in PHPLIB 1.4.0; however, it looks like the BSON classes in the driver were never clone-able. This can lead to "Trying to clone an uncloneable object of class %s" when attempting to clone BSONArray and BSONDocument objects that contain the driver's BSON objects.

      This should be a relatively straightforward task, since only Javascript contains a non-scalar property. Even then, the internal properties of each BSON class are immutable, so a deep copy may not be required there; however, we should test Javascript scopes thoroughly.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              andreas.braun Andreas Braun
              Reporter:
              jmikola Jeremy Mikola
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: