-
-
Notifications
You must be signed in to change notification settings - Fork 26
Added support for phpunit 9 #19
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,15 +9,15 @@ | |
| } | ||
| ], | ||
| "require": { | ||
| "php": "^7.2", | ||
| "php": "^7.2 || ^7.3", | ||
| "flow/jsonpath": "^0.5.0", | ||
| "justinrainbow/json-schema": "^5.0" | ||
| }, | ||
| "conflict": { | ||
| "phpunit/phpunit": "<8.0 || >= 9.0" | ||
| "phpunit/phpunit": "<8.0 || >= 10.0" | ||
| }, | ||
| "require-dev": { | ||
| "phpunit/phpunit": "^8.0" | ||
| "phpunit/phpunit": "^8.0 || ^9.0" | ||
| }, | ||
| "autoload": { | ||
| "psr-4": { | ||
|
|
@@ -26,7 +26,6 @@ | |
| }, | ||
| "autoload-dev": { | ||
| "files": [ | ||
| "vendor/phpunit/phpunit/src/Framework/Assert/Functions.php", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The functional interface is still alive and well in PHPUnit 9. I don't see the need for removing this include and rewriting the tests in the later files. Can you share your thoughts on why this change was necessary? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I removed the autoloading as the file was autoloaded twice and so it threw a redeclaration exception. I now imported the functions in the unit test suites to make use of the functional interface. I hope this is fine for you. |
||
| "src/Functions.php" | ||
| ] | ||
| }, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not necessary;
^7.2already translates to>= 7.2 && < 8.0There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right. I am used to gracefully update dependencies in libraries due to backwards compatibility, but this is not necessary here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upon further inspection, I do think it is necessary as with this notation we still allow users with PHP 7.2 to make use of this package with PHPUnit 8, from 7.3 PHPUnit 9 is needed (as it is the minimum requirement).