php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68094 Dupplicate entry in Reflection for class Threaded
Submitted: 2014-09-25 07:47 UTC Modified: 2014-09-26 06:50 UTC
From: pear at laurent-laville dot org Assigned:
Status: Duplicate Package: pthreads (PECL)
PHP Version: Irrelevant OS: irrevelant
Private report: No CVE-ID: None
 [2014-09-25 07:47 UTC] pear at laurent-laville dot org
Description:
------------
On Windows platform, I've noticed, but it seems to be older than just the recent release 2.0.9 ( 2.0.8 is also affected ), that :

The class Threaded appear twice on reflection ( all API ).



Test script:
---------------
In CLI mode :

php --re pthreads 

In other API :

<?php
$extension = new \ReflectionExtension('pthreads');
$classes   = $extension->getClassNames();

print_r($classes);
?>

Expected result:
----------------
Only once description of 

    Class [ <internal:pthreads> <iterateable> class Threaded implements Traversable, Countable ] {

}


Actual result:
--------------
Two same copy are visible in CLI mode.

In other API, you got 

Array
(
    [0] => Threaded
    [1] => Threaded
    [2] => Thread
    [3] => Worker
    [4] => Mutex
    [5] => Cond
    [6] => Collectable
    [7] => Pool
)
 

Patches

alias-reflection.patch (last revision 2014-09-26 05:22 UTC by remi@php.net)

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-09-25 07:49 UTC] pear at laurent-laville dot org
I've run my tests on recent PHP version 5.6.1, 5.5.17, 5.4.33 and 5.3.29, and got same results each times.
 [2014-09-25 09:15 UTC] remi@php.net
It seems confusion comes from "Stackable" which is an alias of "Threaded"
 [2014-09-26 05:22 UTC] remi@php.net
The following patch has been added/updated:

Patch Name: alias-reflection.patch
Revision:   1411708961
URL:        https://bugs.php.net/patch-display.php?bug=68094&patch=alias-reflection.patch&revision=1411708961
 [2014-09-26 05:38 UTC] remi@php.net
-Operating System: Windows +Operating System: irrevelant
 [2014-09-26 05:38 UTC] remi@php.net
@laurent, sorry to bother you, but as it seems impossible to reaffect this pecl bug to a php component, can you please open a new bug against "reflection" ?
 [2014-09-26 06:36 UTC] pear at laurent-laville dot org
@remi It's done. See new bug report at https://bugs.php.net/bug.php?id=68103
 [2014-09-26 06:50 UTC] remi@php.net
-Status: Open +Status: Duplicate
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 05:01:28 2024 UTC