Bug #66773 [Csd]: Autoload with Opcache allows importing conflicting class name to namespace
| From: | nikic@php.net | Date: | Tue, 05 Sep 2017 18:19:26 +0000 |
| Subject: | Bug #66773 [Csd]: Autoload with Opcache allows importing conflicting class name to namespace | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-210963@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66773&edit=1
ID: 66773
Updated by: nikic@php.net
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:
This issue has been fixed in PHP 7 only.
Previous Comments:
------------------------------------------------------------------------
[2017-09-05 17:45:32] bkfake-php at yahoo dot com
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
------------------------------------------------------------------------
[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.
------------------------------------------------------------------------
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