Bug #54624 [Com]: class_alias and type hint
| From: | qing0088 at hotmail dot com | Date: | Mon, 29 Aug 2011 08:23:31 +0000 |
| Subject: | Bug #54624 [Com]: class_alias and type hint | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-163063@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54624&edit=1
ID: 54624
Comment by: qing0088 at hotmail dot com
Reported by: david at grudl dot com
Summary: class_alias and type hint
Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 5.3.6
Assigned To: felipe
Block user comment: N
Private report: N
New Comment:
http://www.officialpackersjerseyshop.com/green-bay-packers-jerseys-greg-jennings-jersey-c-11_21.html Greg
Jennings Jersey
http://www.officialpackersjerseyshop.com/green-bay-packers-jerseys-james-starks-jersey-c-11_31.html James
Starks Jersey
http://www.officialpackersjerseyshop.com/green-bay-packers-jerseys-jermichael-finley-jersey-c-11_22.html Jermichael
Finley Jersey
Previous Comments:
------------------------------------------------------------------------
[2011-06-12 23:10:43] felipe@php.net
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
------------------------------------------------------------------------
[2011-06-12 23:10:34] felipe@php.net
Automatic comment from SVN on behalf of felipe
Revision: http://svn.php.net/viewvc/?view=revision&revision=312112
Log: - Fixed bug #54624 (class_alias and type hint)
------------------------------------------------------------------------
[2011-04-28 17:11:02] david at grudl dot com
Description:
------------
class_alias() is not taken into account by type hints.
Note: there is eval(), so this is NOT PARSING-TIME error. Alias was created before eval is parsed.
Test script:
---------------
<?php
class A
{
function foo(A $param) {
}
}
class_alias('A', 'AliasA');
eval('
class B extends A
{
function foo(AliasA $param) {
}
}
');
Expected result:
----------------
no error
Actual result:
--------------
Strict Standards: Declaration of B::foo() should be compatible with that of A::foo()
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54624&edit=1