Bug #87107

Remove phpunit-randomizer from dependencies

Added by Anja Leichsenring over 1 year ago. Updated 11 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-12-08
Due date:
% Done:

100%

TYPO3 Version:
9
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Since phpunit/phpunit version 7.4 the package contains an own randomizer option (order-by).

See https://github.com/fiunchinho/phpunit-randomizer, the ReadMe features a broken link even to phpunit 7.3, but it is not in the docs for this version.
I tested, and the last version working with `bin/phpunit-randomizer -c vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml --order rand` would be phpunit 7.2.

With the latest test run, the randomizer call used by the nightly run even fails. The used phpunit version was 7.5 (released yesterday)

The day before, the nighly run used phpunit 7.1 as max version, no error was detected.

So here is my conclusion:
- quickfix would be to limit the max phpunit version to 7.2

- extend the test specs to detect which phpunit version is used, make the randomizer all until 7.2, above use phpunit with `order-by=random`.
- remove the fiunchinho/phpunit-randomizer package from the deps
- drop dependency phpunit <7.3.

Associated revisions

Revision f74cf58c (diff)
Added by Christian Kuhn about 1 year ago

[TASK] Update to phpunit 7.5

Updating to latest v7 branch of phpunit is blocked by
codeception which relies on phpunit-mock-objects, so
we need to update this first from 2.4 to 2.5:

composer require --dev codeception/codeception:^2.5.4

Updating its dependencies then drops phpunit-mock-objects
and fetches phpunit 7.5:

composer update --with-dependencies codeception/codeception

Younger phpunit now has a random-order built in, the currently
used plugin can be removed:

composer remove --dev fiunchinho/phpunit-randomizer

typo3/testing-framework needs a raise to prevent a lower
phpunit version that would break the randomizer again:

composer require --dev typo3/testing-framework:~5.0.6

runTests.sh and its docker-compose file need some adaptions
so the unit test randomizer can be used, example calls:

Build/Scripts/runTests.sh -s unitRandom

Build/Scripts/runTests.sh -s unitRandom -o 1551445682

bamboo also needs some adaptions to now use built in phpunit
random functionality instead of phpunit-randomizer.

Change-Id: I0acfebdcb1f4da785845c8397ad23b7bb8174505
Resolves: #87107
Releases: master, 9.5
Reviewed-on: https://review.typo3.org/c/59823
Tested-by: TYPO3com <>
Tested-by: Andreas Fernandez <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Andreas Fernandez <>
Reviewed-by: Anja Leichsenring <>

Revision 039c786c (diff)
Added by Christian Kuhn about 1 year ago

[TASK] Update to phpunit 7.5

Updating to latest v7 branch of phpunit is blocked by
codeception which relies on phpunit-mock-objects, so
we need to update this first from 2.4 to 2.5:

composer require --dev codeception/codeception:^2.5.4

Updating its dependencies then drops phpunit-mock-objects
and fetches phpunit 7.5:

composer update --with-dependencies codeception/codeception

Younger phpunit now has a random-order built in, the currently
used plugin can be removed:

composer remove --dev fiunchinho/phpunit-randomizer

typo3/testing-framework needs a raise to prevent a lower
phpunit version that would break the randomizer again:

composer require --dev typo3/testing-framework:~4.12.0

runTests.sh and its docker-compose file need some adaptions
so the unit test randomizer can be used, example calls:

Build/Scripts/runTests.sh -s unitRandom

Build/Scripts/runTests.sh -s unitRandom -o 1551445682

bamboo also needs some adaptions to now use built in phpunit
random functionality instead of phpunit-randomizer.

Change-Id: I0acfebdcb1f4da785845c8397ad23b7bb8174505
Resolves: #87107
Releases: master, 9.5
Reviewed-on: https://review.typo3.org/c/59831
Tested-by: TYPO3com <>
Tested-by: Anja Leichsenring <>
Reviewed-by: Anja Leichsenring <>

History

#1 Updated by Gerrit Code Review about 1 year ago

  • Status changed from New to Under Review

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59823

#2 Updated by Gerrit Code Review about 1 year ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59823

#3 Updated by Christian Kuhn about 1 year ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#4 Updated by Gerrit Code Review about 1 year ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/59831

#5 Updated by Christian Kuhn about 1 year ago

  • Status changed from Under Review to Resolved

#6 Updated by Benni Mack 11 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF