Skip to content

Fixed test suite on master #578

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 5 commits into from
May 6, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor/
phpunit.xml
composer.lock

13 changes: 7 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
language: php

matrix:
allow_failures:
- php: hhvm
sudo: false

cache:
directories:
- $HOME/.composer/cache

php:
- 5.3
- 5.4
- 5.5
- 5.6
Expand All @@ -14,11 +15,11 @@ php:

matrix:
allow_failures:
- php: 7.0
- php: hhvm

before_script:
- composer self-update
- composer install --dev
- composer install

script: vendor/bin/phpunit --coverage-clover clover

Expand Down
11 changes: 5 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,24 @@
"jms/metadata": "~1.1",
"jms/parser-lib": "1.*",
"phpcollection/phpcollection": "~0.1",
"doctrine/annotations": "1.*",
"doctrine/instantiator": "~1.0.3"
"doctrine/annotations": "^1.0",
"doctrine/instantiator": "^1.0.3"
},
"conflict": {
"twig/twig": "<1.12"
},
"suggest": {
"symfony/yaml": "Required if you'd like to serialize data to YAML format."
},
"minimum-stability": "dev",
"require-dev": {
"twig/twig": "~1.12|~2.0",
"doctrine/orm": "~2.1",
"doctrine/phpcr-odm": "~1.0.1",
"jackalope/jackalope-doctrine-dbal": "1.0.*",
"doctrine/phpcr-odm": "^1.3",
"jackalope/jackalope-doctrine-dbal": "^1.0",
"propel/propel1": "~1.7",
"symfony/yaml": "2.*",
"symfony/translation": "~2.0",
"symfony/validator": "~2.0",
"symfony/validator": "~2.0.0|~2.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

this does not allow installing any maintainer version of the package, as it only allows 2. and 2.1. this is pretty bad

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

as i understand this allows versions between 2.0.0 and 2.1.999 is it?

currently the test suite will fail with the validator 2.3.0

Copy link
Contributor

@scaytrase scaytrase May 7, 2016

Choose a reason for hiding this comment

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

I think that the best option is to allow ~2.3|~3.0 and test against against several versions with travis. And fix if it does not work. See like FOSUB does https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/.travis.yml. At least you can do --prefer-stable and --prefer-lowest test to not creating a matrix mess for each major dependency

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i agree that here at least 2.3 should be supported, but this requires fixing all the tests that are using ConstraintViolation in https://github.com/schmittjoh/serializer/blob/master/tests/JMS/Serializer/Tests/Serializer/BaseSerializationTest.php

since ConstraintViolation is not backward compatible from 2.1 to 2.3

"symfony/form": "~2.1",
"symfony/filesystem": "2.*",
"phpunit/phpunit": "~4.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

supporting PHP 7 means you should allow PHPUnit 5 too. version 4 is not officially compatible with PHP 7

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good point. actually I'm working on making this compatible with HHVM too.
Next days (probably half next week) will do a second PR for it

Copy link
Contributor

Choose a reason for hiding this comment

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

Well, this should be considered as a bug. Symfony 2.1 is dead since many years (2.3 will die in a few months and it was a LTS release while 2.1 was not).
Btw, this was another drawback of committing a lock file: as the lock file was forcing to use outdated libraries, this library is actually broken since years without the CI catching it...

Expand Down
Loading