Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Undefined property: Collective\IronQueue\IronQueue::$crypt #13

Closed
Jmrich opened this issue Jul 25, 2016 · 12 comments
Closed

Undefined property: Collective\IronQueue\IronQueue::$crypt #13

Jmrich opened this issue Jul 25, 2016 · 12 comments

Comments

@Jmrich
Copy link

Jmrich commented Jul 25, 2016

As the title says it is looking for a variable named crypt that is never defined. Not sure when this became an issue. Here is the code that fails:

public function pushRaw($payload, $queue = null, array $options = [])
    {
        if ($this->shouldEncrypt) {
            $payload = $this->crypt->encrypt($payload);
        }

        return $this->iron->postMessage($this->getQueue($queue), $payload, $options)->id;
    }
@stayallive
Copy link
Contributor

stayallive commented Jul 26, 2016

It looks like in the connecter $crypt is defined but never passed along the the actual IronQueue instance.

/**
* The encrypter instance.
*
* @var \Illuminate\Encryption\Encrypter
*/
protected $crypt;

This is very weird since I have always used this package with crypt on for ages... now questioning everything about it 😨

@lastcow
Copy link

lastcow commented Jul 28, 2016

Same issue here, only can do 'encrypt'=>false.

@carvefx
Copy link

carvefx commented Jul 29, 2016

@Jmrich can you please provide a Laravel version and an iron-queue version? I use iron-queue in production with encrypt => true and it's working as expected, so I'm guessing a newer laravel version somehow broke the instantiation?

I actually took a look at other Queue Connectors shipped with laravel, and none seem to support encryption, so the case where laravel simply broke something is actually quite likely

@Jmrich
Copy link
Author

Jmrich commented Jul 29, 2016

Laravel version "5.2.41", Iron-queue "v5.2.4". In my production app my laravel is v 5.2.29 with iron-queue at v 5.2.4, and it works fine. So thats the only thing that I can think of. I just noticed this in my dev env when I tried to add something to the queue

@patrikengborg
Copy link

Same issue here, same version numbers.

@golonix
Copy link
Contributor

golonix commented Aug 24, 2016

I've created a fix for this. Inability to send encrypted data is serious drawback.
Authors/maintainers of this package (@tshafer, @adamgoose), please address this issue as soon as possible.

Thanks

@carvefx
Copy link

carvefx commented Aug 25, 2016

bump @tshafer

@kuwana
Copy link

kuwana commented Sep 25, 2016

I don't know reason of no acceptance for #14 .
Anybody can show me other solution?

@jean-alex
Copy link

Quick fix....
Since Laravel 5.2.4*, the protected property $crypt of Queue ( Illuminate\Queue\Queue) ) has been changed to $encrypter. But LaravelCollective (v5.2.4) has not been updated to match that change.

To be able to use LaraCollective/iron-queue, you have two options

  1. Set 'encrypt' to false in your queue config file
  2. Update Collective\IronQueue\IronQueue to replace $this->crypt by $this->encrypter at lines 93 and 238.

@golonix
Copy link
Contributor

golonix commented Nov 2, 2016

@zoomsurhaiti there is pull request that fixes this issue (#14)

@golonix
Copy link
Contributor

golonix commented Dec 29, 2016

It seems like original authors/maintainers ditched this package. I've decided to fork it and maintain it on my own. You can find it here: https://github.com/HydrefLab/iron-queue

Feel free to use it or contribute :)

@trideout
Copy link
Collaborator

Fixes merged into v5.2.5 release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants