Review main Merged

71603[BUGFIX] Fix undefined array key warnings in GifBuilder

Stefan Bürk CR +2 V +2 Normal +39 −38 updated 10/13/21, 14:53

Commit message

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Stefan Bürk +1
    • Nikita Hovratov +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 3641

Show 1316 earlier messages
  1. Stefan Bürk uploaded patch set 1 10/12/21, 20:35

  2. core-ci voted on patch set 1 V +1 10/12/21, 20:52 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/17994

  3. Benni Mack voted on patch set 1 CR +1 10/13/21, 08:17

  4. Simon Schaufelberger commented on patch set 1 CR -1 10/13/21, 09:13

    I was just preparing a fix myself and I'm sure there are a couple more places. let me check...
  5. Nikita Hovratov uploaded patch set 2 10/13/21, 09:13

  6. Nikita Hovratov commented on patch set 2 10/13/21, 09:15

    Reply

    Hey, I just added a few more I found with functional tests. I'm sure there are still more.
  7. core-ci voted on patch set 2 V +1 10/13/21, 09:30 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18018

  8. Stefan Bürk commented on patch set 2 10/13/21, 09:51

    Reply

    Thanks, but leaving GraphicalFunctions out was intended, as it is cross core extensions. Now it's in. Would prefer to have smaller patches which gets in instead of hanging around and extended over days.
  9. Nikita Hovratov commented on patch set 2 10/13/21, 09:55

    Reply

    Okay, let's make another patch for GraphicalFunctions then. Had to fix those too, to pave my way through GifBuilder.
  10. Christian Kuhn commented on patch set 2 V +1 CR +1 10/13/21, 09:56

    let's keep the patch as is now.
  11. Christian Kuhn commented on patch set 2 10/13/21, 09:57

    Reply

    or is anyone working on a split right now?
  12. Nikita Hovratov uploaded patch set 3 10/13/21, 09:57

  13. Nikita Hovratov commented on patch set 3 10/13/21, 09:58

    Reply

    Sorry, already amended.
  14. Christian Kuhn commented on patch set 3 10/13/21, 09:59

    all good. thx!
  15. Christian Kuhn voted on patch set 3 V +1 CR +1 10/13/21, 10:00

  16. core-ci voted on patch set 3 V +1 10/13/21, 10:20 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18020

  1. Simon Schaufelberger commented on patch set 3 CR -1 10/13/21, 10:32

    let me compare with my own findings because i have A LOT in GifBuilder already
  2. Simon Schaufelberger commented on patch set 3 10/13/21, 11:31

    i found just 2 more

    GifBuilder.php:218

    if (isset($maskInfo['processedFile']) && $maskInfo['processedFile'] instanceof ProcessedFile) {

    GifBuilder.php:256

    if ((int)$theKey && isset($this->setup[$theKey . '.'])) {

    GifBuilder.php:589

    breaks
  3. Simon Schaufelberger commented on patch set 3 10/13/21, 11:34

    I have also written another test but it is incomplete so far which covers quite a bit of the code: ``` /** * @test */ public function buildImageInCommandLineContextWithGifBuilderTextMask(): void { $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml'); $this->setUpBackendUserFromFixture(1); copy( __DIR__ . '/../Fixtures/Images/kasper-skarhoj1.jpg', Environment::getPublicPath() . '/fileadmin/kasper-skarhoj1.jpg' ); $storageRepository = GeneralUtility::makeInstance(StorageRepository::class)->findByUid(1); $file = $storageRepository->getFile('kasper-skarhoj1.jpg'); $fileArray = [ 'XY' => '640,480', 'format' => 'jpg', '10' => 'IMAGE', '10.' => [ 'file' => $file, 'file.' => [ 'width' => 300, ], 'mask' => 'GIFBUILDER', 'mask.' => [ 'XY' => '[10.w]+40,80', 'backColor' => '#ffffff', '10' => 'TEXT', '10.' => [ 'text' => 'TYPO3 rulez !', 'fontColor' => '#000000', ], ], ], ]; $gifBuilder = new GifBuilder(); $gifBuilder->start($fileArray, []); $gifFileName = $gifBuilder->gifBuild(); self::assertFileExists(Environment::getPublicPath() . '/' . $gifFileName); } ```
  4. Simon Schaufelberger commented on patch set 3 10/13/21, 11:38

    The easiest is to put a breakpoint in TYPO3\CMS\Core\Error\ErrorHandler::handleError(), then you will catch a lot of errors. I also see some errors about `unlink` coming from GraphicalFunctions but I wonder why those files don't exist actually
  5. Nikita Hovratov uploaded patch set 4 10/13/21, 13:58

  6. Nikita Hovratov commented on patch set 4 10/13/21, 13:59

    GifBuilder.php:218 Reply

    Done

    GifBuilder.php:256 Reply

    Done

    GifBuilder.php:589 Reply

    Done
  7. Simon Schaufelberger voted on patch set 4 V +1 CR +1 10/13/21, 14:00

  8. Simon Schaufelberger commented on patch set 4 V 0 CR -1 10/13/21, 14:01

    I was not aware that you now also have GraphicalFunctions included.

    GraphicalFunctions.php:2703

    i guess this one is missing
  9. Simon Schaufelberger commented on patch set 4 10/13/21, 14:02

    Reply

    I thought we handle GraphicalFunctions in another patch?
  10. Stefan Bürk commented on patch set 4 10/13/21, 14:11

    Reply

    Original yes, but let them now as is at get it in. (To go on with wit follow patches).

    GraphicalFunctions.php:2703 Reply

    let us do this too (if no one else i will do it after work). Nikita if you have time, would you add it ? Thanks anyway for your update, as I'm currently bound at work.
  11. core-ci voted on patch set 4 V +1 10/13/21, 14:12 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18047

  12. Simon Schaufelberger commented on patch set 4 10/13/21, 14:19

    GraphicalFunctions.php:2703 Reply

    Well, I have a bunch of fixes in GraphicalFunctions as well as this code is from the last century 😄
  13. Nikita Hovratov uploaded patch set 5 10/13/21, 14:19

  14. Nikita Hovratov commented on patch set 4 10/13/21, 14:20

    GraphicalFunctions.php:2703 Reply

    Done
  15. Simon Schaufelberger commented on patch set 5 10/13/21, 14:21

    What about the changes from patch set 2? There were lots more
  16. Simon Schaufelberger commented on patch set 5 10/13/21, 14:22

    all or nothing 😄
  17. Nikita Hovratov commented on patch set 5 10/13/21, 14:22

    Reply

    It is already merged in another patch. Thats the reason I added the additional ones here.
  18. core-ci voted on patch set 5 V +1 10/13/21, 14:32 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/18049

  19. Christian Kuhn commented on patch set 5 10/13/21, 14:46

    Reply

    we'll do that in a similar way with an upcoming testing-framework change.
  20. Christian Kuhn voted on patch set 5 V +1 CR +1 10/13/21, 14:48

  21. Stefan Bürk voted on patch set 5 V +1 CR +1 10/13/21, 14:49

  22. Nikita Hovratov voted on patch set 5 V +1 CR +1 10/13/21, 14:49

  23. Simon Schaufelberger commented on patch set 5 V +1 CR +1 10/13/21, 14:50

    Ok, if I find some more, I will add them later. Let me approve that for now
  24. Christian Kuhn voted on patch set 5 V +2 CR +2 10/13/21, 14:53

  25. Christian Kuhn merged patch set 6 10/13/21, 14:53