Skip to content

[Bridge/PhpUnit] fix installation path #25068

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
Nov 21, 2017

Conversation

nicolas-grekas
Copy link
Member

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

Fixes yesterdays's work on the bridge, tricky one...

@nicolas-grekas nicolas-grekas added this to the 3.4 milestone Nov 21, 2017
passthru("$COMPOSER require --no-update symfony/phpunit-bridge \"*\"");
if (file_exists($path)) {
if (file_exists($path = $root.'/vendor/symfony/phpunit-bridge')) {
passthru("$COMPOSER require --no-update symfony/phpunit-bridge \"*@dev\"");
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this install a dev version even if a stable version is installed in the project?

Copy link
Member Author

Choose a reason for hiding this comment

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

When the "path" repo is used, the package there is at version "dev-master"
since that's the one we really want to install, we have to put this.

@nicolas-grekas nicolas-grekas merged commit bd4fe8d into symfony:3.4 Nov 21, 2017
nicolas-grekas added a commit that referenced this pull request Nov 21, 2017
This PR was merged into the 3.4 branch.

Discussion
----------

[Bridge/PhpUnit] fix installation path

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

Fixes yesterdays's work on the bridge, tricky one...

Commits
-------

bd4fe8d [Bridge/PhpUnit] fix installation path
@nicolas-grekas nicolas-grekas deleted the phpunit-fix branch November 21, 2017 09:25
if (file_exists($path.'/vendor/symfony/phpunit-bridge/composer.json')) {
$path .= '/vendor/symfony/phpunit-bridge';
$root = __DIR__;
while (!file_exists($root.'/composer.json') || file_exists($root.'/bin/simple-phpunit')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

@fbourigault do you know what the second part of the if is about?

Copy link
Contributor

Choose a reason for hiding this comment

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

We are going up in directories until we find a composer.json or a bin/simple-phpunit. IMHO this is a special case for Symfony monolithic repository.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for answering, I got it straight from the horse's mouth in the meantime but forgot I asked you.

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