php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75678 ReflectionType::getName() is undocumented
Submitted: 2017-12-13 21:58 UTC Modified: 2018-01-29 22:03 UTC
From: pavarnos at gmail dot com Assigned: vrana (profile)
Status: Closed Package: Reflection related
PHP Version: 7.1.12 OS: all
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pavarnos at gmail dot com
New email:
PHP Version: OS:

 

 [2017-12-13 21:58 UTC] pavarnos at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/class.reflectiontype
---

from the stub for ReflectionType in phpStorm

	/**
	 * To string
	 * @link http://php.net/manual/en/reflectiontype.tostring.php
	 * @return string Returns the type of the parameter.
	 * @since 7.0
	 * @deprecated 7.1.0:8.0.0 Please use getName()
	 * @see \ReflectionType::getName()
	 */
	public function __toString()
	{
	}

	/**
	 * Get type of the parameter.
	 * @return string Returns the type of the parameter.
	 * @since 7.1.0
	 */
	public function getName()
	{
	}


Expected result:
----------------
Should see a getName() function in the docs for the class


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2018-01-29 22:03 UTC] vrana@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: vrana
 [2018-01-29 22:03 UTC] vrana@php.net
It's been removed.
 [2020-01-31 10:07 UTC] Dawid at mentax dot pl
In php 7.4 Function ReflectionType::__toString() is deprecated
So getName() should not be removed. 

Why this problem is not fixed until now?
 [2020-01-31 11:23 UTC] Dawid at mentax dot pl
Or should be added correct type in methods  getType - where docs should contain
 
 * @return ReflectionNamedType|ReflectionType|null
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 26 18:01:31 2024 UTC