Review main Merged

69297[TASK] Update PHPunit to v9

Benni Mack CR +2 V +2 Expert +909 −374 updated 05/25/22, 19:28

Commit message

PHPunit v9 allows to use further improvements to our testing
API, and also offers extended support until at least Feb 2022.

PHPunit v9 requires PHP 7.3+ which isn't a problem
for us per-se.

In addition, composer does not complain about
an abandoned package anymore if we upgrade to PHPunit 9.

In order to achieve this, we need to explicitly
require "codeception/phpunit-wrapper:^9.0" which we
can then remove later-on again.

Used composer commands:
> composer req --dev "phpunit/phpunit:^9.5" "phpspec/prophecy-phpunit" "codeception/phpunit-wrapper:^9.0" -W
> composer req --dev "phpunit/phpunit:^9.5" "phpspec/prophecy-phpunit" -d typo3/sysext/core --no-update
> composer remove --dev codeception/phpunit-wrapper

Used rector to migrate all Unit tests to prevent warnings..

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Mathias Brodala +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Mathias Brodala +1
    • core-ci +1 CI

Issues 1

Files 223

Show 203 more files

Review log 2536

Show 611 earlier messages
  1. Benni Mack uploaded patch set 1 05/27/21, 11:49

  2. core-ci voted on patch set 1 V +1 05/27/21, 12:00 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11894

  3. Benni Mack uploaded patch set 2 05/27/21, 13:47

  4. core-ci voted on patch set 2 V +1 05/27/21, 13:57 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/11897

  5. Benni Mack uploaded patch set 3 06/14/21, 10:27

  6. core-ci voted on patch set 3 V +1 06/14/21, 10:39 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12397

  7. Benni Mack uploaded patch set 4 06/14/21, 14:21

  8. core-ci voted on patch set 4 V +1 06/14/21, 14:30 Core CI is happy: https://gitlab.typo3.org/TYPO3/CI/cms/-/pipelines/12421

  9. Christian Kuhn commented on patch set 4 CR -1 06/14/21, 15:05

    Let's do that after testing-framework branching.
  10. Wouter Wolters uploaded patch set 5 08/03/21, 21:51

  11. core-ci voted on patch set 5 V -1 08/03/21, 21:55 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14065

  1. Wouter Wolters commented on patch set 5 08/03/21, 21:55

    I updated this patch and did some extra work. Used rector to update to 9.5 PHPunit. TODO Cleanup rector in composer Downgrade phpstan Remove rector config file Solve last warning in YamlFileLoaderTest. Method ->at() is deprecated. Fine tune commit message.
  2. Wouter Wolters uploaded patch set 6 08/04/21, 08:21

  3. Wouter Wolters uploaded patch set 7 08/04/21, 08:40

  4. core-ci voted on patch set 6 V -1 08/04/21, 08:42 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14072

  5. core-ci voted on patch set 7 V -1 08/04/21, 09:02 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14074

  6. Wouter Wolters uploaded patch set 8 08/04/21, 09:08

  7. core-ci voted on patch set 8 V -1 08/04/21, 09:28 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14075

  8. Wouter Wolters uploaded patch set 9 08/04/21, 09:43

  9. core-ci voted on patch set 9 V +1 08/04/21, 09:56 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14076

  10. Wouter Wolters uploaded patch set 10 08/04/21, 10:14

  11. core-ci voted on patch set 10 V -1 08/04/21, 10:17 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14080

  12. Wouter Wolters uploaded patch set 11 08/04/21, 10:18

  13. core-ci voted on patch set 11 V +1 08/04/21, 10:38 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/14081

  14. Mathias Brodala commented on patch set 11 08/04/21, 11:02

    AdminPanelInitiatorTest.php:36

    I wonder if this should go into the TYPO3 testing framework UnitTestCase instead. It's opinionated and tailored for TYPO3 development anyways, so even 3rd party will expect this to work. But there are quite a few tickets and commits about this in the testing framework so I'm not sure what the plan is here.
  15. Wouter Wolters commented on patch set 11 08/04/21, 11:20

    AdminPanelInitiatorTest.php:36 Reply

    I don't think it should be part of the testing framework becasue only the core requires phpspec/prophecy as dev dependency. The testing-framework does not require it. I do not expect 3rd parties to expect this to work. I saw some patches but that got reverted and thats why I decided to do it this way.
  16. Mathias Brodala commented on patch set 11 08/05/21, 07:02

    AdminPanelInitiatorTest.php:36 Reply

    Alright, thanks for checking!
  17. Mathias Brodala commented on patch set 11 V +1 CR +1 08/05/21, 07:03

    Verified by CI run.
  18. Oli Bartsch voted on patch set 11 V +1 CR +1 08/05/21, 10:58

  19. Benni Mack voted on patch set 11 V +2 CR +2 08/05/21, 11:06

  20. Benni Mack merged patch set 12 08/05/21, 11:06

  21. Oliver Hader commented on patch set 12 08/05/21, 12:41

    composer.lock:8260

    What does that mean?
  22. Wouter Wolters commented on patch set 12 08/05/21, 12:54

    composer.lock:8260 Reply

    that means I run composer 2.0.x locally and someone updated the lock file with 2.1.x previously
  23. Christian Kuhn commented on patch set 12 05/23/22, 20:01

    FileBackendTest.php:504

    these substitutions were kinda useless: the if should have been remove instead.
  24. Christian Kuhn commented on patch set 12 05/23/22, 20:28

  25. Benni Mack commented on patch set 12 05/25/22, 19:28

    composer.lock:8260 Reply

    Done