Bug #76902

Method signature parameters raises a Warning with config.tx_extbase.objects.TYPO3\CMS\Extbase\Persistence\Generic\Mapper\ColumnMap.className = Foo\Bar\Zoo

Added by Juan Manuel Vergés Solanas over 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2016-07-01
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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

php7.png (101 KB) php7.png Juan Manuel Vergés Solanas, 2016-07-01 10:00

Related issues

Related to TYPO3 Core - Task #86270: Deprecate config.tx_extbase.objects and plugin.tx_%name%.objectsClosed2018-09-16

Actions
#1

Updated by Nicole Cordes over 5 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.

#3

Updated by Nicole Cordes over 5 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.

#4

Updated by Juan Manuel Vergés Solanas over 5 years ago

Well, if for example the expected parameter is ColumnMapInterface instead of ColumnMap base class, this thingy could be avoided, couldn't it?

#5

Updated by Susanne Moog almost 4 years ago

  • Category set to Extbase
#6

Updated by Georg Ringer almost 3 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

#7

Updated by Georg Ringer almost 3 years ago

  • Related to Task #86270: Deprecate config.tx_extbase.objects and plugin.tx_%name%.objects added

Also available in: Atom PDF