JMSJobQueueBundle icon indicating copy to clipboard operation
JMSJobQueueBundle copied to clipboard

Add support for Symfony 4.4, update project dependencies, update test…

Open DaanBiesterbos opened this issue 5 years ago • 4 comments

Fix deprecation notices

  • Remove ContainerAwareCommand dependency
  • Update interface and dispatch calls to event manager (deprecated interface used)
  • Update references to deprecated @Route annotation
  • Update references to the doctrine registry (current references break symfony 4 when using up to date doctrine bundle)
  • Use doctrine 2
  • Remove various deprecated interfaces
  • Update Twig extensions (modern classes)
  • Change kernel.root_dir to kernel.project_dir
  • Update tests to support PHPUnit 7 and up
  • Update Travis build
  • Minimal PHP version bumped to 7.3 (needed to avoid version conflicts when using up to date / maintained packages)

Remaining issues:

  • The detach method (entity manager) is deprecated and no replacement is available.
  • With Symfony 5 the commands must return a status code. Also, the constructor arguments to the Process class changed. Returning zero and update the creation of Process class still led to failing tests. For now this problem is not relevant. Symfony 5 would have been a nice extra. Note that I made the version constraint more avoid problems in Symfony 5 applications.
  • I really dislike the non dev dependency to symfony/debug. Please consider another solution.

DaanBiesterbos avatar Mar 08 '21 18:03 DaanBiesterbos

@schmittjoh - Please merge it and release it as 3.1.1

y4roc avatar Sep 08 '21 13:09 y4roc

Hello @schmittjoh Can we get an update on this PR please? Thanks a lot

aeyoll avatar Nov 23 '21 09:11 aeyoll

@schmittjoh I am not actively developing this bundle but you can add me as a maitainer if you like. It seems like you are very busy working on other things ;-)

DaanBiesterbos avatar Nov 23 '21 10:11 DaanBiesterbos

I was running in following issue when testing the PR:

Error thrown while running command "jms-job-queue:run --max-runtime=300 --env=prod". Message: "Class 'Symfony\Component\Process\Process' not found"

It was needed to add composer require symfony/process. Please note the error did only pop-up when I was using PROD environment. Seems in DEV it was somehow installed due to a dev dependency.

After that I still had issues when requesting a job detail view:

[2022-02-21T09:10:00.189651+00:00] request.CRITICAL: Uncaught PHP Exception Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: "The "JMS\JobQueueBundle\Controller\JobController::getParameter()" method is missing a parameter bag to work properly. Did you forget to register your controller as a service subscriber? This can be fixed either by using autoconfiguration or by manually wiring a "parameter_bag" in the service locator passed to the controller." at /var/www/html/vendor/symfony/framework-bundle/Controller/AbstractController.php line 68 {"exception":"[object] (Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException(code: 0): The \"JMS\\JobQueueBundle\\Controller\\JobController::getParameter()\" method is missing a parameter bag to work properly. Did you forget to register your controller as a service subscriber? This can be fixed either by using autoconfiguration or by manually wiring a \"parameter_bag\" in the service locator passed to the controller. at /var/www/html/vendor/symfony/framework-bundle/Controller/AbstractController.php:68)"} []

Any idea what I'm doing wrong here?

fnagel avatar Feb 21 '22 09:02 fnagel