php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #66343 DateTime static aliases don't have proper signatures on pages.
Submitted: 2013-12-23 20:46 UTC Modified: 2013-12-31 20:11 UTC
From: donatj at gmail dot com Assigned:
Status: Wont fix Package: Documentation problem
PHP Version: Irrelevant 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: donatj at gmail dot com
New email:
PHP Version: OS:

 

 [2013-12-23 20:46 UTC] donatj at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/function.date-offset-get
---

DateTime static aliases don't have proper signatures on pages.

For example, date_offset_get, an alias of DateTime::getOffset should be noted as:

	int date_offset_get ( DateTimeInterface $object )



It **is** noted as such here: 

	http://www.php.net/manual/en/datetime.getoffset.php5  

	
but is not on its own page here: 

	http://www.php.net/function.date-offset-get


A non-exhaustive list of affected methods follow.

date_add, date_create_from_format, date_create_immutable_from_format, date_create_immutable, date_create, date_date_set, date_diff, date_format, date_get_last_errors, date_interval_create_from_date_string ... and many more from the http://us2.php.net/manual/en/ref.datetime.php section

Expected result:
----------------
int date_offset_get ( DateTimeInterface $object )

Actual result:
--------------
date_offset_get

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-12-31 17:34 UTC] frozenfire@php.net
-Status: Open +Status: Wont fix
 [2013-12-31 17:34 UTC] frozenfire@php.net
In the structure of the PHP manual, alias pages do not have their own signature documentation (see http://php.net/join for an example). I can understand why it might be a valuable addition for the DateTime procedural invocations, however it would tend to add a bit of a maintenance issue, and would unnecessarily complicate the alias page structure.

The function signatures for all of these aliases are present alongside their OOP method signatures, on the respective method pages. This is the natural place for them.

I'll think about whether we can create a simple pointer structure for the manual to import the function signature from the method page, but for now, I'll mark this bug as wont-fix.
 [2013-12-31 20:11 UTC] donatj at gmail dot com
My only comment is that the date time methods in particular this would be useful as they're not direct references but instead have their own signature entirely different from the object which while documented on the resolved alias page, would be much more useful on the aliases page it self.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 14:01:30 2024 UTC