[TYPO3-v4] RFC: Visibility keywords throught the Core

Marcus Krause marcus#exp2010 at t3sec.info
Tue Oct 12 22:27:59 CEST 2010


Ernesto Baschny [cron IT] schrieb am 10/11/2010 04:43 PM Uhr:
> Am 11.10.2010 16:11, Steffen Kamper schrieb:
>> Ernesto Baschny [cron IT] schrieb:
>>> Steffen Kamper schrieb am 11.10.2010 10:18:
>>>
>>> I think that is what Sebastian suggested. If we change it now, everyhing
>>> has to start being public.
>>>
>>> But then, what sense does it make? Default is "public" in PHP, isn't it?
>>>
>> So starting writing public is enough to have an unique touch and feel.
> 
> I don't agree with that. If we simply add "public" everywhere, we cannot
> differenciate anymore from "public for a reason" vs "public because it
> has always been like that".
> 
> Currently its pretty easy to see, as every class that has no "public"
> keywords clearly still comes from the "old times".
> 
> So we should only starting doing such a "cleanup" when we have a plan on
> how to migrate specific methods to "private / protected". Usually those
> classes needs a refactoring anyway, so it makes no sense in thinking
> about it in a "global scope", but rather from case to case.

Of course, it doesn't make any sense to put public in front of all
methods. The aim for such projects should be having *correct* visibility
keywords (*least* visibility) for any method.

In conclusion, I see a general agreement on my idea. We just need
someone or a teams that is willing to do so. ;-)


I'm sure somewhere in the net there's a script/software that collects
references/method calls within a project. Such "thing" might help to get
a first glance on what needs to be public - if a method is called from
within TYPO3 Core it obviously needs to be public. Is there anybody who
has seen something like that?


Marcus.


More information about the TYPO3-project-v4 mailing list