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

Xavier Perseguers xavier at typo3.org
Fri Jun 15 08:45:02 CEST 2012


Hi,

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,
> should not be shown as API method in the IDE anyway. This way an IDE
> will hint developers that a used method does not exist anymore to the
> public. OTOH we can not rely on that, because IDE's could be changed to
> 'understand' the meaning of __call() and friends and say 'oh, every
> method you are calling on this class is valid, because it has a magic
> __call method'.

I doubt it because within the __call method you typically check for the
name of the method or do fancy stuff with it. Anyway, I know of no IDE
doing this now and this fit our use case quite nicely so I'd say this is
the best candidate to add visibility while ensuring deprecation properly.

Developers should now start to get accustomed with deprecation log I'd
say so it's likely extensions will get better maintained in future.

>> and it is not possible to pass data by reference.
> 
> 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.

Exactly.

Kind regards

-- 
Xavier Perseguers
Release Manager TYPO3 4.6

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



More information about the TYPO3-team-core mailing list