The "nullable" column option is not supported, setting it is deprecated; #6276

Closed
opened 2026-01-22 15:30:00 +01:00 by admin · 6 comments
Owner

Originally created by @JoppeDC on GitHub (Aug 1, 2019).

Originally assigned to: @lcobucci on GitHub.

doctrine/annotations                v1.6.0 
doctrine/cache                      v1.8.0 
doctrine/collections                v1.5.0 
doctrine/common                     v2.10.0
doctrine/data-fixtures              v1.3.1 
doctrine/dbal                       v2.9.2 
doctrine/doctrine-bundle            1.10.2 
doctrine/doctrine-cache-bundle      1.3.5  
doctrine/doctrine-fixtures-bundle   v2.4.1 
doctrine/doctrine-migrations-bundle 1.1.1  
doctrine/event-manager              v1.0.0 
doctrine/inflector                  v1.3.0 
doctrine/instantiator               1.2.0  
doctrine/lexer                      v1.0.1 
doctrine/migrations                 v1.8.1 
doctrine/orm                        v2.6.3 
doctrine/persistence                v1.1.0 
doctrine/reflection                 v1.0.0 

Support Question

The last few weeks, i've started getting deprecation errors using doctrine. The error seems to be thrown by Doctrine/dbal, but seems related to this bundle.

I've been looking for an alternative, but can't seem to find it. The Column in doctrine/dbal has the notNull option. The issue was first posted in this repo, but as it turns out that was not correct.

Originally created by @JoppeDC on GitHub (Aug 1, 2019). Originally assigned to: @lcobucci on GitHub. <!-- Fill in the relevant information below to help triage your issue. --> ``` doctrine/annotations v1.6.0 doctrine/cache v1.8.0 doctrine/collections v1.5.0 doctrine/common v2.10.0 doctrine/data-fixtures v1.3.1 doctrine/dbal v2.9.2 doctrine/doctrine-bundle 1.10.2 doctrine/doctrine-cache-bundle 1.3.5 doctrine/doctrine-fixtures-bundle v2.4.1 doctrine/doctrine-migrations-bundle 1.1.1 doctrine/event-manager v1.0.0 doctrine/inflector v1.3.0 doctrine/instantiator 1.2.0 doctrine/lexer v1.0.1 doctrine/migrations v1.8.1 doctrine/orm v2.6.3 doctrine/persistence v1.1.0 doctrine/reflection v1.0.0 ``` <!-- Before asking question here, please try asking on Gitter or Slack first. Find out more about Doctrine support channels here: https://www.doctrine-project.org/community/ Keep in mind that GitHub is primarily an issue tracker. --> ### Support Question <!-- Describe the issue you are facing here. --> The last few weeks, i've started getting deprecation errors using doctrine. The error seems to be thrown by Doctrine/dbal, but seems related to this bundle. I've been looking for an alternative, but can't seem to find it. The Column in doctrine/dbal has the notNull option. The issue was first posted in [this](https://github.com/doctrine/annotations/issues/275) repo, but as it turns out that was not correct.
admin added the Question label 2026-01-22 15:30:00 +01:00
admin closed this issue 2026-01-22 15:30:00 +01:00
Author
Owner

@SenseException commented on GitHub (Aug 5, 2019):

Hi @JoppeDC, can you please post the error message and, if available, an exception trace? Can you please put the mentioned annotation(s) in doctrine/annotations#275 too?

@SenseException commented on GitHub (Aug 5, 2019): Hi @JoppeDC, can you please post the error message and, if available, an exception trace? Can you please put the mentioned annotation(s) in doctrine/annotations#275 too?
Author
Owner

@JoppeDC commented on GitHub (Aug 6, 2019):

@SenseException I've added the stacktrace and error message.

[
  "exception" => ErrorException {
    #message: "User Deprecated: The "nullable" column option is not supported, setting it is deprecated and will cause an error in Doctrine 3.0"
    #code: 0
    #file: "./vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php"
    #line: 85
    #severity: E_USER_DEPRECATED
    trace: {
      ./vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php:85 { …}
      ./vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php:67 { …}
      ./vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Table.php:289 { …}
      ./vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Entity/Listener/StatisticsListener.php:22 { …}
      ./vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php:55 { …}
      ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php:363 { …}
      ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php:113 { …}
      ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php:91 { …}
      ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php:84 { …}
      ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php:70 { …}
      ./vendor/doctrine/doctrine-bundle/Command/Proxy/CreateSchemaDoctrineCommand.php:36 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:255 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:987 { …}
      ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:86 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:255 { …}
      ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:74 { …}
      ./vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45 { …}
      ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148 { …}
      ./bin/console:28 {
        › $application = new Application($kernel);
        › $application->run($input);
        
      }
    }
  }
]
@JoppeDC commented on GitHub (Aug 6, 2019): @SenseException I've added the stacktrace and error message. ```yml [ "exception" => ErrorException { #message: "User Deprecated: The "nullable" column option is not supported, setting it is deprecated and will cause an error in Doctrine 3.0" #code: 0 #file: "./vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php" #line: 85 #severity: E_USER_DEPRECATED trace: { ./vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php:85 { …} ./vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Column.php:67 { …} ./vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/Table.php:289 { …} ./vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Entity/Listener/StatisticsListener.php:22 { …} ./vendor/symfony/symfony/src/Symfony/Bridge/Doctrine/ContainerAwareEventManager.php:55 { …} ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php:363 { …} ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php:113 { …} ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/SchemaTool.php:91 { …} ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/CreateCommand.php:84 { …} ./vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php:70 { …} ./vendor/doctrine/doctrine-bundle/Command/Proxy/CreateSchemaDoctrineCommand.php:36 { …} ./vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:255 { …} ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:987 { …} ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:86 { …} ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:255 { …} ./vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:74 { …} ./vendor/jms/job-queue-bundle/JMS/JobQueueBundle/Console/Application.php:45 { …} ./vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:148 { …} ./bin/console:28 { › $application = new Application($kernel); › $application->run($input); › } } } ] ```
Author
Owner

@SenseException commented on GitHub (Aug 14, 2019):

Can you please put the annotations into this issue too?

@SenseException commented on GitHub (Aug 14, 2019): Can you please put the annotations into this issue too?
Author
Owner

@JoppeDC commented on GitHub (Aug 14, 2019):

@SenseException Here you go. It happens on any field using the nullable option.

     * @var int
     *
     * @ORM\Column(type="integer", name="amount", nullable=true)
     */
    protected $$amount;```
@JoppeDC commented on GitHub (Aug 14, 2019): @SenseException Here you go. It happens on any field using the `nullable` option. ``` /** * @var int * * @ORM\Column(type="integer", name="amount", nullable=true) */ protected $$amount;```
Author
Owner

@SenseException commented on GitHub (Aug 26, 2019):

I can't find anything in the annotation example you show above. BTW: is $$amount a typo?

Every SchemaManager is handling its own array keys creating options with the proper array key notnull. This one should also usually apprear in Table::addColumn() instead of nullable in a simple installation.

Can you please debug where the nullable key is coming from? SchemaTool.php:363 is dispatching an event and it seems that there's a StatisticsListener of the JMSJobQueueBundle that still uses nullable in current versions: https://github.com/schmittjoh/JMSJobQueueBundle/blob/2.0.1/Entity/Listener/StatisticsListener.php

It looks like they fixed it in master. I'm pretty sure that is the source of that problem.

@SenseException commented on GitHub (Aug 26, 2019): I can't find anything in the annotation example you show above. BTW: is `$$amount` a typo? Every SchemaManager is handling its own array keys creating options with the proper array key `notnull`. This one should also usually apprear in `Table::addColumn()` instead of `nullable` in a simple installation. Can you please debug where the `nullable` key is coming from? `SchemaTool.php:363` is dispatching an event and it seems that there's a `StatisticsListener` of the JMSJobQueueBundle that still uses `nullable` in current versions: https://github.com/schmittjoh/JMSJobQueueBundle/blob/2.0.1/Entity/Listener/StatisticsListener.php It looks like they fixed it in master. I'm pretty sure that is the source of that problem.
Author
Owner

@lcobucci commented on GitHub (Oct 2, 2019):

Closing here as per @SenseException's comment.

@lcobucci commented on GitHub (Oct 2, 2019): Closing here as per @SenseException's comment.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6276