Skip to content

Updated PHPUnit namespaces #21663

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

Closed
wants to merge 3 commits into from
Closed

Updated PHPUnit namespaces #21663

wants to merge 3 commits into from

Conversation

peterrehm
Copy link
Contributor

Q A
Branch? 2.8
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Follow Up of #21564

@peterrehm peterrehm changed the base branch from master to 2.8 February 18, 2017 17:44

/**
* Collects and replays skipped tests.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
class SymfonyTestsListener extends \PHPUnit_Framework_BaseTestListener
class SymfonyTestsListener extends BaseTestListener
Copy link
Member

Choose a reason for hiding this comment

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

I think the bridge should not be updated to namespaces - only on master we should do that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

How about requiring a proper PHPUnit version? Actually the issue will be that PHPUnit < 5.7 does have another FC layer than 4.8. If we go that route we should enforce 4.8.35, 5.7 or 6

Copy link
Member

Choose a reason for hiding this comment

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

there is already a conflict rule, should be enough, isnt'it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but we need to make it stricter. With my attempt in #21668 we might be able to make the bridge compatible with 4.8.35, 5.7 and 6.* It would be great if you could have a look, some tweaks are still needed.

Copy link
Member

@nicolas-grekas nicolas-grekas Feb 19, 2017

Choose a reason for hiding this comment

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

What will using namespaces here provide at all on 2.8?
The bridge before 3.3 is still incompatible with phpunit 6 - using namespaces will only forbid its use with namespace-incompatible versions of phpunit.
#21668 is unrelated - it's only for master.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reverted as per your wish.

@nicolas-grekas nicolas-grekas added this to the 2.8 milestone Feb 19, 2017
@@ -12,6 +12,7 @@
namespace Symfony\Bridge\PhpUnit;

use Doctrine\Common\Annotations\AnnotationRegistry;
use PHPUnit\Framework\TestCase;
Copy link
Member

Choose a reason for hiding this comment

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

should be reverted for the same reasons as the previous

@peterrehm
Copy link
Contributor Author

Updated

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

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

👍

@nicolas-grekas
Copy link
Member

Thank you @peterrehm.

nicolas-grekas added a commit that referenced this pull request Feb 20, 2017
This PR was squashed before being merged into the 2.8 branch (closes #21663).

Discussion
----------

Updated PHPUnit namespaces

| Q             | A
| ------------- | ---
| Branch?       | 2.8
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Follow Up of #21564

Commits
-------

205ced4 Updated PHPUnit namespaces
@nicolas-grekas
Copy link
Member

Same on 3.2 and master now?

@peterrehm peterrehm deleted the phpunit branch February 20, 2017 13:27
@peterrehm
Copy link
Contributor Author

PR for 3.2 just provided. Once this is okay and merged I will look into master.

nicolas-grekas added a commit that referenced this pull request Feb 20, 2017
This PR was merged into the 3.2 branch.

Discussion
----------

Updated PHPUnit namespaces

| Q             | A
| ------------- | ---
| Branch?       | 3.2
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Follow Up of #21663

Commits
-------

c2e80e3 Updated PHPUnit namespaces
@kobelobster
Copy link
Contributor

One question @nicolas-grekas - When will this PR be merged and for which release is it planned? I saw that the 2.8.18 has been released today, so the next release will probably be in a month? Will this PR be also in the next release? Thanks!

@nicolas-grekas
Copy link
Member

@tzfrs this is already released as part of 2.8.18

@kobelobster
Copy link
Contributor

Ah, I misunderstood the release page then
http://symfony.com/blog/symfony-2-8-18-released

Because it doesn't say here that this PR is included. Also, this PR is just closed and not merged, so I assumed it hasn't been integrated yet.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Mar 6, 2017

That's because it's labelled as a "minor" - thus not listed in the changelog. If you look just above your previous comment, you'll see this has bee merged as commit 13983d9

@kobelobster
Copy link
Contributor

kobelobster commented Mar 6, 2017

Ah okay thanks. However, I still get errors because of some code in the phpunit-bridge, but I saw you wrote here: #21694 (comment) that there is no plan of making 2.8 compatible with PhpUnit 6, right? So how would I use Symfony 2.8 with PhpUnit 6.0. Isn't it possible at this time and never will?

@xabbuh
Copy link
Member

xabbuh commented Mar 6, 2017

@tzfrs It's just the PhpUnitBridge for which you need to require the latest versions (~3.3@dev currently). The rest of the Symfony code base should work with PHPUnit 6. Requiring the bridge in another version is not an issue as it is not installed automatically when you depend on symfony/symfony.

@kobelobster
Copy link
Contributor

Ah okay, thought I need it to have it at the same version as symfony. Ty.

@xabbuh
Copy link
Member

xabbuh commented Mar 6, 2017

The bridge is a bit special here. By the way, we also use the latest version of the bridge to run tests for Symfony on all branches. And that does work. ;)

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.

5 participants