DDC-3690: PersistentCollection uses private property #4533

Closed
opened 2026-01-22 14:44:15 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Apr 14, 2015).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user roelvd:

  1. PersistentCollection in Doctrine 2.5 makes uses of the $initialized property defined in the AbstractLazyCollection of doctrine\collection (https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/PersistentCollection.php#L113)
  2. Doctrine 2.5 depends on version ~1.2 of doctrine\collection that marks the $initialized property as private https://github.com/doctrine/collections/blob/v1.2/lib/Doctrine/Common/Collections/AbstractLazyCollection.php
  3. Hence writing to the initialized variable fails. And thus code related to initialization fails.

A fix is already applied to doctrine\orm e2eef46293 but is not tagged. Possible fix would be to release a new version of doctrine\collection as 1.2.1.

Originally created by @doctrinebot on GitHub (Apr 14, 2015). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user roelvd: 1. PersistentCollection in Doctrine 2.5 makes uses of the $initialized property defined in the AbstractLazyCollection of doctrine\collection (https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/PersistentCollection.php#L113) 2. Doctrine 2.5 depends on version ~1.2 of doctrine\collection that marks the $initialized property as private https://github.com/doctrine/collections/blob/v1.2/lib/Doctrine/Common/Collections/AbstractLazyCollection.php 3. Hence writing to the initialized variable fails. And thus code related to initialization fails. A fix is already applied to doctrine\orm https://github.com/doctrine/collections/commit/e2eef4629349fd847c8e080b8f729ab33e81e10f but is not tagged. Possible fix would be to release a new version of doctrine\collection as 1.2.1.
admin added the Bug label 2026-01-22 14:44:15 +01:00
admin closed this issue 2026-01-22 14:44:16 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 14, 2015):

Comment created by roelvd:

Due to this several tests fail in our code-base.

@doctrinebot commented on GitHub (Apr 14, 2015): Comment created by roelvd: Due to this several tests fail in our code-base.
Author
Owner

@doctrinebot commented on GitHub (Apr 14, 2015):

Comment created by @ocramius:

This is a bug caused by the fact that ORM 2.5 should depend on Collections 1.3.0 - I'll look into it ASAP.

@doctrinebot commented on GitHub (Apr 14, 2015): Comment created by @ocramius: This is a bug caused by the fact that ORM 2.5 should depend on Collections 1.3.0 - I'll look into it ASAP.
Author
Owner

@doctrinebot commented on GitHub (Apr 15, 2015):

Comment created by @ocramius:

Collections 1.3.0 was released, but I'll keep this open until ORM 2.5.1 is out.

@doctrinebot commented on GitHub (Apr 15, 2015): Comment created by @ocramius: Collections 1.3.0 was released, but I'll keep this open until ORM 2.5.1 is out.
Author
Owner

@doctrinebot commented on GitHub (Jun 16, 2015):

Comment created by @beberlei:

I pushed v1.2.1 with changing $initialized to protected already.

@doctrinebot commented on GitHub (Jun 16, 2015): Comment created by @beberlei: I pushed v1.2.1 with changing $initialized to protected already.
Author
Owner

@doctrinebot commented on GitHub (Jun 16, 2015):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Jun 16, 2015): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4533