8000 [PhpUnitBridge] Properly handle phpunit arguments for configuration file by biozshock · Pull Request #34808 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[PhpUnitBridge] Properly handle phpunit arguments for configuration file #34808

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
Jan 30, 2020

Conversation

biozshock
Copy link
Contributor
@biozshock biozshock commented Dec 4, 2019
Q A
Branch? 4.3
Bug fix? yes
New feature? no
Deprecations? no
License MIT

PhpUnitBridge should properly parse cli arguments for configuration file.
After fixing #34300 the PhpUnitBridge stopped recognizing short -c option.
Also original PHPUnit allows to pass a directory as configuration parameter and read from either phpunit.xml or phpunit.xml.dist

@biozshock biozshock force-pushed the phpunit-bridge-arguments branch 2 times, most recently from 95e72b7 to 841d9ba Compare December 4, 2019 10:32
@biozshock biozshock changed the base branch from 4.4 to 4.3 December 4, 2019 10:32
@nicolas-grekas nicolas-grekas added this to the 4.3 milestone Dec 4, 2019
@nicolas-grekas
Copy link
Member
nicolas-grekas commented Dec 4, 2019

/cc @ro0NL maybe?

@biozshock, please mind the CI failures.
actually not!! this file uses a specific code style, you can ignore fabbot :)

@ro0NL
Copy link
Contributor
ro0NL commented Dec 4, 2019

After fixing #34300 the PhpUnitBridge stopped recognizing short -c option.

how did it regognize -c before then? AFAIK #34300 / #34305 was exactly about supporting that. Though maybe im missing it.. as i only considered the usecase from PhpStorm's perspectivice which invokes using --configuration /project/phpunit.xml.dist (the path i configured).

Also original PHPUnit allows to pass a directory as configuration parameter and read from either phpunit.xml or phpunit.xml.dist

👍

$phpunitConfigFilename = null;
if (INF !== $opt && isset($opts[$opt - 1])) {
$phpunitConfigFilename = $opts[$opt - 1];

This comment was marked as resolved.

@biozshock
Copy link
Contributor Author
biozshock commented Dec 4, 2019

how did it regognize -c before then? AFAIK #34300 / #34305 was exactly about supporting that. Though maybe im missing it.. as i only considered the usecase from PhpStorm's perspectivice which invokes using --configuration /project/phpunit.xml.dist (the path i configured).

It was recognizing -c path/phpunit.xml which not supported by PHPUnit, because notation is not GetOpt compatible.

@biozshock
Copy link
Contributor Author

is it good to be merged, or i need to fix something here?
/cc @ro0NL @nicolas-grekas

Copy link
Contributor
@ro0NL ro0NL left a comment

Choose a reason for hiding this comment

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

works for me :) (phpstorm integration as described in #34300 is still OK 👍 )

@biozshock
Copy link
Contributor Author

@nicolas-grekas is there anything else need to be done before merging this into next release?

@fabpot
Copy link
Member
fabpot commented Jan 30, 2020

Thank you @biozshock.

fabpot added a commit that referenced this pull request Jan 30, 2020
…iguration file (biozshock)

This PR was merged into the 4.3 branch.

Discussion
----------

[PhpUnitBridge] Properly handle phpunit arguments for configuration file

| Q             | A
| ------------- | ---
| Branch?       | 4.3
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| License       | MIT

PhpUnitBridge should properly parse cli arguments for configuration file.
After fixing #34300 the PhpUnitBridge stopped recognizing short `-c` option.
Also original PHPUnit allows to pass a directory as configuration parameter and read from either phpunit.xml or phpunit.xml.dist

Commits
-------

a7a5885 Properly handle phpunit arguments for configuration file
@fabpot fabpot merged commit a7a5885 into symfony:4.3 Jan 30, 2020
This was referenced Jan 31, 2020
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
< 2A24 footer class="footer pt-8 pb-6 f6 color-fg-muted p-responsive" role="contentinfo" >

Footer

© 2025 GitHub, Inc.
0