Skip to content

Beanstalk driver not compatible with current version of Pheanstalk #1

Closed

Description

@rpacker

What are you trying to achieve?

I try to connect to beanstalk with the new syntax:
$this->queue = Pheanstalk::create($config['host'], $config['port'], $config['timeout']);

What do you get instead?

It wants you to use the old syntax:
$this->queue = new Pheanstalk($config['host'], $config['port'], $config['timeout']);

  [TypeError] Argument 1 passed to Pheanstalk\Pheanstalk::__construct() must be an instance of Pheanstalk\Connection, string given, called in /home/robert/code/hermes/vendor/codeception/codeception/src/Codeception/Lib/Driver/Beanstalk.php on line 18  

Details

  • Codeception version:
    Codeception 3.1.2
  • PHP Version:
    PHP 7.2.24-
  • Operating System:
    Linux Mint

Activity

  1. changed the title [-]Beanstalk driver not compatible with current version of beanstalk[/-] [+]Beanstalk driver not compatible with current version of Pheanstalk[/+] on Nov 22, 2019
  2. Naktibalda commented on Nov 23, 2019

    @Naktibalda
    Member

    Pheanstalk 4 requires PHP 7.1, so we can't use it in Codeception 3 or 4, unless it is possible to make Queue module compatible with both versions.

    @SamMousa I noticed that you are maintainer of Pheanstalk , so this issue is yours,
    The best solution would be to make https://github.com/Codeception/module-queue compatible with Pheanstalk 3 and 4 and release 1.1.0,
    but if it is impossible, it is perfectly fine to make a major version bump and support only Pheanstalk 4. Though in that case it would be great to implement support for iron-io/iron_mq v4 too.

  3. SamMousa commented on Nov 23, 2019

    @SamMousa
    Collaborator

    Thanks! I'll have a look

  4. SamMousa commented on Nov 25, 2019

    @SamMousa
    Collaborator

    The interface that needs to be implemented seems simple enough. I'll implement a new class and have the queue module decide on which to use based on the version of Pheanstalk that's available.

  5. Naktibalda commented on Jan 28, 2020

    @Naktibalda
    Member

    Fixed by #2
    Released as 1.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions