By wim leers on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
8.2.x
Introduced in version:
8.2.2
Issue links:
Description:
The globally defined constants in taxonomy.module have been deprecated in favor of new, equivalent constants in VocabularyInterface.
TAXONOMY_HIERARCHY_DISABLED→VocabularyInterface::HIERARCHY_DISABLEDTAXONOMY_HIERARCHY_SINGLE→VocabularyInterface::HIERARCHY_SINGLETAXONOMY_HIERARCHY_MULTIPLE→VocabularyInterface::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