View Issue Details

IDProjectCategoryView StatusLast Update
0022114mantisbttoolspublic2017-02-01 22:48
Reporterdregad 
Assigned Todregad 
PrioritynormalSeverityminorReproducibilityN/A
Status closedResolutionfixed 
Product Version2.0.0 
Target Version2.0.1Fixed in Version2.0.1 
Summary0022114: Travis builds should reflect supported PHP versions
Description

Current Travis builds run the test suite against PHP 5.3 to 7.0 included.
Mantis 2.x supports PHP >= 5.5

TagsNo tags attached.

Relationships

related to 0021841 closeddregad Minimum requirements for 2.x releases 

Activities

dregad

dregad

2017-01-05 09:39

developer   ~0054943

PHP 7.1 builds fail [1] because DateTime constructor now incorporates microseconds [2].

1) IssueAddTest::testCreateIssueWithRareFields
Failed asserting that two DateTime objects are equal.
--- Expected
+++ Actual
@@ @@
-2017-01-05T12:28:55.533798+0000
+2017-01-05T12:28:55.000000+0000

[1] https://travis-ci.org/mantisbt/mantisbt/jobs/189164182
[2] http://php.net/manual/en/migration71.incompatible.php

Related Changesets

MantisBT: master defd47ba

2017-01-05 07:21:59

dregad

Details Diff
Travis: update PHP versions

- remove 5.3, 5.4 (no longer supported in 2.0 branch)
- add 7.1
mod - .travis.yml Diff File

MantisBT: master-2.0.x 5b9f343b

2017-01-05 07:21:59

dregad

Details Diff
Travis: update PHP versions

- remove 5.3, 5.4 (no longer supported in 2.0 branch)
- add 7.1
mod - .travis.yml Diff File

MantisBT: master-2.0.x da85ef7e

2017-01-05 09:13:29

dregad

Details Diff
Tests: fix date comparison failure on PHP 7.1

Since PHP 7.1, DateTime constructor incorporates microseconds [1].

This causes the testCreateIssueWithRareFields() case to fail comparing
the last_updated field, as the reference DateTime object now contains
microseconds whereas the underlying database fields does not (see failed
Travis build [2]).

1) IssueAddTest::testCreateIssueWithRareFields
Failed asserting that two DateTime objects are equal.
--- Expected
+++ Actual
@@ @@
-2017-01-05T12:28:55.533798+0000
+2017-01-05T12:28:55.000000+0000

The DateTime is now initialized from time() instead, so the microseconds
are set to 0.

Fixes 0022114

[1] http://php.net/manual/en/migration71.incompatible.php
[2] https://travis-ci.org/mantisbt/mantisbt/jobs/189164182
mod - tests/soap/IssueAddTest.php Diff File

Issue History

Date Modified Username Field Change
2017-01-05 09:34 dregad New Issue
2017-01-05 09:35 dregad Relationship added related to 0021841
2017-01-05 09:35 dregad Changeset attached => MantisBT master-2.0.x 5b9f343b
2017-01-05 09:35 dregad Changeset attached => MantisBT master defd47ba
2017-01-05 09:39 dregad Note Added: 0054943
2017-01-05 09:42 dregad Changeset attached => MantisBT master-2.0.x da85ef7e
2017-01-05 09:42 dregad Assigned To => dregad
2017-01-05 09:42 dregad Status new => resolved
2017-01-05 09:42 dregad Resolution open => fixed
2017-01-09 17:55 atrol Fixed in Version => 2.0.1
2017-02-01 22:48 vboctor Status resolved => closed