-
Notifications
You must be signed in to change notification settings - Fork 889
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
Support PHPUnit 6 #1238
Support PHPUnit 6 #1238
Conversation
@@ -7,8 +7,9 @@ | |||
use Symfony\Component\Console\Input\InputDefinition; | |||
use Symfony\Component\Console\Input\InputInterface; | |||
use Symfony\Component\Console\Input\InputOption; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting Symfony\Component\Console\Input\InputOption
@@ -3,13 +3,14 @@ | |||
namespace Test\Phinx\Config; | |||
|
|||
use \Phinx\Config\Config; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting \Phinx\Config\Config
tests/Phinx/Config/ConfigPhpTest.php
Outdated
@@ -3,13 +3,14 @@ | |||
namespace Test\Phinx\Config; | |||
|
|||
use \Phinx\Config\Config; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting \Phinx\Config\Config
@@ -3,13 +3,14 @@ | |||
namespace Test\Phinx\Config; | |||
|
|||
use \Phinx\Config\Config; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting \Phinx\Config\Config
@@ -12,13 +12,14 @@ | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
use Symfony\Component\Console\Output\StreamOutput; | |||
use Symfony\Component\Console\Tester\CommandTester; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting Symfony\Component\Console\Tester\CommandTester
@@ -7,6 +7,7 @@ | |||
use Phinx\Db\Table\Index; | |||
use Symfony\Component\Console\Input\ArrayInput; | |||
use Symfony\Component\Console\Output\NullOutput; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting Symfony\Component\Console\Output\NullOutput
@@ -8,8 +8,9 @@ | |||
use Symfony\Component\Console\Input\InputOption; | |||
use Symfony\Component\Console\Output\BufferedOutput; | |||
use Symfony\Component\Console\Output\NullOutput; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting Symfony\Component\Console\Output\NullOutput
@@ -8,8 +8,9 @@ | |||
use Symfony\Component\Console\Input\InputOption; | |||
use Symfony\Component\Console\Output\BufferedOutput; | |||
use Symfony\Component\Console\Output\NullOutput; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting Symfony\Component\Console\Output\NullOutput
@@ -5,8 +5,9 @@ | |||
use Phinx\Db\Adapter\SqlServerAdapter; | |||
use Symfony\Component\Console\Input\ArrayInput; | |||
use Symfony\Component\Console\Output\NullOutput; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting Symfony\Component\Console\Output\NullOutput
@@ -9,8 +9,9 @@ | |||
use Symfony\Component\Console\Input\InputInterface; | |||
use Symfony\Component\Console\Output\OutputInterface; | |||
use Symfony\Component\Console\Output\StreamOutput; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting Symfony\Component\Console\Output\StreamOutput
@@ -8,13 +8,14 @@ | |||
use Phinx\Console\PhinxApplication; | |||
use Phinx\Migration\Manager; | |||
use PHPUnit_Framework_MockObject_MockObject; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting PHPUnit_Framework_MockObject_MockObject
@@ -8,13 +8,14 @@ | |||
use Phinx\Console\PhinxApplication; | |||
use Phinx\Migration\Manager; | |||
use PHPUnit_Framework_MockObject_MockObject; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting PHPUnit_Framework_MockObject_MockObject
@@ -8,13 +8,14 @@ | |||
use Phinx\Console\PhinxApplication; | |||
use Phinx\Migration\Manager; | |||
use PHPUnit_Framework_MockObject_MockObject; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting PHPUnit_Framework_MockObject_MockObject
@@ -8,13 +8,14 @@ | |||
use Phinx\Console\PhinxApplication; | |||
use Phinx\Migration\Manager; | |||
use PHPUnit_Framework_MockObject_MockObject; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting PHPUnit_Framework_MockObject_MockObject
@@ -8,13 +8,14 @@ | |||
use Phinx\Console\PhinxApplication; | |||
use Phinx\Migration\Manager; | |||
use PHPUnit_Framework_MockObject_MockObject; | |||
use PHPUnit\Framework\TestCase; |
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.
Use classes must be in alphabetical order. Was expecting PHPUnit_Framework_MockObject_MockObject
The leading \ for the other use statements is wrong and should be removed. |
Codecov Report
@@ Coverage Diff @@
## master #1238 +/- ##
=======================================
Coverage 74.61% 74.61%
=======================================
Files 35 35
Lines 4735 4735
=======================================
Hits 3533 3533
Misses 1202 1202 Continue to review full report at Codecov.
|
I've added PHPUnit 6 support. This will help us test against PHP 7.2, that the I added a |
@@ -30,7 +30,7 @@ | |||
"symfony/yaml": "~2.8|~3.0|~4.0" | |||
}, | |||
"require-dev": { | |||
"phpunit/phpunit": "^4.8.26|^5.0", | |||
"phpunit/phpunit": "^4.8.35|^5.7|^6.5", |
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.
Is it easier at some point if we would stop supporting completely outdated php version 5.4 and e.g. use 5.6+ instead?
Then we could drop 4.8 here probably at least.
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.
It's up to you. I've made everything to support all PHP
and PHPUnit
versions. But, I can open other PR dropping PHP 5.4
and 5.5
support 👨💻
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.
For now its cool then :)
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.
Gonna work on stop supporting for PHP 5.4
and 5.5
versions soo.
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.
I meant you dont have to. If all works fine :)
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.
Ahh, okay, sorry 😅
I use the
PHPUnit\Framework\TestCase
notation instead ofPHPUnit_Framework_TestCase
while extending our TestCases. This will help us migrate to PHPUnit 6, that no longer support snake case class names.I just need to bump PHPUnit version to
^4.8.35
and^5.7
, that support this namespace.