Skip to content
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

[PhpUnitBridge] Allow sutFqcnResolver to return array #32902

Merged
merged 1 commit into from Aug 4, 2019
Merged

[PhpUnitBridge] Allow sutFqcnResolver to return array #32902

merged 1 commit into from Aug 4, 2019

Conversation

VincentLanglet
Copy link
Contributor

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

Phpunit handle multiple covers annotation:

/**
 * @covers ClassOne
 * @covers ClassTwo
 */

The coverage solver was only allowed to return ClassOne or ClassTwo since it was transformed to [ClassName]. Returning [ClassOne, ClassTwo] was transform to [[ClassOne, ClassTwo]]` which was creating an error with phpunit. This PR fixed this case.

@nicolas-grekas
Copy link
Member

can you revert the array() => [] changes please?

@nicolas-grekas nicolas-grekas changed the title Fix: Allow sutFqcnResolver to return array [PhpUnitBridge] Allow sutFqcnResolver to return array Aug 3, 2019
@VincentLanglet
Copy link
Contributor Author

can you revert the array() => [] changes please?

Yes, but I had an error from symfony linter

@nicolas-grekas
Copy link
Member

I had an error from symfony linter

I know, it's just a tool, and as all tools it has its limits, this is one of them :)

@nicolas-grekas
Copy link
Member

Thank you @VincentLanglet.

@nicolas-grekas nicolas-grekas merged commit 1451c0b into symfony:3.4 Aug 4, 2019
nicolas-grekas added a commit that referenced this pull request Aug 4, 2019
…centLanglet)

This PR was merged into the 3.4 branch.

Discussion
----------

[PhpUnitBridge] Allow sutFqcnResolver to return array

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

Phpunit handle multiple covers annotation:
```
/**
 * @Covers ClassOne
 * @Covers ClassTwo
 */
```

The coverage solver was only allowed to return `ClassOne` or `ClassTwo` since it was transformed to `[ClassName]`. Returning `[ClassOne, ClassTwo]` was transform to [[ClassOne, ClassTwo]]` which was creating an error with phpunit. This PR fixed this case.

Commits
-------

1451c0b  Allow sutFqcnResolver to return array
@VincentLanglet VincentLanglet deleted the patch-1 branch August 4, 2019 16:14
This was referenced Aug 26, 2019
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.

None yet

3 participants