schmittjoh / JMSJobQueueBundle

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

jms_job_safe_object deprecation warning triggered in bundle extension #231

Open bluser86 opened 5 years ago

bluser86 commented 5 years ago

The bundle extension triggers a deprecation warning when configuring the "jms_job_safe_object" doctrine type.

    public function prepend(ContainerBuilder $container)
    {
        $container->prependExtensionConfig('doctrine', array(
            'dbal' => array(
                'types' => array(
                    'jms_job_safe_object' => array(
                        'class' => SafeObjectType::class,
                        'commented' => true,
                    )
                )
            )
        ));
    }

The received deprecation warning is emitted by the \Doctrine\Bundle\DoctrineBundle\ConnectionFactory:

User Deprecated: The type "jms_job_safe_object" was explicitly marked as commented in its configuration. This is no longer necessary and will be removed in DoctrineBundle 2.0. Please remove the "commented" attribute from the type configuration.

Our current version of the job queue bundle is 1.4.3 and the doctrine bundle is 1.11.2.

const-nawata commented 4 years ago

I use the last version of this bundle (^2.0) and have the same warning. I think, it is necessary to change type from 'jms_job_safe_object' to another one at vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Entity/Job.php, line 161.

cve commented 4 years ago

With docker runing bin/console is stale

curtchan commented 4 years ago

Won't removing 'commented' => true be enough?

dczech commented 3 years ago

according to https://github.com/doctrine/DoctrineBundle/issues/977 'commented' => true should be removed and

public function requiresSQLCommentHint(AbstractPlatform $platform) : bool
    {
        return true;
    }

should be added to type class

tommym9 commented 1 year ago

Could this changed be rolled into a new release? I'm on the 2.1.0 version of this and getting this warning.