#49629 [Bgs]: Regression in 5.2 caused by #44144
| From: | romain dot dorgueil at symfony-project dot com | Date: | Wed, 23 Sep 2009 07:10:01 +0000 |
| Subject: | #49629 [Bgs]: Regression in 5.2 caused by #44144 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-142740@lists.php.net to get a copy of this message | ||
ID: 49629
User updated by: romain dot dorgueil at symfony-project dot com
Reported By: romain dot dorgueil at symfony-project dot com
Status: Bogus
Bug Type: *General Issues
Operating System: linux 2.6.18-4-vserver-686
PHP Version: 5.2.11
New Comment:
exactly what I meant.
Previous Comments:
------------------------------------------------------------------------
[2009-09-22 19:29:04] jani@php.net
Changing it again would be rather idiotic. It's done, live with it.
------------------------------------------------------------------------
[2009-09-22 17:40:51] romain dot dorgueil at symfony-project dot com
Description:
------------
In #44144, it was said "spl_autoload_functions() should return object
instances, not class names, when appropriate."
"should" and "when appropriate" seems a bit hazardous, to speak about
a
feature that has been working some way until 5.2.10
After a discussion with Pierre, he summed it up well as :
<Pierre> that's a very bad idea and break BC for a behavior that has
existed for a good dozen releases
I understand that maybe we want it to behave somehow else in future
versions, but I'm not sure minor releases of php 5.2 are the best
place for it.
I will understand very well if this ticket is closed as invalid or
wontfix (as the damage is already done, it's for sure a good idea not
to change again in .12), but I wanted to report it to show how a so
little BC change can affect some projects.
Reproduce code:
---------------
<?php
class Foo {
public function nonstaticMethod() {}
}
$foo = new Foo;
spl_autoload_register(array($foo, 'nonstaticMethod'));
$funcs = spl_autoload_functions();
print_r((int) is_object($func[0][0]));
Expected result:
----------------
0
Actual result:
--------------
1
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=49629&edit=1