[TYPO3-core] RFC: #13697: Add possibility to retrieve extension version
Oliver Hader
oliver at typo3.org
Fri Mar 26 23:11:28 CET 2010
FYI: Committed to SVN Trunk (rev. 7199)
olly
Am 26.03.10 23:09, schrieb Oliver Hader:
> Hi,
>
> Am 25.03.10 14:04, schrieb Oliver Klee:
>> Hi,
>>
>> Tolleiv Nietsch schrieb:
>>> 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.
>>
>> I've attached an updated patch with the following changes:
>>
>> - return an empty string instead of throwing an exception if the
>> extension is not installed
>> - drop the $GLOBAL (it wasn't actually necessary)
>>
>> The function still throws an exception if $key is empty because this can
>> only happen if the function is called with a wrong parameter (which is a
>> coding error which the developer should be made aware of).
>
> I modified the stuff a bit (see attached patch):
> * change the unit tests to use a dataProvider
> * added some more negative tests fors objects, booleans, integers (would
> have been possible with the last patch as value for $key)
> * changed to use InvalidArgumentException instead of t3lib_exception
> since it is a common SPL exception and tells something more about the
> real problem
>
> Besides that: +1 by reading and testing
>
> olly
--
Oliver Hader
TYPO3 v4 Core Team Leader
More information about the TYPO3-team-core
mailing list