Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.0] Fix tests #15664

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 3, 2015
Merged

[3.0] Fix tests #15664

merged 1 commit into from
Sep 3, 2015

Conversation

nicolas-grekas
Copy link
Member

Q A
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Should make tests green again on travis and appveyor

}

$formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, new \DateTimeZone('GMT+03:00'), IntlDateFormatter::GREGORIAN, 'zzzz');
$formatter = $this->getDateFormatter('en', IntlDateFormatter::MEDIUM, IntlDateFormatter::SHORT, new \DateTimeZone('GMT'), IntlDateFormatter::GREGORIAN, 'zzzz');
Copy link
Member Author

Choose a reason for hiding this comment

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

ping @stof was there a specific reason to test with 'GMT+03:00' here? Because it doesn't work on 5.5.9 (only on 5.5.10+)

Copy link
Member

Choose a reason for hiding this comment

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

well, the goal was to ensure that this syntax was supported when converting DateTimeZone to Intl timezone ids (there is a specific handling for them).

We might add another test using GMT only and keep the test with GMT+03:00 but skipping it in versions not supporting it.

Btw, this should be done in 2.3+ if we go this way

Copy link
Member

Choose a reason for hiding this comment

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

hmm, given the test failure, it looks like we have an issue with the support of GMT in the stub code

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 reverted the change and skipped the test on 5.5.9. We should open a PR on 2.3 now.

@nicolas-grekas nicolas-grekas force-pushed the m-fx branch 2 times, most recently from a410475 to ea9bb00 Compare September 1, 2015 09:03
@@ -47,11 +46,6 @@ class UniqueEntityValidatorTest extends AbstractConstraintValidatorTest
*/
protected $repository;

protected function getApiVersion()
Copy link
Member

Choose a reason for hiding this comment

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

shoudln't this be kept for lowest deps (which would use the 2.x validator component) ?

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 reverted the change, it's not related to this pr

Copy link
Member

Choose a reason for hiding this comment

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

it would be great to send a separate PR with this cleanup as you have it though

@@ -87,9 +87,6 @@ public function provideInvalidComparisons()
array($object, '2', $object, '2', __NAMESPACE__.'\ComparisonTest_Class'),
);

$immutableDate = new \DateTimeImmutable('2000-01-01');
$comparisons[] = array($immutableDate, 'Jan 1, 2000, 12:00 AM', $immutableDate, 'Jan 1, 2000, 12:00 AM', 'DateTime');
Copy link
Member

Choose a reason for hiding this comment

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

why is it removed ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

ah, I was not aware of this nice trick

Copy link
Member

Choose a reason for hiding this comment

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

shouldn't this be done in older branches though ?

@nicolas-grekas nicolas-grekas force-pushed the m-fx branch 6 times, most recently from 4a306a4 to e57957d Compare September 1, 2015 17:19
@nicolas-grekas
Copy link
Member Author

PR is ready to merge. I can't reproduce the failures on the doctrine bridge with a fresh php7.
If someone can, please tell me where is the issue, otherwise the php7 on travis is broken and may be fixed tomorrow.

@nicolas-grekas nicolas-grekas force-pushed the m-fx branch 13 times, most recently from 5134553 to 81afe81 Compare September 1, 2015 21:19
@nicolas-grekas
Copy link
Member Author

Upgrading to doctrine/orm ^2.4.6 as lowest version fixes the remaining test failures.

@@ -17,7 +17,7 @@
],
"require": {
"php": ">=5.5.9",
"doctrine/common": "~2.3",
"doctrine/common": "~2.4",
Copy link
Contributor

Choose a reason for hiding this comment

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

if these changes fix tests for php 7, should they not be done on symfony 2.3 or 2.7/2.8 instead? I assume they would fail there as well since 3.0 doesn't have anything new yet, afaik.

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 agree

Copy link
Member

Choose a reason for hiding this comment

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

I'm totally fine with bumping the Doctrine base versions btw. 2.2 and 2.3 are long EOLed.

@@ -855,6 +855,10 @@ private function getInt64Value($value)
return false;
}

if (PHP_INT_SIZE !== 8 && ($value > self::$int32Range['positive'] || $value < self::$int32Range['negative'])) {
return (float) $value;
Copy link
Member

Choose a reason for hiding this comment

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

the phpdoc needs to be updated though, as it says it returns int|false

Copy link
Member Author

Choose a reason for hiding this comment

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

See #15672

@nicolas-grekas
Copy link
Member Author

Reverted the doctrine upgrade: that was a temporary bug in php7

@nicolas-grekas nicolas-grekas force-pushed the m-fx branch 4 times, most recently from 038d348 to 03f08c4 Compare September 3, 2015 11:03
@nicolas-grekas nicolas-grekas merged commit 37e1f1a into symfony:master Sep 3, 2015
nicolas-grekas added a commit that referenced this pull request Sep 3, 2015
This PR was merged into the 3.0-dev branch.

Discussion
----------

[3.0] Fix tests

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Should make tests green again on travis and appveyor

Commits
-------

37e1f1a [3.0] Fix tests
@nicolas-grekas nicolas-grekas deleted the m-fx branch September 3, 2015 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants