[TYPO3-core] RFC #15075: feature: make a pre-check for required php-extensions
Xavier Perseguers
typo3 at perseguers.ch
Fri Aug 13 07:43:36 CEST 2010
Hi Jigal,
Finally found time to review your patch.
>> Unfortunately the discussion about separating this module list to
>> required and alternative modules (mysql) is not in the patch. IMHO we
>> agreed on this separation, didn't we?
>> I am still waiting for it before voting.
>
> The request by Xavier was to make it possible to have "required" modules
> and "one of this set is required" modules.
> This is done by having an array of:
> - module names (each module is required)
> - sub-arrays of module names (at least one of this set is required)
>
> So what's missing in your opinion? :-)
That's OK for me.
>> The patch in this form looks like adding a feature which obviously
>> introduces new bugs. I do not like that, since we are not in a hurry.
>
> That's a rather pessimistic view on the world ;-)
> What kind of bugs do you predict to come from this check?
>
> It's nothing more or less than a quick test for PHP modules which are
> required to run TYPO3. It's only done in the 123 installer to catch
> these problems in an early stage. Instead of ugly fatal PHP errors
> you'll see a simple but decent error message stating which PHP modules
> are needed to install (or run) TYPO3.
I did not test it with DBAL, just read it and it won't work as DBAL does
not XCLASS the installer (we used a hook-like construction to avoid this
paradigm).
There's two problems:
1) Test for required modules is being done before DBAL has a chance to
hook in (around lines 261-273) while autoloader of DBAL is included
around lines 343-347
2) DBAL makes use of hooks to integrate within installer:
// Hook to override and add steps to the 1-2-3 installer
if (is_array
($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['stepOutput']))
{
foreach
($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install/mod/class.tx_install.php']['stepOutput']
as $classData) {
$hookObject = t3lib_div::getUserObj($classData);
$hookObject->executeStepOutput($markers, $this->step, $this);
}
}
=> DBAL should have a chance to autoload before your test
=> Your getMissingPHPModules() method should provide a hook that DBAL
would use to override the list of modules
Besides that, reading review:
- use "protected" instead of "var" for member declaration. Var is a
keyword from PHP4, starting from PHP5 we should have proper visibility
keyword (private/protected/public) even if old members still have the
"var" declaration
Thanks for your work!
Xavier
More information about the TYPO3-team-core
mailing list