php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #65615 Problem with "clone" method for GearmanClient and GearmanWorker
Submitted: 2013-09-04 11:55 UTC Modified: 2017-01-10 08:24 UTC
From: alexandrfedorov at gmail dot com Assigned:
Status: Suspended Package: gearman (PECL)
PHP Version: 5.4.19 OS: linux Ubuntu x64 13.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alexandrfedorov at gmail dot com
New email:
PHP Version: OS:

 

 [2013-09-04 11:55 UTC] alexandrfedorov at gmail dot com
Description:
------------
Hi, i'm installed your extension 'gearman' and trying to write script using BDD testing with phpspec2, but it can't "double" any of classes GearmanClient or GearmanWorker, because they contains static method "clone". In php 5 "clone" is a reserved word and it's can't be a function(or method) name. Please fix this.

P.S. error: "PHP Parse error:  syntax error, unexpected 'clone' (T_CLONE), expecting identifier (T_STRING) in ..."
P.P.S. And we can't call 'clone' method directly in our scripts.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-04 14:57 UTC] hradtke@php.net
-Status: Open +Status: Wont fix
 [2013-09-04 14:57 UTC] hradtke@php.net
The 'clone' function has been in this package since the original author wrote it many years ago. While I certainly feel your pain, this is the first time anyone has said it has caused them a problem. I cannot break backwards compatibility for everyone else in a minor release. At best, a new method name can be chosen (like _clone or copy) and the existing clone method marked a deprecated. After 1-2 years of deprecation, the 'clone' method can be removed.
 [2014-09-29 16:50 UTC] hradtke@php.net
-Status: Wont fix +Status: Re-Opened -Assigned To: +Assigned To: hradtke
 [2014-09-29 16:50 UTC] hradtke@php.net
Considering releasing gearman 1.2.0 to fix this issue. It has been over a year since I added the alternative methods.
 [2017-01-10 08:24 UTC] kalle@php.net
-Status: Re-Opened +Status: Suspended -Assigned To: hradtke +Assigned To:
 [2017-01-10 08:24 UTC] kalle@php.net
The gearman extension have not had much activity in the past few years, so I'm taking the safe bet that this is no longer under active development (as I don't consider the typo fixes on the github repo an active development), besides that it also targets unsupported PHP versions. Please unsuspend this report in case it begins to blossom with life once more
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Dec 03 01:03:42 2021 UTC