Story #78461
closedVERY generically named constants in SystemEnvironmentBuilder should be removed or renamed
0%
Description
In SystemEnvironmentBuilder which is used by Bootstrap to process requests, we are currently defining a set of super-generic named constants which would be obvious candidates to cause a collision.
The constants are:
// A tabulator, a linefeed, a carriage return, a CR-LF combination
define('TAB', chr(9));
define('LF', chr(10));
define('CR', chr(13));
define('CRLF', CR . LF);
While it perhaps makes sense to define these (I don't necessarily agree it does; PHP_EOL exists for 95% of the use cases and authors can reasonably be expected to manually accommodate the last 5%) they certainly at the very least should be prefixed with a TYPO3-unique prefix.
The same goes for any other constants we may be defining that I've missed here. The main goal should be to get completely rid of these; keeping our constants to an absolute minimum and whenever possible, wrapping them in a class to prevent any possibility of tainting the global state.
This would be a breaking change but one we should do before the next LTS version - or we will have to live with them for a long, long time.