-
Notifications
You must be signed in to change notification settings - Fork 5
Update dependency for Symfony 4. #4
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
Conversation
Can you add also Symfony 4 to the build matrix of Travis ? (so we are sure there is no problem with it) |
It looks like updating the build matrix doesn't work yet |
Symfony 4.0 is only in beta so that's normal, it will be released in november, so let's wait for the release to be available before pushing this. |
.travis.yml
Outdated
@@ -30,6 +31,8 @@ matrix: | |||
include: | |||
- php: 5.4 | |||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" COVERAGE=true TEST_COMMAND="composer test-ci" SYMFONY_VERSION=2.7.* | |||
- php: 7.1 | |||
env: SYMFONY_VERSION=4.0.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be env: SYMFONY_VERSION=4.0.*@dev
since there is no stable release yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but this will still break, because phpspec will complain: https://github.com/phpspec/phpspec/blob/master/composer.json#L29-L33
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we can use COMPOSER_FLAGS="--minimum-stability=dev" or something like that.
@joelwurtz IMO allowing Symfony 4 now would be better as it allows to catch incompatibilities before the final release. People not relying on dev dependencies would still not get 4.0 components, but would have to opt-in explicitly if they prefer to use it now. |
@joelwurtz I think adding Symfony 4 to the build matrix does not make sense as we will have to exclude everything except PHP 7.1 anyways as they are not supported by Symfony 4. |
we don't want every symfony version with every php version, that explodes the build matrix. i think this looks right for the configuration. do you see where the installation conflict comes from? |
@dbu It boils down to phpspec. When requiring symfony/symfony it conflicts with symfony/stopwatch which can not be updated due to symfony/yaml which can not be updated due to phpspec which (as far as I can tell) can not be updated due to the coverage plugin and the version restriction in the composer.json (current version is 4.2.4). I am currently trying to make this work on my local machine without breaking the old requirements, but I'm having a hard time. Suggestions are very welcome :) |
Have a look at php-http/client-common#90. I want to make all travis files like that. |
.travis.yml
Outdated
- php: 5.6 | ||
- php: 7.0 | ||
- php: 7.1 | ||
env: SYMFONY_VERSION=3.0.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why 3.0.*
? Didn't you mean 3.4.*
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kept this requirements from the selection above. Something like env: DEPENDENCIES="symfony/lts:^3"
probably makes more sense?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also update the other places where symfony/symfony
is used by using symfony/lts
instead. That way you won't hide bugs related to not installed components outside the CI environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess best see symfony/symfony-docs#8701 - or lets just make things work here and then sync to that when the recommendation for a perfect .travis.yml has been merged.
.travis.yml
Outdated
env: SYMFONY_VERSION=3.0.* | ||
- php: 7.1 | ||
env: DEPENDENCIES="dev" SYMFONY_VERSION=4.0.* | ||
- php: hhvm | ||
exclude: | ||
- php: 5.4 | ||
env: SYMFONY_VERSION=3.0.* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This exclude role does not match any entry from the matrix above.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. (and sorry for my comment on the partial diff, seems this has meanwhile been improved anyways)
looking at travis, the symfony 4.0 build does not work (but is allowed to fail) because phpspec can not be installed. only master of phpspec (4.2.x) does allow symfony 4: https://github.com/phpspec/phpspec/blob/master/composer.json . but unfortunately its limited to symfony 3.2 or newer, so we can't just upgrade to that.
maybe we could upgrade to phpspec 3 which does support sf 2.7 to 3.* and add something to the sf 4 build to go to that phpspec version. of course i don't know if there are any bc breaks between 3 and 4 that would affect us.
If we remove |
i suggest we comment out the coverage thing for the moment and create an issue to reenable coverage when the henrikbjorn tool is ready for phpspec 4. |
You could collect the code coverage report on a job that doesn't use Symfony 4 only. |
or that. but would need an extra composer require for the henrikbjorn library. if its in composer.json, composer can't install in the symfony 4 test. |
This is save to merge. Looking at the diff in the symfony component, you will see that there is no BC breaking change. |
@fbourigault told me not to "fix" the tests. He told me to fix the PR according to the suggestions. |
Thank you Denis! |
What's in this PR?
Update dependency for symfony/stopwatch to allow 4.x as well to make this usable in Symfony 4-applications.