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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2026 The PHP Group
All rights reserved.
Last updated: Tue Oct 06 20:00:02 2026 UTC