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

Rely on own phpunit, not one from CI service #1995

Closed
wants to merge 3 commits into from

Conversation

keradus
Copy link
Member

@keradus keradus commented Jun 15, 2016

@SpacePossum
Copy link
Contributor

Thanks so much for picking this up!
I don't know much about the changes you made, I simply don't have the experience :)
I'll try to learn a bit about it, but looks good!

@@ -25,7 +25,8 @@
"sebastian/diff": "~1.1"
},
"require-dev": {
"satooshi/php-coveralls": "0.7.*@dev"
"phpunit/phpunit": "@stable",
Copy link
Contributor

Choose a reason for hiding this comment

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

Wildcards are a bad idea.

Copy link
Contributor

Choose a reason for hiding this comment

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

@stable is exactly the same as *

Copy link
Contributor

Choose a reason for hiding this comment

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

This of course breaks prefer lowest too.

Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps ~4.0|~5.0 will work fine here?

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 for ^4|^5 !

@keradus
Copy link
Member Author

keradus commented Jun 16, 2016

@SpacePossum please temporary merge this PR into your once that has problems with AppVeyor and let see if it will help

- 'if [ "$SYMFONY_VERSION" != "" ]; then sed -i "s/\"symfony\/\([^\"]*\)\": \"[^\"]*\"/\"symfony\/\1\": \"$SYMFONY_VERSION\"/g" composer.json; fi'

install:
- travis_retry composer global require hirak/prestissimo
Copy link
Contributor

Choose a reason for hiding this comment

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

This actually ends up slower surely? It takes just as long to install this globally as it does to install the rest.

Copy link
Contributor

Choose a reason for hiding this comment

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

You mean about the time to insstall this library?

Dependencies for this one is very light, it should not be a problem.

@keradus I would ever say that the travis_retry should not be here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I see no reason to drop it.

Copy link
Contributor

Choose a reason for hiding this comment

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

travis_retry is good for long with no output jobs.

This command would not take more than 10 minutes to execute.

Plus, travis_retry drop the original output of the command, harder to read.

This is as you want, but I suggest you to remove this. 👍

@SpacePossum
Copy link
Contributor

thanks, done over @ #1949 (please note I made changes because that PR targets master, but as a POC it should be useful for now)

@@ -25,7 +25,8 @@
"sebastian/diff": "~1.1"
},
"require-dev": {
"satooshi/php-coveralls": "0.7.*@dev"
"phpunit/phpunit": "^4.5|^5",
Copy link
Contributor

Choose a reason for hiding this comment

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

👎

If we are able to not make it dependents, don't do it.

This will install a lot of dependencies, making composer longer to resolve.

Plus, all developer does not work with vendor/bin/phpunit.

What about directly download the .phar on travis?

Example: https://github.com/sonata-project/dev-kit/blob/a4574f4ff3428bdd89ecf1c2f4f0190227abb250/project/.travis/install_test.sh#L4-L13

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't like fetching some deps by Composer and some not. You don't like it? Cool. You are not enforced to download dev deps.
Composer is nicer way to describe required version. like not supporting 4.1

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like fetching some deps by Composer and some not.

As you want but IMHO, it's more a tool than a "dependency".

You don't like it? Cool. You are not enforced to download dev deps.

Not really true for all projects. Some can require dev packages other than phpunit and we can select which one we want to install.

By installing with composer, you get dependencies described by phpunit, not locked by composer.lock like for .phar. This mean you increase the issue risk to get PHPUnit not working because of a sub-dependency update.

So this is not only a matter of taste for me. 😉

Composer is nicer way to describe required version. like not supporting 4.1

Well, if you not support it, tests will fail. :-)

Copy link
Member Author

Choose a reason for hiding this comment

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

  1. tool could be a dependency
  2. to develop a project you should have a phpunit. you may have global one - cool, but we don't promise that our project is compatible with it.
  3. theoretically, but such an edge case...
  4. it;s better to say "this one will work, you may use it" than "some phpunit could work, we dont know, try, and if it fails - well... we dont know which version works"

Copy link
Contributor

Choose a reason for hiding this comment

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

it;s better to say "this one will work, you may use it" than "some phpunit could work, we dont know, try, and if it fails - well... we dont know which version works"

Or simply rely on the last stable version of PHPUnit. 😉

theoretically, but such an edge case...

Are you talking about the risk to get PHPUnit not working because of a sub-dependency update?

Not such an edge case as you think. 😉

Anyway, at least I have an answer. :-)

@keradus
Copy link
Member Author

keradus commented Jun 16, 2016

So, this fixes AppVeyor bug of #1949 @SpacePossum
(related Travis fail is due to quick cherry-pick without solving conflicts on .travis.yml)

@keradus keradus added this to the v1.11.5 milestone Jun 16, 2016
@SpacePossum
Copy link
Contributor

Indeed, AppVeyor is happy, so 🚢 this :)
(Maybe in some other life I try to figure out want went wrong with the previous setup)

@keradus
Copy link
Member Author

keradus commented Jun 16, 2016

AppVeyor break it's PHPUnit, I remember that it happens once with Travis as well.

@keradus keradus added RTM Ready To Merge and removed RTM Ready To Merge labels Jun 16, 2016
@keradus keradus closed this in feeca5a Jun 17, 2016
@soullivaneuh
Copy link
Contributor

soullivaneuh commented Jun 17, 2016

So no concern about my last comment? #1995 (comment) :-/

FYI, if you made this PR to fix this error: https://ci.appveyor.com/project/keradus/php-cs-fixer/build/dev-2529

Please not this is not related at all. This was an issue from PHPUnit: sebastianbergmann/phpunit#2219

@keradus keradus deleted the 1.11_phpunit branch June 17, 2016 08:39
@keradus
Copy link
Member Author

keradus commented Jun 17, 2016

@soullivaneuh answered.
To be honest I see no value in continuing this topic, it won't bring any new value. I like to be consistent and have one way of dealing with deps, you like to be minimalistic. I see good and bad points of both approaches.

If you have some power and willing please focus on something important, like #1119

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.

None yet

4 participants