[TYPO3-v4] Discouraging or deprecating PHP_SCRIPT cObject?

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri May 6 16:31:50 CEST 2011


François Suter schrieb am 06.05.2011 15:05:
> Hi all,
> 
> While working on the documentation I was reminded of a question that
> cropped up during the development of 4.5: is usage of PHP_SCRIPT
> cObjects discouraged? I mean it's written nowhere as far as I can tell,
> but scripts should really be encapsulated inside extensions and not
> included "raw". So two questions:
> 
> 1) should the TSref explicitly discourage usage of PHP_SCRIPT objects?
> 2) should we go further and actually deprecate such objects in 4.6?

The PHP_SCRIPT_EXT has the sex appeal of being extremely fast. If you
need some PHP calculation that doesn't require any further TYPO3
framework, you get fastest results with it (e.g. displaying the current
date) => we should keep it!

PHP_SCRIPT_INT will load the whole TSFE for you (because you will be
inside a cObject, requiring the TypoScript etc in place), causing it to
be as slow as any other USER_INT  => so deprecate it, recommend using
USER_INT instead.

PHP_SCRIPT is like a bad-designed USER object => deprecate it too.

Cheers,
Ernesto



More information about the TYPO3-project-v4 mailing list