Bug #29791
When kickstarting models with collections, invalid code is generated
Status: | Resolved | Start date: | 2011-09-14 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | - | |||
Target version: | - | |||
Affected Flow version: | FLOW3 1.0.0 |
Description
Not in all cases, but when using collections with element type hints, the generated code is wrong:
./flow3 kickstart:model TYPO3.Blog Blog 'posts:\Doctrine\Common\Collections\Collection<\TYPO3\Blog\Domain\Model\Post>'
results in setter code like
/** * Sets this Blog's posts * * @param \Doctrine\Common\Collections\Collection<\TYPO3\Blog\Domain\Model\Post> $posts The Blog's posts * @return void */ public function setPosts(\Doctrine\Common\Collections\Collection<\TYPO3\Blog\Domain\Model\Post> $posts) { $this->posts = $posts; }
which results in a nasty error like
PHP Parse error: syntax error, unexpected '<', expecting '&' or T_VARIABLE in .../Model/Blog.php on line xx
Associated revisions
[BUGFIX] Fix type hint of collections in generated model classes
This makes sure that, when using collections with element type hints,
only the collection class name ends up in the type hint of the generated setter.
Change-Id: I268a14049aa43e430462b8c1a5d325252eb18295
Fixes: #29791
Releases: 1.1, 1.2
[BUGFIX] Fix type hint of collections in generated model classes
This makes sure that, when using collections with element type hints,
only the collection class name ends up in the type hint of the generated setter.
Change-Id: I268a14049aa43e430462b8c1a5d325252eb18295
Fixes: #29791
Releases: 1.1, 1.2
History
#1 Updated by Karsten Dambekalns almost 4 years ago
- Target version deleted (
1230)
#2 Updated by Karsten Dambekalns almost 4 years ago
- Affected Flow version set to FLOW3 1.0.0
#3 Updated by Michel Albers about 3 years ago
This is still the case in FLOW3 Beta 1.1
#4 Updated by Bastian Waidelich over 2 years ago
Is that still the case today? brr
#5 Updated by Bastian Waidelich over 2 years ago
Is that still the case today? brr
#6 Updated by Bastian Waidelich over 2 years ago
- Status changed from New to Accepted
- Assigned To set to Bastian Waidelich
#7 Updated by Gerrit Code Review over 2 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16663
#8 Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/16663
#9 Updated by Bastian Waidelich over 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 3060ff79b14ea8ff7ca3fefb54dad911b625bc2f.
#10 Updated by Gerrit Code Review over 2 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at https://review.typo3.org/17076
#11 Updated by Gerrit Code Review over 2 years ago
Patch set 2 for branch FLOW3-1.1 has been pushed to the review server.
It is available at https://review.typo3.org/17076
#12 Updated by Bastian Waidelich over 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 0f1b8b253c933a671653c408897e3e92ef15b781.