[TYPO3-core] Adding visibility to methods and variables within t3lib_tcemain?

Jigal van Hemert jigal.van.hemert at typo3.org
Fri Jun 15 11:01:37 CEST 2012


Hi,

On 15-6-2012 1:01, Christian Kuhn wrote:
> On 06/15/2012 12:27 AM, Jigal van Hemert wrote:
>> They completely hide the available data
>> members and methods (an IDE can not check if a variable or getter/setter
>> is actually valid)
>
> This is actually a bonus in this case: A method that we make protected,
> but is accessible with a compatibility layer through a magic method,

Okay, as a transition it can be used. Public getters/setters and for 
compatibility the magic functions for anything that should not be 
accessible.

I don't expect many extension developers to change their code really 
soon. As long as it works there is no need to change it. Deprecation log 
is hardly ever used it seems.
Look at the number of extensions which never started using the new mail 
API even though updates were published after TYPO3 4.5 came out.

> That is a different problem and we need to check this from case to case.
> The vast majority of methods doesn't use parameters by reference anyway.

It's more that you could previously assign a reference to a data member 
of the class. If you try to do that while the magic functions take 
control this will fail.

All in all the magic functions are nice as a transitional way to handle 
deprecation here.

-- 
Jigal van Hemert
TYPO3 Core Team member

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-team-core mailing list