Bug #76902
closedMethod signature parameters raises a Warning with config.tx_extbase.objects.TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap.className = Foo\Bar\Zoo
0%
Description
Hi there,
http://php.net/manual/de/migration70.incompatible.php#migration70.incompatible.error-handling.strict
This kind of functionality provided by extbase -> config.tx_extbase.objects.TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap.className = Foo\Bar\Zoo will fail in most of the cases with PHP7 as we don't use interfaces as much as we could.
I found this working with ext:faltranslation https://bitbucket.org/t3easy_de/faltranslation which help us to handle Extbase related files and images (relations) for ext:news with multi-language (use case: a new of ext:news is written in 3 languages and each one have a PDF file which is written in the current language)
Jan Kiesewetter found in the meanwhile this side issue: https://forge.typo3.org/issues/76901
Anyone agrees with me, covering with interfaces this, could be a good idea?
I already saw some other issues related with signatures and php7 diving into the community.
Best wishes ,
Juan Manuel.
Files
Updated by Nicole Cordes about 8 years ago
- Status changed from New to Needs Feedback
Can you please attach the warning you are seeing? IMHO there can't be any interface as the new class can provide new functions on its own.
Updated by Juan Manuel Vergés Solanas about 8 years ago
Updated by Nicole Cordes about 8 years ago
- Status changed from Needs Feedback to New
Thanks for that. Still I don't see how interfaces would help to prevent those errors as even in a class implementing an interface you was able to change the function parameter. This is changed with PHP7 but for extensions IMHO the core can't provide any out of the box solution.
Updated by Juan Manuel Vergés Solanas about 8 years ago
Well, if for example the expected parameter is ColumnMapInterface instead of ColumnMap base class, this thingy could be avoided, couldn't it?
Updated by Georg Ringer over 5 years ago
- Status changed from New to Closed
even though the issue is valid I am closing it as with #86270 the property config.tx_extbase.object
has been removed
Updated by Georg Ringer over 5 years ago
- Related to Task #86270: Deprecate config.tx_extbase.objects and plugin.tx_%name%.objects added