Skip to content

update phpunit #127

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

Merged
merged 4 commits into from
Jun 1, 2017
Merged

update phpunit #127

merged 4 commits into from
Jun 1, 2017

Conversation

mimmi20
Copy link
Contributor

@mimmi20 mimmi20 commented Apr 13, 2017

This PR tries to allow newer versions of PHPunit and changes to the namespaced version of the base test class.

This PR is a part of previous PR #124.

@maxjacobson
Copy link
Contributor

Apologies for the delay in reviewing this.

Will you summarize what is the value in updating this? It doesn't seem like we're taking advantage of any new functionality or bug fixes.

@mimmi20
Copy link
Contributor Author

mimmi20 commented May 31, 2017

PHPUnit 4.8 had hit its end of support in the year 2015 (as I remember). It should be possible to use newer versions of PHPUnit on newer versions of PHP.

@maxjacobson
Copy link
Contributor

Thanks for explaining. Just to be clear, though, does this change affect users of the php test reporter?

Copy link
Contributor

@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.

👍

phpunit.xml.dist Outdated
@@ -2,15 +2,19 @@

<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
Copy link
Contributor

@localheinz localheinz May 31, 2017

Choose a reason for hiding this comment

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

How about referencing the schema by a relative URL?

-xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/5.7/phpunit.xsd"
+xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"

This way it will always be accurate, regardless of which version of phpunit/phpunit is installed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't know this is possible.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@@ -4,7 +4,7 @@
use CodeClimate\PhpTestReporter\Application;
use Symfony\Component\Console\Tester\ApplicationTester;

class ApplicationTest extends \PHPUnit_Framework_TestCase
class ApplicationTest extends \PHPUnit\Framework\TestCase
Copy link
Contributor

Choose a reason for hiding this comment

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

@localheinz
Copy link
Contributor

@maxjacobson

No, this only affects contributors, not users!

composer.json Outdated
@@ -28,7 +28,7 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0.0",
"phpunit/phpunit": "^4.8.31"
"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

One more thing, how about making it more obvious which minor versions we are fine with?

-"phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0"
+"phpunit/phpunit": "^4.8.35 || ^5.7.0 || ^6.0.0"

This way it is very accurately documented.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Contributor

@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.

Very nice, let's ship it!

@maxjacobson
Copy link
Contributor

👍 feel free to squash and merge @localheinz

@localheinz localheinz merged commit 8093f0e into codeclimate:master Jun 1, 2017
@localheinz
Copy link
Contributor

Thank you, @mimmi20!

@mimmi20 mimmi20 deleted the update-phpunit branch June 1, 2017 21:16
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.

4 participants