Bug #29791

When kickstarting models with collections, invalid code is generated

Added by Karsten Dambekalns about 10 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Must have
Target version:
-
Start date:
2011-09-14
Due date:
% Done:

100%

Estimated time:

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
#1

Updated by Karsten Dambekalns almost 10 years ago

  • Target version deleted (1230)
#3

Updated by Michel Albers over 9 years ago

This is still the case in FLOW3 Beta 1.1

#4

Updated by Bastian Waidelich almost 9 years ago

Is that still the case today? brr

#5

Updated by Bastian Waidelich almost 9 years ago

Is that still the case today? brr

#6

Updated by Bastian Waidelich almost 9 years ago

  • Status changed from New to Accepted
  • Assignee set to Bastian Waidelich
#7

Updated by Gerrit Code Review almost 9 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 almost 9 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 almost 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#10

Updated by Gerrit Code Review almost 9 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 almost 9 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 almost 9 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF