php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #70265 Wrong name of DateTimeImmutable::__construct's 2nd param
Submitted: 2015-08-14 07:25 UTC Modified: 2015-08-14 21:28 UTC
From: ocramius at gmail dot com Assigned:
Status: Re-Opened Package: Date/time related
PHP Version: 7.0.0beta3 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2015-08-14 07:25 UTC] ocramius at gmail dot com
Description:
------------
As per http://3v4l.org/6Wc78, DateTimeImmutable::__construct.timezone was renamed to DateTimeImmutable::__construct.object

Test script:
---------------
<?php

echo (new ReflectionMethod('DateTimeImmutable', '__construct'))->getParameters()[1]->getName();

Expected result:
----------------
timezone

Actual result:
--------------
object

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-08-14 07:35 UTC] requinix@php.net
-Summary: DateTimeImmutable::__construct.timezone param was renamed to "object"? +Summary: Rename DateTimeImmutable::__construct's object param to "timezone" -Type: Bug +Type: Feature/Change Request
 [2015-08-14 07:35 UTC] requinix@php.net
Sure you're not looking at the HHVM output? They named it "timezone" but PHP has always called it "object".
 [2015-08-14 08:19 UTC] ocramius at gmail dot com
Good point! I guess it is a documentation change issue then? The parameter has always been documented as `timezone`, as far as I can see.
 [2015-08-14 12:47 UTC] cmb@php.net
-Summary: Rename DateTimeImmutable::__construct's object param to "timezone" +Summary: Wrong name of DateTimeImmutable::__construct's 2nd param -Status: Open +Status: Verified -Type: Feature/Change Request +Type: Documentation Problem -Assigned To: +Assigned To: cmb
 [2015-08-14 12:49 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=337451
Log: fixed wrong parameter name (Reflection!) (fixes #70265)
 [2015-08-14 12:49 UTC] cmb@php.net
-Status: Verified +Status: Closed
 [2015-08-14 12:49 UTC] cmb@php.net
This bug has been fixed in the documentation's XML sources. Since the
online and downloadable versions of the documentation need some time
to get updated, we would like to ask you to be a bit patient.

Thank you for the report, and for helping us make our documentation better.
 [2015-08-14 21:09 UTC] cmb@php.net
Automatic comment from SVN on behalf of cmb
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=337458
Log: reverted revision 337451:
fixed wrong parameter name (Reflection!) (fixes #70265)
 [2015-08-14 21:28 UTC] cmb@php.net
-Status: Closed +Status: Re-Opened -Assigned To: cmb +Assigned To:
 [2015-08-14 21:28 UTC] cmb@php.net
Due the discussion following
<http://news.php.net/php.doc.cvs/13572> I've reverted the
documentation change for now.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Oct 23 02:01:31 2019 UTC