Edit report at https://bugs.php.net/bug.php?id=66773&edit=1
ID: 66773
Comment by: bkfake-php at yahoo dot com
Reported by: carl dot vuorinen at w3 dot fi
Summary: Autoload with Opcache allows importing conflicting
class name to namespace
Status: Closed
Type: Bug
Package: opcache
Operating System: Linux (Ubuntu)
PHP Version: 5.5.9
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
Did this get fixed in the 5.6 branch?
Just upgraded to 5.6.31 after experiencing this bug but the issue remains.
I see the bug on the 7.x changelog
http://php.net/ChangeLog-7.php
but not the 5.x changelog
http://php.net/ChangeLog-5.php
Previous Comments:
------------------------------------------------------------------------
[2016-10-17 10:07:26] bwoebi@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2a75f5026a47099f585e29c5a9d8a2989dab42af
Log: Fix bug #66773, #66862
------------------------------------------------------------------------
[2016-10-08 15:03:46] nikic@php.net
Automatic comment on behalf of nikic
Revision: http://git.php.net/?p=php-src.git;a=commit;h=2a75f5026a47099f585e29c5a9d8a2989dab42af
Log: Fix bug #66773, #66862
------------------------------------------------------------------------
[2016-10-06 23:06:51] nikic@php.net
Related To: Bug #71079
------------------------------------------------------------------------
[2016-03-31 10:12:16] klein dot shaked+php at gmail dot com
Hey,
I have tried the attached patch:
$ /usr/bin/php-backup -v
PHP 7.0.4-6+deb.sury.org~trusty+5 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
$ /usr/bin/php-backup execute.php
PHP Fatal error: Cannot use Other\Bar as Bar because the name is already in use in
/php7test/some_foo.php on line 5
Fatal error: Cannot use Other\Bar as Bar because the name is already in use in
/php7test/some_foo.php on line 5
$ php -v
PHP 7.1.0-dev (cli) (built: Mar 31 2016 09:45:43) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
$ php execute.php
self: Some\Bar
parent: Other\Bar
$
It seems like it works with the gist example.
Having said that, it's hard to say if all cases are covered, plus I did have segfault while
compiling (and I have filed a bug) which I am not sure if it was related or not.
------------------------------------------------------------------------
[2016-03-24 12:25:56] klein dot shaked+php at gmail dot com
Hey,
What is the status of this issue? This is still happening using the gist above and also happened on
one of our php7 hosts on production.
$ php -v
PHP 7.0.4-6+deb.sury.org~trusty+5 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
uname -a "Linux dev 3.13.0-79-generic #123-Ubuntu SMP Fri Feb 19 14:27:58 UTC 2016 x86_64
x86_64 x86_64 GNU/Linux"
I have checked PHP's source code but haven't seen the patch there.
Any idea how this can be resolved?
Thanks
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=66773
--
Edit this bug report at https://bugs.php.net/bug.php?id=66773&edit=1