thephpleague / period

PHP's time range API

Home Page:https://period.thephpleague.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Datepoint::createFromFormat declaration issue with PHP 7.1

ilianiv opened this issue · comments

Bug Report

Information Description
Version 4.3.0
PHP version 7.1.25
OS Platform Ubuntu 16.04.5 LTS

Summary

After upgrade league/period (4.0.1 => 4.3.0) I've got this warning:

Declaration of League\Period\Datepoint::createFromFormat($format, $datetime, ?DateTimeZone $timezone = NULL) should be compatible with DateTimeImmutable::createFromFormat($format, $time, $object = NULL)

Standalone code, or other way to reproduce the problem

Here is a dummy DateTimeImmutable extender class simulating Datepoint class in a playground
https://www.tehplayground.com/nvl4opycmrAOJbIt

@ilianiv thanks for reporting this issue it has been added to the #73 PR and will be released when the merge is done.

new release version 4.3.1 with the fix included