mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2303: @param wrong in Doctrine\ORM\PersistentCollection::__constructor Edit #2893
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Feb 18, 2013).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user datkind:
When i try to generate a new PersistentCollection like this:
i get an typ hinting error like
"Expected array, got "Doctrine\Common\Collections\ArrayCollection"
This could be fixed by changing the type hinting for the Doctrine\ORM\PersistentCollection::*constructor
*From:
To:
@doctrinebot commented on GitHub (Feb 18, 2013):
Comment created by datkind:
When i try to generate a new PersistentCollection like this:
I get an typ hinting error like
"Expected array, got "Doctrine\Common\Collections\ArrayCollection"
This could be fixed by changing the type hinting for the Doctrine\ORM\PersistentCollection::*constructor
*From:
To:
@doctrinebot commented on GitHub (Feb 18, 2013):
Comment created by stof:
There is no typehint in the PersistentCollection constructor. So the issue cannot come from this place (the phpdoc is wrong btw, it expects a Collection, not an array)
Please give the full error, i.e. the message and the location so that we can know where it happens.
@doctrinebot commented on GitHub (Feb 20, 2013):
Comment created by datkind:
There error is not in the function declaration, it is in the @param in the doc block of the constructor.
Using PHPStorm as IDE i got this error thrown by the IDE it self, not php. (Screenshot will be attached)
Using ZF2 the error is on line 121 at:
vendor/doctrine/orm/lib/Doctrine/ORM/PersistentCollection.php
@doctrinebot commented on GitHub (Feb 20, 2013):
Comment created by datkind:
Using PHPStorm as IDE i got "Expected array, got "Doctrine\Common\Collections\ArrayCollection" thrown by the IDE it self, not php.
@doctrinebot commented on GitHub (Feb 20, 2013):
Comment created by datkind:
Using PHPStorm as IDE i got "Expected array, got "Doctrine\Common\Collections\ArrayCollection" thrown by the IDE it self, not php.
@doctrinebot commented on GitHub (Feb 26, 2013):
Comment created by @ocramius:
The correct type hint here is
Doctrine\Common\Collections\Collection.I'm closing this as invalid, since you shouldn't instantiate a persistent collection on your own. Consider opening a pull request at https://github.com/doctrine/doctrine2 instead if you want to fix the typehint.
@doctrinebot commented on GitHub (Feb 26, 2013):
Issue was closed with resolution "Invalid"