Bug #45647
Controllers must not be of scope singleton
Status: | Resolved | Start date: | 2013-02-20 | |
---|---|---|---|---|
Priority: | Must have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | - | |||
Target version: | TYPO3 Flow Base Distribution - 2.0 | |||
Affected Flow version: | Git master |
Description
Currently all the controllers of Flow (and the ones that you create via the kickstarter) are of scope singleton (e.g. contain the @Flow\Scope("singleton") annotation).
Usually that doesn't really make a difference, because controllers are only instantiated once.
But if we start using the same controller multiple times (say two plugin instances on one page) we'll get really weird effects..
BTW: For command controllers it's obviously OK to be singletons, but there is no advantage in doing so
Associated revisions
[BUGFIX] Controllers must not be of scope singleton
Adjusts the controller templates to create prototypes instead
of singletons.
Background:
Usually the scope of a controller doesn't really make a difference,
because they are only instantiated once per request.
But if the same controller is used multiple times
(e.g. within two plugin/widget instances on one page) the side
effects could be very confusing.
Change-Id: Ica0f48becc0b2d02f12f8d40a942cd0bf3274146
Fixes: #45647
Releases: master, 2.0
[BUGFIX] Controllers must not be of scope singleton
Adjusts the controller templates to create prototypes instead
of singletons.
Background:
Usually the scope of a controller doesn't really make a difference,
because they are only instantiated once per request.
But if the same controller is used multiple times
(e.g. within two plugin/widget instances on one page) the side
effects could be very confusing.
Change-Id: Ica0f48becc0b2d02f12f8d40a942cd0bf3274146
Fixes: #45647
Releases: master, 2.0
History
#1 Updated by Bastian Waidelich over 2 years ago
- Status changed from New to Accepted
- Assigned To set to Bastian Waidelich
#2 Updated by Bastian Waidelich about 2 years ago
- Project changed from TYPO3.Flow to TYPO3.Kickstart
- Category deleted (
MVC)
#3 Updated by Gerrit Code Review about 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 https://review.typo3.org/20591
#4 Updated by Gerrit Code Review about 2 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20591
#5 Updated by Bastian Waidelich about 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 35bd7a3aa1f9c7058ef7ddd925bf413e4756fb53.
#6 Updated by Gerrit Code Review about 2 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/21640
#7 Updated by Bastian Waidelich about 2 years ago
- Status changed from Under Review to Resolved
Applied in changeset 989eef864d76e4b05dac0d7a09dd9d07cf69fc19.