-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Update to PHPUnit namespaces #21564
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
Update to PHPUnit namespaces #21564
Changes from all commits
a3eb47f
5aa18fc
0d0e886
bc7ce67
cfb6107
fa3de4a
211c7dc
500cd4b
2fb207b
6b4544e
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 |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
use Doctrine\Common\Annotations\AnnotationReader; | ||
use Doctrine\ORM\Mapping\Driver\AnnotationDriver; | ||
use Doctrine\ORM\EntityManager; | ||
use PHPUnit\Framework\TestCase; | ||
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. Actually, with the constraint 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.
What it really means is that we want PHPUnit 4.8.35 (the last version of PHPUnit 4) or a PHPUnit>=5.4.3 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. We actually don't want 5.4.3, as the namespace was not the same (lowercase vs not lowercase). Use the first version using the 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. @stof Actually we want 5.4.3 as this is the first one with the correct namespace (https://github.com/sebastianbergmann/phpunit/blob/5.4.3/src/ForwardCompatibility/TestCase.php#L11). 5.4.2 had the lowercase one. https://github.com/sebastianbergmann/phpunit/blob/5.4.3/src/ForwardCompatibility/TestCase.php#L11 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. ah indeed. What requires newer versions is the compat layer for more PHPUnit classes (which is only in 4.8.35 and 5.7). But I think this concerns only the bridge. 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. Yes, I wanted to look into this once this is merged. But so far it is pending. |
||
|
||
/** | ||
* Provides utility functions needed in tests. | ||
|
@@ -30,7 +31,7 @@ class DoctrineTestHelper | |
public static function createTestEntityManager() | ||
{ | ||
if (!extension_loaded('pdo_sqlite')) { | ||
\PHPUnit_Framework_TestCase::markTestSkipped('Extension pdo_sqlite is required.'); | ||
TestCase::markTestSkipped('Extension pdo_sqlite is required.'); | ||
} | ||
|
||
$config = new \Doctrine\ORM\Configuration(); | ||
|
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 change is not necessary. The issue with the failing tests is that the PhpUnitBridge itself checks whether or not it needs an update. However, this doesn't work here as the
simple-phpunit
file is part of the bridge installed as a vendor library.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 still is necessary I think to trigger a phpunit cache invalidation on appveyor.