php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #58918 Don't use reseved method names
Submitted: 2009-10-25 09:40 UTC Modified: 2011-12-05 18:08 UTC
From: niko dot sams at gmail dot com Assigned: hradtke (profile)
Status: Closed Package: gearman (PECL)
PHP Version: 5.2.11 OS: Debian
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: niko dot sams at gmail dot com
New email:
PHP Version: OS:

 

 [2009-10-25 09:40 UTC] niko dot sams at gmail dot com
Description:
------------
The following methods use php constructs as name:
GearmanClient::do
GearmanClient::echo
GearmanWorker::echo
GearmanTask::function (marked deprected)

Please consider changing the name to avoid problems.

Reproduce code:
---------------
class MyClient extends GearmanClient
{
    public function echo($workload)
    {}
}

Expected result:
----------------
I'd like to override the echo method

Actual result:
--------------
I get a parse error from php

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-22 18:49 UTC] contact at jamesluedke dot com
ugh, i guess i could change ti clientDo or clientEcho
 [2011-08-20 08:01 UTC] hradtke@php.net
Need to mark GearmanClient::do() and GearmanClient::echo() as deprecated.

echo can be renamed to ping, that makes more semantic sense anyways. The do method is a tough one. I was thinking doNormal might be the best name. That fits the doHigh and doLow pattern, but may make doBackground seem out of place.
 [2011-08-21 23:59 UTC] hradtke@php.net
GearmanClient::echo() and GearmanClient::do() have been marked as deprecated in favor of GearmanClient::ping() and GearmanClient::doNormal() respectively.
 [2011-12-05 13:42 UTC] mike at digitalstruct dot com
Looks like the documentation has not been updated for this...
 [2011-12-05 16:48 UTC] hradtke@php.net
I am working on updating the documentation now.
 [2011-12-05 18:05 UTC] hradtke@php.net
Automatic comment from SVN on behalf of hradtke
Revision: http://svn.php.net/viewvc/?view=revision&revision=320450
Log: Updated documentation to match changes in Pecl Bug #58918 (Don't use reseved method names)
 [2011-12-05 18:08 UTC] hradtke@php.net
The documentation has been updated. It usually takes a few days to sync.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Nov 04 12:01:28 2024 UTC