#64627 Extension installer: Handle multiple blanks
Description
In issue #62245 a better solution to remove blanks is provided. This solution is great indeed but needs a “newer” PCRE extension. I don’t know which version at least is needed. If the PCRE extension does not provide the horizontal whitespace sequence the install tool would simply remove the “h” letters!
The statement
ALTER TABLE some_table ADD chash some_definition
would then become
ALTER TABLE some_table ADD c as some_definition
Note the missing “h”!
I solved it by changing this line in file /typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php (around line 109)
$lineV = preg_replace('/\h+/', ' ', $lineV);
to
$lineV = preg_replace('/[ \t]+/', ' ', $lineV);
Found in PCRE man page: http://www.pcre.org/pcre.txt
The sequences \h, \H, \v, and \V are features that were added to Perl
at release 5.10. In contrast to the other sequences, which match only
ASCII characters by default, these always match certain high-valued
code points, whether or not PCRE_UCP is set. The horizontal space char-
acters are:
I’m not sure if I should patch it or not. I think the solution in #62245 is well. But the minimum requirements for TYPO3 6.2 should give a hint to PCRE version 5.10.
PS: I had this behaviour two times.