Skip to content
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

UTCDateTime supports Int64, deprecates string and float #3794

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions reference/mongodb/bson/utcdatetime/construct.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
&reftitle.description;
<methodsynopsis>
<modifier>final</modifier> <modifier>public</modifier> <methodname>MongoDB\BSON\UTCDateTime::__construct</methodname>
<methodparam choice="opt"><type class="union"><type>int</type><type>float</type><type>string</type><type>DateTimeInterface</type><type>null</type></type><parameter>milliseconds</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>float</type><type>string</type><type>MongoDB\BSON\Int64</type><type>DateTimeInterface</type><type>null</type></type><parameter>milliseconds</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
</refsect1>

Expand All @@ -25,7 +25,7 @@
Number of milliseconds since the Unix epoch (Jan 1, 1970). Negative values
represent dates before 1970. This value may be provided as a 64-bit
<type>int</type>. For compatibility on 32-bit systems, this parameter
may also be provided as a <type>float</type> or <type>string</type>.
may also be provided as a <classname>MongoDB\BSON\Int64</classname>.
</para>
<para>
If the argument is a <classname>DateTimeInterface</classname>, the number
Expand Down Expand Up @@ -58,6 +58,17 @@
</row>
</thead>
<tbody>
<row>
<entry>PECL mongodb 1.20.0</entry>
<entry>
<para>
The <parameter>milliseconds</parameter> argument now accepts a
<classname>MongoDB\BSON\Int64</classname> object (for compatibility on
32-bit platforms). Specifying a <type>string</type> or
<type>float</type> is deprecated.
Copy link
Member Author

@jmikola jmikola Sep 25, 2024

Choose a reason for hiding this comment

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

Deprecation for float was technically missed in 1.20, but I think it makes more sense to document these together. Both types will be removed in 2.0 (PHPC-2444, PHPC-2459).

</para>
</entry>
</row>
<row>
<entry>PECL mongodb 1.2.0</entry>
<entry>
Expand Down