8000 composer is available in travis workers by bamarni · Pull Request #5548 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

composer is available in travis workers #5548

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
Sep 20, 2012
Merged

composer is available in travis workers #5548

merged 1 commit into from
Sep 20, 2012

Conversation

bamarni
Copy link
Contributor
@bamarni bamarni commented Sep 19, 2012

No description provided.

@@ -6,7 +6,6 @@ php:
- 5.4

before_script:
- curl -s http://getcomposer.org/installer | php
- COMPOSER_ROOT_VERSION=dev-master php composer.phar --dev install
- composer --dev install
Copy link
Contributor

Choose a reason for hiding this comment

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

missing the COMPOSER_ROOT env variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

why is it needed? this PR is not even against master :)

Copy link
Contributor

Choose a reason for hiding this comment

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

Some composer bug, cant remember precisely why. But it should be left there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

let's wait for a review then, if the bug is still there that's probably not the good fix anymore as this is not the master branch

Copy link
Contributor

Choose a reason for hiding this comment

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

this ensures that even in branches from master it will consider the installed version as "dev-master", which is necessary f.e. for cyclic dependencies

Copy link
Member

Choose a reason for hiding this comment

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

And it's not a composer bug per se. It's a side effect of all the auto-versioning magic and we can't really fix it, but given it only affects a few packages it sounds worth the benefits.

@bamarni
Copy link
Contributor Author
bamarni commented Sep 19, 2012

reverted

@stof
Copy link
Member
stof commented Sep 19, 2012

btw, in the 2.1 branch, the COMPOSER_ROOT_VERSION varaible should be set to 2.1.x-dev

@bamarni
Copy link
Contributor Author
bamarni commented Sep 19, 2012

@stof: ok, btw I don't understand the issue, deps are solvable without this, is it a workaround to make this package known as 2.1 even though it's not guessable with the branch name (eg. when using a feature branch for a PR)? I thought this was handled by the branch-alias.

@stof
Copy link
Member
stof commented Sep 19, 2012

@bamarni It is solvable in some cases but not in all of them. Sometimes, when being in a detached head (which is the case when Travis builds PRs), the guessing of the composer root version does not work, and so symfony dev deps depending on some symfony components (Doctrine) will fail because the guessed version would not match 2.* (which is the Doctrine requirement for the components).

branch aliases have nothing to do with the guessing of the version for the root package.

@stof
Copy link
Member
stof commented Sep 19, 2012

btw, the only cases where COMPOSER_ROOT_VERSION could be needed is when some of your dependencies have a requirement on your root package. Otherwise, the root version is never needed by composer to resolve deps

@bamarni
Copy link
Contributor Author
bamarni commented Sep 19, 2012

@stof: in detached head indeed the version can't be guessed with git, so this change avoid potential issues with reciprocal dependencies (I guess it can also be solved by specifying a "version" in composer.json).

But I still don't get why you say branch aliases have nothing to do with the root package version, isn't the purpose of a "2.1-dev" branch-alias to be matched when specifying this package as a dependency with 2.1.*, no matter the branch name or if git is in detached head?

@stof
Copy link
Member
stof commented Sep 19, 2012

@bamarni a branch alias is about the aliasing the version of a branch. Look at how it is written. It tells composer that for Symfony, the dev-master version (so the master branch) should receive an alias 2.2.x-dev.
This alias will never help you if your root version cannot be guessed as being dev-master.

@bamarni
Copy link
Contributor Author
bamarni commented Sep 19, 2012

ahh... in my mind branch alias was only an alias for the current branch, I forgot that it was a 'branch => alias' map, indeed in that case it can't help at all.

thx for the explanations ;)

fabpot added a commit that referenced this pull request Sep 20, 2012
Commits
-------

589a8b3 composer is available in travis workers

Discussion
----------

composer is available in travis workers

---------------------------------------------------------------------------

by bamarni at 2012-09-19T09:07:30Z

reverted

---------------------------------------------------------------------------

by stof at 2012-09-19T09:59:21Z

btw, in the 2.1 branch, the ``COMPOSER_ROOT_VERSION`` varaible should be set to ``2.1.x-dev``

---------------------------------------------------------------------------

by bamarni at 2012-09-19T14:44:48Z

@stof: ok, btw I don't understand the issue, deps are solvable without this, is it a workaround to make this package known as 2.1 even though it's not guessable with the branch name (eg. when using a feature branch for a PR)? I thought this was handled by the branch-alias.

---------------------------------------------------------------------------

by stof at 2012-09-19T15:54:05Z

@bamarni It is solvable in some cases but not in all of them. Sometimes, when being in a detached head (which is the case when Travis builds PRs), the guessing of the composer root version does not work, and so symfony dev deps depending on some symfony components (Doctrine) will fail because the guessed version would not match ``2.*`` (which is the Doctrine requirement for the components).

branch aliases have nothing to do with the guessing of the version for the root package.

---------------------------------------------------------------------------

by stof at 2012-09-19T15:55:25Z

btw, the only cases where COMPOSER_ROOT_VERSION could be needed is when some of your dependencies have a requirement on your root package. Otherwise, the root version is never needed by composer to resolve deps

---------------------------------------------------------------------------

by bamarni at 2012-09-19T16:52:52Z

@stof: in detached head indeed the version can't be guessed with git, so this change avoid potential issues with reciprocal dependencies (I guess it can also be solved by specifying a "version" in composer.json).

But I still don't get why you say branch aliases have nothing to do with the root package version, isn't the purpose of a "2.1-dev" branch-alias to be matched when specifying this package as a dependency with 2.1.*, no matter the branch name or if git is in detached head?

---------------------------------------------------------------------------

by stof at 2012-09-19T18:59:13Z

@bamarni a **branch** alias is about the aliasing the version of a branch. Look at how it is written. It tells composer that for Symfony, the ``dev-master`` version (so the master branch) should receive an alias ``2.2.x-dev``.
This alias will never help you if your root version cannot be guessed as being ``dev-master``.

---------------------------------------------------------------------------

by bamarni at 2012-09-19T20:43:19Z

ahh... in my mind branch alias was only an alias for the current branch, I forgot that it was a 'branch => alias' map, indeed in that case it can't help at all.

thx for the explanations ;)
@fabpot fabpot merged commit 589a8b3 into symfony:2.1 Sep 20, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
0