Skip to content

Use namespaced Phpunit classes #32941

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

Merged
merged 1 commit into from
Aug 5, 2019
Merged

Conversation

jderusse
Copy link
Member

@jderusse jderusse commented Aug 5, 2019

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? need #32940
Fixed tickets #32844
License MIT
Doc PR NA

This PR simplify tests by using PhpUnit namespace introduced in #32940
It also makes compatible with PHPUnit 8 (removed class PHPUnit_Framework_MockObject_MockObject)

@jderusse jderusse changed the title WIP Use namespaced Phpunit classes Use namespaced Phpunit classes Aug 5, 2019
.travis.yml Outdated
@@ -201,7 +201,7 @@ install:
# To run a PR with a patched phpunit-bridge, first submit the path for the
# phpunit-bridge as a separate PR against the next feature-branch then
# uncomment and update the following line with that PR number
#SYMFONY_PHPUNIT_BRIDGE_PR=32886
SYMFONY_PHPUNIT_BRIDGE_PR=32940
Copy link
Member Author

Choose a reason for hiding this comment

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

must be reverted before merging

@jderusse jderusse force-pushed the deprec_namespace branch 6 times, most recently from 6b16fe3 to 8675a53 Compare August 5, 2019 11:04
@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Aug 5, 2019
@jderusse jderusse force-pushed the deprec_namespace branch 9 times, most recently from bd9f3ae to dfcc04a Compare August 5, 2019 12:40
nicolas-grekas added a commit that referenced this pull request Aug 5, 2019
…erusse)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] Add polyfill for PhpUnit namespace

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

This PR provides PhpUnit >= 6 Namespaces class.

This will simplify tests that have to be compatible with multiple version of PHPUnit

```diff
- if (class_exists('PHPUnit_Foo')) {
-   PHPUnit_Foo::bar():
- } else {
-   \PHPUnit\Foo::bar();
- }
+ \PHPUnit\Foo::bar();
```

WIP  => waiting for #32941 to be green

Commits
-------

b7520f7 Add polyfill for PhpUnit namespace
@nicolas-grekas
Copy link
Member

Thank you @jderusse.

@nicolas-grekas nicolas-grekas merged commit 797ea2e into symfony:3.4 Aug 5, 2019
nicolas-grekas added a commit that referenced this pull request Aug 5, 2019
This PR was squashed before being merged into the 3.4 branch (closes #32941).

Discussion
----------

Use namespaced Phpunit classes

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | need #32940
| Fixed tickets | #32844
| License       | MIT
| Doc PR        | NA

This PR simplify tests by using PhpUnit namespace introduced in #32940
It also makes compatible with PHPUnit 8 (removed class PHPUnit_Framework_MockObject_MockObject)

Commits
-------

797ea2e Use namespaced Phpunit classes
@jderusse jderusse deleted the deprec_namespace branch August 8, 2019 11:36
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.

3 participants