Change record status: 
Project: 
Introduced in branch: 
8.2.x
Introduced in version: 
8.2.2
Description: 

The globally defined constants in taxonomy.module have been deprecated in favor of new, equivalent constants in VocabularyInterface.

  • TAXONOMY_HIERARCHY_DISABLEDVocabularyInterface::HIERARCHY_DISABLED
  • TAXONOMY_HIERARCHY_SINGLEVocabularyInterface::HIERARCHY_SINGLE
  • TAXONOMY_HIERARCHY_MULTIPLEVocabularyInterface::HIERARCHY_MULTIPLE

The old constants continue to work, so all code continues to work; they are only deprecated!

The reason this change was made: if a Vocabulary entity is cached, and read at an early stage from cache (before Drupal modules are loaded), this will result in PHP errors.

Note that you may only stop using the deprecated constants if your code only supports 8.2.x or newer, otherwise your code will cease to work for 8.1.x. So, be careful not to use the new constants if you maintain a contributed module that is also used on 8.1.x!

Impacts: 
Module developers