Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown column type "dateinterval" requested #6514

Closed
Kwadz opened this issue Jun 21, 2017 · 3 comments
Closed

Unknown column type "dateinterval" requested #6514

Kwadz opened this issue Jun 21, 2017 · 3 comments

Comments

@Kwadz
Copy link

Kwadz commented Jun 21, 2017

The documentation mentions we can use dateinterval type.

However when I try to use it like:

    /**
     * @ORM\Column(type="dateinterval")
     */
    private $updateInterval;

I get:

  [Doctrine\DBAL\DBALException]
  Unknown column type "dateinterval" requested. Any Doctrine type that you use has to be registered with \Doctrine\
  DBAL\Types\Type::addType(). You can get a list of all the known types with \Doctrine\DBAL\Types\Type::getTypesMap
  (). If this error occurs during database introspection then you might have forgot to register all database types
  for a Doctrine Type. Use AbstractPlatform#registerDoctrineTypeMapping() or have your custom types implement Type#
  getMappedDatabaseTypes(). If the type name is empty you might have a problem with the cache or forgot some mappin
  g information.

I am using doctrine/dbal v2.5.12 and doctrine/orm v2.5.6.

@Ocramius
Copy link
Member

@Kwadz that's only for DBAL master (2.6) as per doctrine/dbal#854

@Kwadz
Copy link
Author

Kwadz commented Jun 21, 2017

@Ocramius In this case, to avoid confusion, may be we should mention it in the doc like it's done for datetime-immutable with:

Available since version 2.6.

@Ocramius
Copy link
Member

@Kwadz that's a long standing issue with the documentation in general: we want to split it at RST compilation level, but never managed to do so.

See doctrine/doctrine-website-sphinx#149

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

No branches or pull requests

2 participants