[TYPO3-core] RFC: #13697: Add possibility to retrieve extension version

Tolleiv Nietsch info at tolleiv.de
Thu Mar 25 13:39:34 CET 2010


Am 10.03.2010 12:06, schrieb Oliver Klee:
> Hi again,
>
> Oliver Klee schrieb:
>> So how can we prevent the abovementioned problem, and still make the
>> function work?
>
> Maybe we can backup $_EXTKEY first. I haven't tested whether it actually
> needs to be global here, either.
>
>>  From the documentation of your original code, I read that the function
>> was only to be used for *installed* extensions:
>>
>> +	/**
>> +	 * Retrieves the version of an installed extension
>>
>> And so I added the exception for cases where the function is called
>> incorrectly.
>>
>> Is the original comment incorrect? If so, it needs to be corrected.
>
> BTW, I have no problem if the function is also intended for cases of not
> installed extensions. The comments just should be clear about this.
>
> In that case, I'd prefer an empty string as return value so we have
> clean typing.
>
>
> Oliver

Well my initial patch does exactly what I was asking for without overhead.

It's returning "false" [instead of throwing an exception] if an 
extension isn't installed - which is pretty clear for me. I know that 
throwing exceptions is a powerful tool in certain cases, but within the 
localconf.php context I'd prefer not to have exceptions since this might 
break complete installations just because someone uninstalled a certain 
extension.

Cheers,
Tolleiv
-- 
Tolleiv Nietsch
www.tolleiv.de - www.aoemedia.de


More information about the TYPO3-team-core mailing list