php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69303 `doBackground` should be modified to `doNormalBackground`
Submitted: 2015-03-26 03:11 UTC Modified: 2017-01-10 08:25 UTC
From: brendan at bloodbone dot ws Assigned:
Status: Suspended Package: gearman (PECL)
PHP Version: 5.6.7 OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
45 - 8 = ?
Subscribe to this entry?

 
 [2015-03-26 03:11 UTC] brendan at bloodbone dot ws
Description:
------------
---
From manual page: http://www.php.net/gearmanclient.dobackground
---

The GearmanClient::do method has been marked as deprecated in favour of using GearmanClient::doNormal. This is understandable and makes the API more readable:

- GearmanClient::doLow
- GearmanClient::doNormal
- GearmanClient::doHigh

However, the same deprecation has not applied to the GearmanClient::doBackground method. Note that GermanClient::do{Low,High}Background methods already exist, so I believe GearmanClient::doNormalBackground should be added to make the API consistent across blocking and background tasks:

- GearmanClient::doLow
- GearmanClient::doNormal
- GearmanClient::doHigh
- GearmanClient::doLowBackground
- GearmanClient::doNormalBackground <- This currently doesn't exist (it's ::doBackground instead)
- GearmanClient::doHighBackground

Test script:
---------------
<?php

/* create our object */
$gmclient= new GearmanClient();

/* add the default server */
$gmclient->addServer();

/* run reverse client */
$job_handle = $gmclient->doNormalBackground("reverse", "this is a test");

Expected result:
----------------
GearmanClient::doNormalBackground works as doBackground currently does.

Actual result:
--------------
Fatal error, doNormalBackground method does not exist

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-01-10 08:25 UTC] kalle@php.net
-Status: Open +Status: Suspended
 [2017-01-10 08:25 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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 05:01:28 2024 UTC