DatePeriod::__construct() no longer accepts 0 $recurrences

Cf. <https://bugs.php.net/bug.php?id=78590>.

We also document the default value of `$options`, and remove the PHP 5
related changelog entries.
This commit is contained in:
Christoph M. Becker 2021-01-13 13:10:30 +01:00
parent d85ea8c720
commit a626743ba6

View file

@ -14,19 +14,19 @@
<methodparam><type>DateTimeInterface</type><parameter>start</parameter></methodparam>
<methodparam><type>DateInterval</type><parameter>interval</parameter></methodparam>
<methodparam><type>int</type><parameter>recurrences</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
</constructorsynopsis>
<constructorsynopsis role="oop">
<modifier>public</modifier> <methodname>DatePeriod::__construct</methodname>
<methodparam><type>DateTimeInterface</type><parameter>start</parameter></methodparam>
<methodparam><type>DateInterval</type><parameter>interval</parameter></methodparam>
<methodparam><type>DateTimeInterface</type><parameter>end</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
</constructorsynopsis>
<constructorsynopsis role="oop">
<modifier>public</modifier> <methodname>DatePeriod::__construct</methodname>
<methodparam><type>string</type><parameter>isostr</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
</constructorsynopsis>
<para>
Creates a new DatePeriod object.
@ -57,7 +57,7 @@
<term><parameter>recurrences</parameter></term>
<listitem>
<para>
The number of recurrences.
The number of recurrences. Must be greater than <literal>0</literal>.
</para>
</listitem>
</varlistentry>
@ -74,6 +74,7 @@
<listitem>
<para>
An ISO 8601 repeating interval specification.
Zero occurences (<literal>R0/</literal>) are not supported.
</para>
</listitem>
</varlistentry>
@ -104,19 +105,9 @@
</thead>
<tbody>
<row>
<entry>5.5.8</entry>
<entry>7.2.19, 7.3.6, 7.4.0</entry>
<entry>
<parameter>end</parameter> type changed to
<interfacename>DateTimeInterface</interfacename>.
Previously, <classname>DateTime</classname>.
</entry>
</row>
<row>
<entry>5.5.0</entry>
<entry>
<parameter>start</parameter> type changed to
<interfacename>DateTimeInterface</interfacename>.
Previously, <classname>DateTime</classname>.
<parameter>recurrences</parameter> must be greater than <literal>0</literal> now.
</entry>
</row>
</tbody>