schmittjoh / JMSJobQueueBundle

Run and Schedule Symfony Console Commands as Background Jobs
http://jmsyst.com/bundles/JMSJobQueueBundle
334 stars 254 forks source link

Symfony 3.3: sh: 1: exec: exec: not found #171

Closed stephanvierkant closed 7 years ago

stephanvierkant commented 7 years ago

My job finished with exit code 127. Error output is sh: 1: exec: exec: not found

Using Symfony 3.3.0-RC1 on Ubuntu.

Maybe related to #8?

stephanvierkant commented 7 years ago

See https://github.com/symfony/symfony/pull/22487. Maybe that's the cause?

Commenting out this line fixes the problem for me, but I don't know what that means for other setups.

schmittjoh commented 7 years ago

Indeed, however this only fixes it for 3.3, but at the same time breaks for earlier versions.

Following the discussion on Symfony, it seems like this is a BC break as @stof mentioned, but a quick fix on the bundle would be to build string command line and then use the Process class directly instead of going through the ProcessBuilder.

Happy to merge something if you can provide a pull-request.

anboo commented 7 years ago

@schmittjoh Will this package work for Symfony 3.3? Or the support has stopped and we will wait for the pull request?

schmittjoh commented 7 years ago

@anboo, I think you do not understand how open-source works. If you need this right now, the steps for how to achieve it are above and a pull-request is certainly welcome. I'll also have a look at some point, but only when I need this change.

anacona16 commented 7 years ago

@schmittjoh

Do you think a version comparison is enough to solve this?

Something like this:

if (Kernel::VERSION < 3.3) {
    $pb->add('exec');
}

If you agree with this, I can make a pull request.

anacona16 commented 7 years ago

@schmittjoh please see PR #175

Trekels commented 7 years ago

Any updates on the PR #175 ?

apsylone commented 7 years ago

I think the PR #176 is better than #175. It should be merged as it has been tested. The Bundle is completely unusable in SF 3.3 without this fix merged.

anorgan commented 7 years ago

Until this gets merged, you can use

{
    "repositories": [
        {
            "type": "vcs",
            "url": "git@github.com:anorgan/JMSJobQueueBundle.git"
        }
    ]
}

in your composer.json to alias the repository and import the patched dependency