Review main Abandoned

48840[BUGFIX] Add dependency on "mbstring"

Mathias Brodala CR 0 V 0 Easy +5 −2 updated 08/01/16, 13:04

Commit message

Also update the system environment check accordingly.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 3

Review log 1314

  1. Mathias Brodala uploaded patch set 1 07/07/16, 10:20

  2. TYPO3com voted on patch set 1 V +1 07/07/16, 10:24 Completed build in 03m 09s on Thu, 7 Jul, 12:24 PM Test Summary: 9672 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-563

  3. Christian Kuhn commented on patch set 1 CR -1 07/07/16, 10:25

    as far as i know, we do not have direct dependencies to mbstring in the core. could you point them out to see if this issue could be solved differently?
  4. Christian Kuhn commented on patch set 1 07/07/16, 10:32

    background: i've raised the issue "let's just use mbstring and hardcode it everywhere" a couple of times myself, already. the outcome was always "nah, we have this funny class, let us use it as facade". this is why benni worked hard on the charsetConversion already - and as far as i know, both mbstring and iconv can be used without issues at the moment. everything else might be handled as a bug, then. maybe benni could give further thoughts to this issue.
  5. Oliver Klee voted on patch set 1 CR +1 07/07/16, 10:34

  6. Mathias Brodala commented on patch set 1 07/07/16, 10:35

    > as far as i know, we do not have direct dependencies to mbstring in > the core. could you point them out to see if this issue could be > solved differently? A simple lookup for "mb_" in the current (b2b622e) core yields these locations: ImageManipulationElement.php:91 CharsetConverter.php (many) MailMessage.php:257 Also: LengthValidatorTest.php:46 ContentObjectRendererTest.php (few)
  7. Christian Kuhn commented on patch set 1 07/07/16, 10:48

    matthias, this is not enough. the charsetConverter is the facade, so this does not count. the other places need a dedicated eye. the test classes don't count for instance, either.
  8. Mathias Brodala commented on patch set 1 07/07/16, 10:55

    > matthias, this is not enough. the charsetConverter is the facade, > so this does not count. Yes, I just wanted to be sure to mention all locations. > the test classes don't count for instance, either. What if one starts developing on TYPO3 and encounters failing tests because he doesn't have mbstring installed?
  9. Benni Mack commented on patch set 1 07/07/16, 11:33

    yeah, I agree on that. The facade uses mbstring/iconv because some systems don't have mbstring enabled. Either: We keep it like it is and remove the "self-baked" code at some point (main issue is that iconv does not support all functionality, and the fallback of the "self-baked" is still in there) but support both Or: We use a good fallback to only support mbstring only with a polyfill like this: https://github.com/symfony/polyfill-mbstring Either way adding this to composer.json and the install tool wouldn't be the way to go IMHO.
  10. Steffen Müller commented on patch set 1 07/07/16, 12:03

    I remember at a 7.x code sprint 2015 I did some benchmarks regarding mbstring vs. iconv on php 5.6 Surprisingly iconv was faster on my test instance. I did not follow up this topic and my test results are propbably not valid anymore for php7. However I'd vote against hardcoding mbstring. I suggest to add "ext-mbstring" to "require-dev" section in composer.json and fix mb_ occurences except for CharsetConverter
  11. Daniel Goerz commented on patch set 1 08/01/16, 12:50

    The usage of mb_strtolower() in ImageManipulationElement:91 is breaking the file relations in content elements (file_references) on systems wihtout mbstring enabled. So I think we either need to add mbstring to the dependencies or remove the dependency but TYPO3 does not work without mbstring at the moment.
  12. Daniel Goerz commented on patch set 1 08/01/16, 12:53

    Wouter just told me that the useage already was removed. So we can abandon here, I guess?
  13. Daniel Goerz voted on patch set 1 CR -1 V -1 08/01/16, 13:02

  14. Mathias Brodala abandoned the change 08/01/16, 13:04

    Yup, you are right this was fixed in the meantime. The only remaining location is the CharsetConverter which is the lone facade.