use namespaced PHPUnit and keep B.C.#55
Conversation
Psr/Log/Test/LoggerInterfaceTest.php
Outdated
|
|
||
| namespace Psr\Log\Test; | ||
|
|
||
| if (!class_exists('\\PHPUnit_Framework_TestCase', true)) { |
There was a problem hiding this comment.
This does not make sense. You are creating an alias only when the old name does not exist (i.e. in PHPUnit 6+) while you use only the new name.
There was a problem hiding this comment.
Sorry, my bad...
I fixed it. Could you review it again?
|
currently, the repo does not have a So I suggest either keeping this alias out (PHPUnit namespaced classes are available in 4.8.35+, 5.4+ and 6+) or excluding tests from the archive. @Seldaek what do you think ? |
|
IMO at this point we could merge it without the alias.. This only affects implementors of the PSR which isn't a whole lot of people. |
Psr/Log/Test/LoggerInterfaceTest.php
Outdated
|
|
||
| namespace Psr\Log\Test; | ||
|
|
||
| if (!class_exists('\\PHPUnit\\Framework\\TestCase', true)) { |
There was a problem hiding this comment.
Class names in PHP shouldn't have the leading slash when written in a string. The implementation of class_exist effectively does an ltrim to remove that slash before continuing. The reason why you might see leading slashes is when the ::class notation is used, because then we are resolving names relative to the current namespace.
|
Looks good to me now, @stof is the new alias ok or does your comment above still apply regarding IDE confusion? |
This is an alternate solution to #52