[DCOM-21] Bug with annotations parser and tags that are not annotations (stripped tags) Created: 18/Aug/10  Updated: 18/Aug/10  Resolved: 18/Aug/10

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.0.0-BETA4
Fix Version/s: 2.0.0-RC1

Type: Bug Priority: Major
Reporter: Jonathan H. Wage Assignee: Roman S. Borschel
Resolution: Fixed Votes: 0
Labels: None


 Comments   
Comment by Jonathan H. Wage [ 18/Aug/10 ]

Fixed in http://github.com/doctrine/common/commit/df50f65ee707bb148682232c516d5168cf46d987





[DCOM-18] ArrayCollection::removeElement() violates Interface Contract Created: 09/Aug/10  Updated: 09/Aug/10  Resolved: 09/Aug/10

Status: Resolved
Project: Doctrine Common
Component/s: Collections
Affects Version/s: 2.0.0-BETA4
Fix Version/s: 2.0.0-RC1

Type: Bug Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

It return the element, not true.



 Comments   
Comment by Benjamin Eberlei [ 09/Aug/10 ]

Fixed





[DCOM-17] Add Collection::slice($offset, $length) Created: 08/Aug/10  Updated: 14/Jan/11  Resolved: 24/Aug/10

Status: Resolved
Project: Doctrine Common
Component/s: Collections
Affects Version/s: 2.0.0-BETA4
Fix Version/s: 2.0.0-RC1

Type: Improvement Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

Since we are still at a point were bc breaks are potentially not so harming:

We need a slice() method on the Collection for forward compatibility, the support for large and very large collections using FETCH_EXTRA would heavily benefit from a method like this.

/**
 * Extract a slice of $length elements starting at position $offset from the Collection.
 * 
 * If $length is null it returns all elements from $offset to the end of the Collection.
 * Keys have to be preserved by this method.
 * 
 * @param int $offset
 * @param int $length
 * @return array
 */
public function slice($offset, $length = null);

The ArrayCollection implement would be:

public function slice($offset, $length = null);
{
    return array_slice($this->_elements, $offset, $length, true); // preserve keys
}


 Comments   
Comment by Benjamin Eberlei [ 08/Aug/10 ]

Updated preserve paragraph

Comment by Benjamin Eberlei [ 24/Aug/10 ]

Implemented

Comment by Jan Pieper [ 14/Jan/11 ]

Is there any reason why slice() returns an array although methods like filter() and map() return an instance of Doctrine\Common\Collections\ArrayCollection?





[DCOM-6] Non existant namespace alias throws a PHP Notice Created: 27/May/10  Updated: 01/Sep/10  Resolved: 01/Sep/10

Status: Resolved
Project: Doctrine Common
Component/s: None
Affects Version/s: 2.0.0-BETA2
Fix Version/s: 2.0.0-RC1

Type: Bug Priority: Major
Reporter: Tim Nagel Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

@nonalias:Annot results in a php notice.



 Comments   
Comment by Tim Nagel [ 27/May/10 ]

Proposed tests and fix

http://github.com/merk/common/commit/65e8c10b74201c39dbe291c36230205d9b08ed65

Comment by Guilherme Blanco [ 31/Aug/10 ]

In commit: http://github.com/doctrine/common/commit/ad49a676269af368563bd9a848c904b81a825622

I fixed this issue.
The validation on unexistent classes cannot be done correctly, otherwise it'd conflict with phpDoc tags.

Comment by Tim Nagel [ 31/Aug/10 ]

What will your change do if there are multiple implementations of the Reader working on entities that dont have common namespaces, but still use namespaces?

Would it not make more sense to skip something that the Reader doesnt understand, rather than throwing an error?

(For example, Symfony2's validator system might have namespaced validators, which would then cause the 'Doctrine' reader to throw an exception)

Comment by Guilherme Blanco [ 01/Sep/10 ]

Yes, you're right...

I think we'll have to silently bypass unknown aliases... this makes debug harder, but we don't have any other option. =(

Reopening it

Comment by Benjamin Eberlei [ 01/Sep/10 ]

Fixed to skip the unknown alias annotation.





Generated at Sun Oct 26 05:13:28 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.