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

Fixed test suite on master #578

Merged
merged 5 commits into from
May 6, 2016
Merged

Conversation

goetas
Copy link
Collaborator

@goetas goetas commented May 5, 2016

  • libxml2 is not reliable for DTD info, fallback on PHP (not using DOM we gain some performance)
  • removed travis tests for php 5.3
  • removed lock file (since php7 requires different dependencies)
  • enabled travis cache
  • php7 sorting algorithm is/was buggy (stable vs unstable sorting) fixed this cases
  • updated deprecated usages of phpcr odm tests
  • fixed wrong tests with ObjectWithVirtualProperties (error become evident on php7)

note on test changes regarding virtual properties
ObjectWithVirtualProperties has 4 serializable fields (here fields are listed in order as the appear in the ObjectWithVirtualProperties class:

  1. existField
  2. VirtualValue
  3. test
  4. TypedVirtualProperty

The object has a custom order access rule:

  1. prop_name
  2. existField
  3. foo

Since "prop_name" and "foo" do not exist, the serialization order should be:

  1. existField
  2. VirtualValue
  3. test
  4. TypedVirtualProperty

But all tests were expecting:

  1. existField
  2. test
  3. VirtualValue
  4. TypedVirtualProperty

that is wrong since "VirtualValue" appears before "test" in the code

@goetas goetas force-pushed the doctype-fix branch 5 times, most recently from a8ab1fd to cd0ea65 Compare May 6, 2016 14:46
$existsA = isset($order[$a]);
$existsB = isset($order[$b]);

if ( ! $existsA && ! $existsB) {
return 0;
return $currentSorting[$a] - $currentSorting[$b];
Copy link
Collaborator Author

@goetas goetas May 6, 2016

Choose a reason for hiding this comment

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

this makes the sorting more "stable"

@goetas
Copy link
Collaborator Author

goetas commented May 6, 2016

#573 and #511 will become obsolete if this gets merged

@schmittjoh
Copy link
Owner

Thanks for the detailed explanations, makes this much faster to review :)

"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

@goetas goetas deleted the doctype-fix branch May 14, 2016 09:35
@goetas goetas added this to the v1.2 milestone Aug 3, 2016
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.

4 participants