|  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
Have you experienced this issue?
Rate the importance of this bug to you:

 [2013-09-04 11:55 UTC] alexandrfedorov at gmail dot com
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.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-09-04 14:57 UTC]
-Status: Open +Status: Wont fix
 [2013-09-04 14:57 UTC]
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]
-Status: Wont fix +Status: Re-Opened -Assigned To: +Assigned To: hradtke
 [2014-09-29 16:50 UTC]
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]
-Status: Re-Opened +Status: Suspended -Assigned To: hradtke +Assigned To:
 [2017-01-10 08:24 UTC]
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-2024 The PHP Group
All rights reserved.
Last updated: Sat Apr 20 07:01:29 2024 UTC