Skip to content

Add no-interaction for SYMFONY_PHPUNIT_REQUIRE on prophecy #42073

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 26, 2021

Conversation

alexander-schranz
Copy link
Contributor

@alexander-schranz alexander-schranz commented Jul 12, 2021

Q A
Branch? 5.3
Bug fix? no
New feature? no
Deprecations? no
Tickets Fix #...
License MIT
Doc PR symfony/symfony-docs#...

Add no-interaction for SYMFONY_PHPUNIT_REQUIRE on prophecy

Currently if you have for example the following configuration phpunit.xml.dist:

<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
<server name="SYMFONY_PHPUNIT_REQUIRE" value="phpspec/prophecy-phpunit"/>

It will ask if you really wanted to add phpspec/prophecy-phpunit as requirement, or if you want to keep it as dev dependency. To avoid this question and just install the dependency as defined I would add here the no-interaction flag.

Bildschirmfoto 2021-07-12 um 20 27 26

2 questions are currently asked when adding phpspec/prophecy-phpunit.

@carsonbot carsonbot added this to the 5.3 milestone Jul 12, 2021
@yoannrenard
Copy link
Contributor

yoannrenard commented Jul 13, 2021

What do you think about adding a force="true" parameter instead as we can do when setting APP_ENV for instance.
I don't actually know how this works but it would probably look more explicit.

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Jul 13, 2021

4.4 might benefit from that too isn't it?
Meanwhile, you can (and propably should) set COMPOSER_NO_INTERACTION=1 in CI jobs.

@alexander-schranz
Copy link
Contributor Author

alexander-schranz commented Jul 13, 2021

@nicolas-grekas the SYMFONY_PHPUNIT_REQUIRE was introduced in 5.3 and so not part of 4.4.

@yoannrenard the force parameter has another meaning in the phpunit xml this forces the env if a real env is set.

@alexander-schranz
Copy link
Contributor Author

Another way I thought to remove the whole require-dev part of the installed phpunit version. Then also the composer require would not throw any warning, and so phpunit dev dependencies would not have any effects.

@nicolas-grekas
Copy link
Member

Thank you @alexander-schranz.

@nicolas-grekas nicolas-grekas merged commit 85d3708 into symfony:5.3 Aug 26, 2021
@alexander-schranz alexander-schranz deleted the patch-9 branch August 26, 2021 14:10
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.

4 participants