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

Enable testing with PHPUnit 9.x #5314

Merged
merged 1 commit into from
Dec 16, 2020
Merged

Conversation

sanmai
Copy link
Contributor

@sanmai sanmai commented Dec 3, 2020

@sanmai sanmai marked this pull request as draft December 3, 2020 06:34
phpunit.xml.dist Outdated Show resolved Hide resolved
phpunit.xml.dist Outdated Show resolved Hide resolved
@sanmai sanmai marked this pull request as ready for review December 3, 2020 08:45
tests/PregTest.php Outdated Show resolved Hide resolved
@@ -62,7 +62,7 @@ protected function doTest($expected, $input = null, \SplFileInfo $file = null)
protected function configureFixerWithAliasedOptions(array $configuration)
{
if (!$this->fixer instanceof ConfigurationDefinitionFixerInterface) {
throw new \LogicException('Fixer is not configurable');
throw new \LogicException('Fixer is not configurable.');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fabbot asked for this and below.

@sanmai sanmai requested a review from keradus December 4, 2020 02:21
@sanmai
Copy link
Contributor Author

sanmai commented Dec 5, 2020

I will try to get this up to date with the head branch next Monday.

composer.json Outdated Show resolved Hide resolved
@@ -40,9 +40,10 @@
"php-cs-fixer/accessible-object": "^1.0",
"php-cs-fixer/phpunit-constraint-isidenticalstring": "^1.2",
"php-cs-fixer/phpunit-constraint-xmlmatchesxsd": "^1.2.1",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.1",
"phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.13 || ^9.4.4 <9.5",
Copy link
Contributor Author

@sanmai sanmai Dec 5, 2020

Choose a reason for hiding this comment

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

PHPUnit-Bridge is not yet compatible with PHPUnit 9.5. Looks like this.

Reported as symfony/symfony#39329

Copy link
Contributor

Choose a reason for hiding this comment

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

This should be fixed now.

Copy link
Contributor Author

@sanmai sanmai Dec 6, 2020

Choose a reason for hiding this comment

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

It is, but not in a release. Right?

composer.json Outdated Show resolved Hide resolved
@@ -74,12 +74,27 @@ public function testDeploymentJobsRunOnLatestStablePhpThatIsSupportedByTool()
}
}

private static function assertUpcomingPhpVersionIsCoveredByCiJob($lastSupportedVersion, array $ciVersions)
private static function ensureTraversableContainsIsAvailable()
Copy link
Contributor

Choose a reason for hiding this comment

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

What is the purpose here?

It is named "ensure TraversableContains is available" and when it does not exist we mark it as skipped.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yup, that's what it does. Is there a problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Contrary to what the diff shows, assertUpcomingPhpVersionIsCoveredByCiJob is still here.

@sanmai sanmai force-pushed the pr/2.16/phpunit9 branch 2 times, most recently from 9d3044e to 6712f4e Compare December 11, 2020 05:50
@sanmai
Copy link
Contributor Author

sanmai commented Dec 11, 2020

Diff should be much smaller now. Please check it out.

@sanmai sanmai force-pushed the pr/2.16/phpunit9 branch 2 times, most recently from bd6ed51 to 40cef3a Compare December 11, 2020 06:53
- Replace setUp/tearDown.
- Refactor propery-accessing static methods.
- Fix fabbot.io notices.
- Bumps timeout for small tests.
- Update composer.json.

Co-authored-by: Alexey Kopytko <alexey@kopytko.com>
@keradus
Copy link
Member

keradus commented Dec 16, 2020

Thank you @sanmai.

@keradus keradus merged commit 8bd4cbc into PHP-CS-Fixer:2.16 Dec 16, 2020
@keradus keradus added this to the 2.16.10 milestone Dec 16, 2020
@sanmai sanmai deleted the pr/2.16/phpunit9 branch December 16, 2020 02:58
@SpacePossum
Copy link
Contributor

thanks for all the work @sanmai 👍

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

5 participants