Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade PHPUnit from ^6.5 to ^7.5 and all dependencies, including root differ #627

Merged
merged 2 commits into from Feb 13, 2019

Conversation

maks-rafalko
Copy link
Member

@maks-rafalko maks-rafalko commented Feb 12, 2019

This PR:

  • Upgrades PHPUnit from ^6.5 to ^7.5
  • Upgrades sebastian/diff to ^3.0 (see composer.lock). This returns back diffs with a context lines (lines before and after a modified one 🎉)
  • Run tests in random order by default

Why not PHPUnit 8.0?

It requires PHP ^7.2 while we support 7.1 yet.

Next steps


Had to upgrade dependencies of one of the e2e test because of fatal error:

PHP Fatal error:  Declaration of PHPUnit\Framework\Constraint\ArrayHasKey::matches($other) must be compatible with PHPUnit\Framework\Constraint\Constraint::matches($other): bool in tests/Fixtures/e2e/Save_PHPUnit_Bootstrap_File/vendor/phpunit/phpunit/src/Framework/Constraint/ArrayHasKey.php on line 83

…t sebastian/diff

Run tests in a random order by default
BackEndTea
BackEndTea previously approved these changes Feb 12, 2019
Copy link
Member

@BackEndTea BackEndTea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming CI doesn't report anything, 👍

Copy link
Member

@localheinz localheinz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like --min-msi needs to be adjusted?

See https://travis-ci.org/infection/infection/jobs/492324430#L1117-L1118:

[ERROR] The minimum required MSI percentage should be 90%, but actual is 78%.  
Improve your tests!

phpunit.xml.dist Show resolved Hide resolved
@maks-rafalko
Copy link
Member Author

Looks like --min-msi needs to be adjusted?

that's almost impossible in this case, because Infection is run with empty --filter for this PR (https://travis-ci.org/infection/infection/jobs/492324430#L1048)

This is because no PHP source files were modified from src/.

It means that to achieve 90%, I need to do it for the whole project ;) Not feasible indeed.

The goal of this target was to target 90% for the changed files, it just does not work properly with empty filter.

@maks-rafalko
Copy link
Member Author

misread your comment. Ok - the target MSI for changed files is ok to be 90% (original --min-msi=67 in our .travis.yml).

But it shouldn't be 90% when the --filter is empty. This is the issue, but I guess out of the scope of this PR

@sanmai sanmai mentioned this pull request Feb 13, 2019
1 task
@maks-rafalko
Copy link
Member Author

Created #631 for MSI issue.

Thank you.

@maks-rafalko maks-rafalko merged commit 4aeb348 into master Feb 13, 2019
@maks-rafalko maks-rafalko deleted the new-phpunit branch February 13, 2019 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants