Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[RFC][PHPUnitBridge] Cross compatibility between PHPUnit 5 and 6#21668

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
peterrehm wants to merge7 commits intosymfony:2.8frompeterrehm:phpunit-bridge
Closed

[RFC][PHPUnitBridge] Cross compatibility between PHPUnit 5 and 6#21668

peterrehm wants to merge7 commits intosymfony:2.8frompeterrehm:phpunit-bridge

Conversation

@peterrehm
Copy link
Contributor

@peterrehmpeterrehm commentedFeb 18, 2017
edited
Loading

QA
Branch?2.8
Bug fix?no
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#21125
LicenseMIT
Doc PR-

Based on#21221. /cc@Jean85.
First experiment with a FC layer for PHPUnit.

@peterrehmpeterrehm changed the title[WIP][PHPUnitBridge] Cross compatibility between PHPUnit 5 and 6[RFC][PHPUnitBridge] Cross compatibility between PHPUnit 5 and 6Feb 18, 2017
@Taluu
Copy link
Contributor

You should also check that the class you are declaring doesn't exist (and that the bc one exists too).

@peterrehm
Copy link
ContributorAuthor

@Taluu As far as I investigated yesterday that should not be a Problem as composer makes it possible to have multiple classes within the same namespace. And since the FC layer is needed when the namespaceless classes are available that might be a viable solution. But this is more a POC so far to see if this is even possible this way. I am not sure whyclass Test extends \PHPUnit\Util\Test does not work in thedefault.phpt file, I know there is some caching involved in the bridge.

@Jean85
Copy link
Contributor

Thanks for this PR!

Unfortunately, this kind of approach was prev. rejected, seethis comment:

[...] but the PhpUnit namespace is not our vendor, so me must not get there. An example of a nasty side effect of using class_alias: phpunit 6 would behave differently when doing class_exists('PHPUnit_Util_ErrorHandler') with or without the bridge.

PS: you should add#21125 as a fixed ticket.

@peterrehm
Copy link
ContributorAuthor

Mhm, then I can only think of making a bridge version which is only PHPUnit 6 compatible or move the FC layer to a separate repository.

As I understood@nicolas-grekas in#21663 such change as this can anyway go only into 3.3?

@Jean85
Copy link
Contributor

In my PR I wrote the FC layer in the Bridge. The FC classes expanded PHPUnit's.

@peterrehm
Copy link
ContributorAuthor

But this breaks the Interface and I think that is waht you were stuck with?

@Jean85
Copy link
Contributor

Yes, you're right. I think that is the current impasse.

@nicolas-grekas
Copy link
Member

Closing on favor of#21694

@peterrehmpeterrehm deleted the phpunit-bridge branchFebruary 21, 2017 10:10
nicolas-grekas added a commit that referenced this pull requestFeb 21, 2017
This PR was merged into the 3.3-dev branch.Discussion----------[Bridge/PhpUnit] Add PHPUnit 6 support| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#21125| License       | MIT| Doc PR        | -This PR makes our phpunit bridge compatible with all namespaced versions of phpunit, from 4.8.35 to 6.It takes another approach than#21668 and#21221, thus replaces them.Tested locally : tests pass when using phpunit 5.7, and fails with v6.0 because our own test suite is not yet compatible with it - but at least it runs nice.If this were handled as usual Symfony component, we would consider some changes to be BC breaks. But in this specific case - a phpunit bridge - it makes no sense to me to apply the bc policy here. I added `@final` and `@internal` annotations to make this clearer.Commits-------9e0745c [Bridge/PhpUnit] Add PHPUnit 6 support
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@peterrehm@Taluu@Jean85@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp