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

Support object cloning for BSON classes

    • Type: Icon: New Feature New Feature
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.7.0
    • Affects Version/s: None
    • Component/s: None

      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.

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

              Created:
              Updated:
              Resolved: