Skip to content

Bump phpunit 7#34921

Closed
phil-davis wants to merge 7 commits intomasterfrom
bump-phpunit-7a
Closed

Bump phpunit 7#34921
phil-davis wants to merge 7 commits intomasterfrom
bump-phpunit-7a

Conversation

@phil-davis
Copy link
Copy Markdown
Contributor

@phil-davis phil-davis commented Mar 29, 2019

Description

Update phpunit from 6.5.14 to 7.5.13

Adjust test code for required changes for phpunit 7.

Note 1: PHPUnit7 requires PHP7.1, so it cannot be merged in stable10 while PHP7.0 is still supported.
So also do not merge this yet in master - because it will cause pain if we have different major versions of phpunit in the 2 branches.

Note 2: the apps currently run the phpunit that comes in the nightly QA tarball (or for a local dev environment, they run whatever phpunit is in the currently-checked-out core) After merging this PR and its backport, it is likely that some apps unit tests will fail and need small refactorings like here. We need to be prepared for that.

Related Issue

maybe can help #34858

Motivation and Context

How Has This Been Tested?

CI

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Database schema changes (next release will require increase of minor version instead of patch)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Technical debt
  • Tests only (no source changes)

Checklist:

  • Code changes
  • Unit tests added
  • Acceptance tests added
  • Documentation ticket raised:

Open tasks:

  • Backport (if applicable set "backport-request" label and remove when the backport was done)

@phil-davis phil-davis self-assigned this Mar 29, 2019
@phil-davis phil-davis mentioned this pull request Mar 29, 2019
11 tasks
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2019

Codecov Report

Merging #34921 into master will decrease coverage by 0.48%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #34921      +/-   ##
============================================
- Coverage     65.34%   64.86%   -0.49%     
+ Complexity    18492    17822     -670     
============================================
  Files          1208     1208              
  Lines         69983    69828     -155     
  Branches       1280     1280              
============================================
- Hits          45732    45295     -437     
- Misses        23879    24161     +282     
  Partials        372      372
Flag Coverage Δ Complexity Δ
#javascript 53.04% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.22% <ø> (-0.54%) 17822 <ø> (-670)
Impacted Files Coverage Δ Complexity Δ
...pps/comments/tests/unit/Dav/RootCollectionTest.php 98.36% <ø> (-0.03%) 17 <0> (-1)
...mments/tests/unit/Dav/EntityTypeCollectionTest.php 100% <ø> (ø) 6 <0> (-1) ⬇️
tests/bootstrap.php 0% <ø> (ø) 0 <0> (ø) ⬇️
...s/comments/tests/unit/Dav/EntityCollectionTest.php 100% <ø> (ø) 8 <0> (ø) ⬇️
core/Application.php 25.47% <0%> (-13.76%) 1% <0%> (-24%)
settings/Application.php 43.75% <0%> (-11.53%) 1% <0%> (-33%)
apps/files/lib/AppInfo/Application.php 30.55% <0%> (-8.47%) 1% <0%> (-6%)
...e/AppFramework/DependencyInjection/DIContainer.php 65.25% <0%> (-8.03%) 14% <0%> (-65%)
apps/files_sharing/lib/AppInfo/Application.php 46.15% <0%> (-4.83%) 5% <0%> (-12%)
apps/files_trashbin/lib/AppInfo/Application.php 68.42% <0%> (-4.31%) 2% <0%> (-3%)
... and 187 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 537b434...7a5d390. Read the comment docs.

2 similar comments
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2019

Codecov Report

Merging #34921 into master will decrease coverage by 0.48%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #34921      +/-   ##
============================================
- Coverage     65.34%   64.86%   -0.49%     
+ Complexity    18492    17822     -670     
============================================
  Files          1208     1208              
  Lines         69983    69828     -155     
  Branches       1280     1280              
============================================
- Hits          45732    45295     -437     
- Misses        23879    24161     +282     
  Partials        372      372
Flag Coverage Δ Complexity Δ
#javascript 53.04% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.22% <ø> (-0.54%) 17822 <ø> (-670)
Impacted Files Coverage Δ Complexity Δ
...pps/comments/tests/unit/Dav/RootCollectionTest.php 98.36% <ø> (-0.03%) 17 <0> (-1)
...mments/tests/unit/Dav/EntityTypeCollectionTest.php 100% <ø> (ø) 6 <0> (-1) ⬇️
tests/bootstrap.php 0% <ø> (ø) 0 <0> (ø) ⬇️
...s/comments/tests/unit/Dav/EntityCollectionTest.php 100% <ø> (ø) 8 <0> (ø) ⬇️
core/Application.php 25.47% <0%> (-13.76%) 1% <0%> (-24%)
settings/Application.php 43.75% <0%> (-11.53%) 1% <0%> (-33%)
apps/files/lib/AppInfo/Application.php 30.55% <0%> (-8.47%) 1% <0%> (-6%)
...e/AppFramework/DependencyInjection/DIContainer.php 65.25% <0%> (-8.03%) 14% <0%> (-65%)
apps/files_sharing/lib/AppInfo/Application.php 46.15% <0%> (-4.83%) 5% <0%> (-12%)
apps/files_trashbin/lib/AppInfo/Application.php 68.42% <0%> (-4.31%) 2% <0%> (-3%)
... and 187 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 537b434...7a5d390. Read the comment docs.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2019

Codecov Report

Merging #34921 into master will decrease coverage by 0.48%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #34921      +/-   ##
============================================
- Coverage     65.34%   64.86%   -0.49%     
+ Complexity    18492    17822     -670     
============================================
  Files          1208     1208              
  Lines         69983    69828     -155     
  Branches       1280     1280              
============================================
- Hits          45732    45295     -437     
- Misses        23879    24161     +282     
  Partials        372      372
Flag Coverage Δ Complexity Δ
#javascript 53.04% <ø> (ø) 0 <ø> (ø) ⬇️
#phpunit 66.22% <ø> (-0.54%) 17822 <ø> (-670)
Impacted Files Coverage Δ Complexity Δ
...pps/comments/tests/unit/Dav/RootCollectionTest.php 98.36% <ø> (-0.03%) 17 <0> (-1)
...mments/tests/unit/Dav/EntityTypeCollectionTest.php 100% <ø> (ø) 6 <0> (-1) ⬇️
tests/bootstrap.php 0% <ø> (ø) 0 <0> (ø) ⬇️
...s/comments/tests/unit/Dav/EntityCollectionTest.php 100% <ø> (ø) 8 <0> (ø) ⬇️
core/Application.php 25.47% <0%> (-13.76%) 1% <0%> (-24%)
settings/Application.php 43.75% <0%> (-11.53%) 1% <0%> (-33%)
apps/files/lib/AppInfo/Application.php 30.55% <0%> (-8.47%) 1% <0%> (-6%)
...e/AppFramework/DependencyInjection/DIContainer.php 65.25% <0%> (-8.03%) 14% <0%> (-65%)
apps/files_sharing/lib/AppInfo/Application.php 46.15% <0%> (-4.83%) 5% <0%> (-12%)
apps/files_trashbin/lib/AppInfo/Application.php 68.42% <0%> (-4.31%) 2% <0%> (-3%)
... and 187 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 537b434...7a5d390. Read the comment docs.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2019

Codecov Report

Merging #34921 into master will decrease coverage by 1.86%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #34921      +/-   ##
============================================
- Coverage     67.18%   65.32%   -1.87%     
+ Complexity    18760    18081     -679     
============================================
  Files          1168     1229      +61     
  Lines         63575    70643    +7068     
  Branches          0     1289    +1289     
============================================
+ Hits          42716    46145    +3429     
- Misses        20859    24120    +3261     
- Partials          0      378     +378
Flag Coverage Δ Complexity Δ
#javascript 53.7% <ø> (?) 0 <ø> (?)
#phpunit 66.65% <ø> (-0.54%) 18081 <ø> (-679)
Impacted Files Coverage Δ Complexity Δ
...aring/appinfo/Migrations/Version20190410160725.php 75% <0%> (-25%) 4% <0%> (+2%)
core/Application.php 25.47% <0%> (-13.76%) 1% <0%> (-24%)
settings/Application.php 43.75% <0%> (-11.53%) 1% <0%> (-33%)
apps/files/lib/AppInfo/Application.php 30.55% <0%> (-9.93%) 1% <0%> (-6%)
...e/AppFramework/DependencyInjection/DIContainer.php 65.25% <0%> (-8.03%) 14% <0%> (-65%)
apps/files_trashbin/lib/AppInfo/Application.php 68.42% <0%> (-4.31%) 2% <0%> (-3%)
apps/federation/lib/AppInfo/Application.php 21.31% <0%> (-4.07%) 7% <0%> (-8%)
apps/files_sharing/lib/AppInfo/Application.php 53.76% <0%> (-3.93%) 5% <0%> (-12%)
lib/private/DB/OracleMigrator.php 76.84% <0%> (-3.86%) 10% <0%> (-19%)
...s/federatedfilesharing/lib/AppInfo/Application.php 41.6% <0%> (-3.37%) 8% <0%> (-15%)
... and 250 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ec7365...5e55479. Read the comment docs.

@phil-davis
Copy link
Copy Markdown
Contributor Author

Rebased to see how CI goes nowadays.

@phil-davis
Copy link
Copy Markdown
Contributor Author

Note:

There were 3 errors:

1) Test\PublicNamespace\ContactsTest::testEnabledAfterRegister
ReflectionException: Class Mock_IAddressBook_89bf1405 does not have a constructor, so you cannot pass any constructor arguments

/drone/src/tests/lib/PublicNamespace/ContactsTest.php:37

2) Test\PublicNamespace\ContactsTest::testAddressBookEnumeration
ReflectionException: Class Mock_IAddressBook_89bf1405 does not have a constructor, so you cannot pass any constructor arguments

/drone/src/tests/lib/PublicNamespace/ContactsTest.php:63

3) Test\PublicNamespace\ContactsTest::testSearchInAddressBook
ReflectionException: Class Mock_IAddressBook_89bf1405 does not have a constructor, so you cannot pass any constructor arguments

/drone/src/tests/lib/PublicNamespace/ContactsTest.php:83

is fixed by commit "Adjust ContactsTest to remove invalid constructor arguments"

@phil-davis
Copy link
Copy Markdown
Contributor Author

@DeepDiver1975 this works for master
We do not want to merge it until we can also merge "drop PHP 7.0" and therefore also merge "phpunit 7" to stable10

I suggest just give "comment" reviews. Do not click "Approve" yet. That will prevent any accidental merge of this PR.

@phil-davis phil-davis force-pushed the bump-phpunit-7a branch 2 times, most recently from 9f4640a to 0f501bd Compare July 22, 2019 04:39
@DeepDiver1975
Copy link
Copy Markdown
Member

As discussed in #35777 the master branch will from now on hold the ownCloud 10 codebase.

This PR targetted ownCloud 11 which is postponed to a far distant future.

Because of that I'm closing this PR and kindly ask you to re-submit this PR in a few days.

Thanks a lot for your patience

@phil-davis
Copy link
Copy Markdown
Contributor Author

Note: stable10 PR(s) supersede this.

@DeepDiver1975 DeepDiver1975 deleted the bump-phpunit-7a branch July 30, 2019 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants