fightbulc / moment.php

Parse, validate, manipulate, and display dates in PHP w/ i18n support. Inspired by moment.js
Other
973 stars 154 forks source link

builds failing due to PHP 5.x errors #188

Closed blacknell closed 4 years ago

blacknell commented 4 years ago

Travis is reporting failures such as

Fatal error: Declaration of Moment\MomentBritishEnglishLocaleTest::setUp() must be compatible with PHPUnit\Framework\TestCase::setUp(): void in /home/travis/build/fightbulc/moment.php/tests/unit/Moment/MomentBritishEnglishLocaleTest.php on line 144

This seems to be because setup should be declared public function setUp(): void but doing so will fail PHP 5.x with Return type declaration is available in PHP 7 only

Also, there are some errors seemingly due to PHPUnit versions not compatible with the various versions of PHP in the Travis test suite eg.

PHPUnit 8.0.4 by Sebastian Bergmann and contributors.
This version of PHPUnit is supported on PHP 7.2 and PHP 7.3.
You are using PHP 7.1.27 (/home/travis/.phpenv/versions/7.1.27/bin/php).

Don't know how you want to handle this. Perhaps the time is right to say googbye to PHP 5.x?

fightbulc commented 4 years ago

Hey there. Looks like it has been fixed.