Bug #47394
Unnecessary requirement for \Image implementation in ImageService and ImageVariant
Status: | Resolved | Start date: | 2013-04-20 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Adrian Föder | % Done: | 100% |
|
Category: | - | |||
Target version: | - |
Description
Hi,
when implementing the ImageInterface, you probably do that to use the viewhelpers from Media package. Due to a little oddity, this doesn't work right now. The constructor of the ImageVariant requires a concrete implementation of
\TYPO3\Media\Domain\Model\Image and so does the transformImage method in the ImageService.
This makes it pretty much impossible to have your own image model without duplicating almost the entire media package.
As far as I can oversee it, this can be fixed pretty easily by setting the required type to the interface instead of the implementation. I've attached a patch that does that.
Associated revisions
[TASK] Replace tight Image coupling with ImageInterface
This replaces occurrences of unnecessary tight Image type hints with
the more loose ImageInterface.
Besides, some minor code beautifications are made.
Resolves: #47394
Change-Id: I787a4ac70752bb70820787efba76bd6005da140a
Reviewed-on: https://review.typo3.org/20041
Reviewed-by: Karsten Dambekalns
Tested-by: Karsten Dambekalns
Tested-by: Adrian Föder
Reviewed-by: Aske Ertmann
Reviewed-by: Mattias Nilsson
Reviewed-by: Adrian Föder
History
#1 Updated by Gerrit Code Review over 2 years ago
Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20041
#2 Updated by Adrian Föder over 2 years ago
- Status changed from New to Under Review
#3 Updated by Gerrit Code Review over 2 years ago
Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20041
#4 Updated by Gerrit Code Review almost 2 years ago
Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/20041
#5 Updated by Adrian Föder almost 2 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 1f896fc354d3af41e6e64777a2255c2250758483.