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: 2022-05-20 13:19 UTC
From: ocramius at gmail dot com Assigned: derick (profile)
Status: Closed Package: Date/time related
PHP Version: 7.0.0beta3 OS:
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: ocramius at gmail dot com
New email:
PHP Version: OS:

 

 [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

Pull Requests

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.
 [2022-05-20 13:19 UTC] derick@php.net
-Status: Re-Opened +Status: Closed -Assigned To: +Assigned To: derick
 [2022-05-20 13:19 UTC] derick@php.net
Thank you for your bug report. This issue has already been fixed
in the latest released version of PHP, which you can download at
http://www.php.net/downloads.php

This argument is now called 'timezone' in PHP (since about 8.0, I believe) and this is also how it is documented, to I believe there is nothing to do here.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC