diff -u b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php --- b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php @@ -261,7 +261,16 @@ } /** - * {@inheritdoc} + * Overrides \Drupal\Core\Entity\Entity::save(). + * + * @return + * Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed. + * + * @throws \Drupal\field\FieldException + * If the field definition is invalid. + * + * @throws \Drupal\Core\Entity\EntityStorageException + * In case of failures at the configuration storage level. */ public function save() { // Clear the derived data about the field. @@ -281,8 +290,11 @@ * @return * SAVED_NEW if the definition was saved. * + * @throws \Drupal\field\FieldException + * If the field definition is invalid. + * * @throws \Drupal\Core\Entity\EntityStorageException - * In case of failures an exception is thrown. + * In case of failures at the configuration storage level. */ protected function saveNew() { $module_handler = \Drupal::moduleHandler(); @@ -365,8 +377,11 @@ * @return * SAVED_UPDATED if the definition was saved. * + * @throws \Drupal\field\FieldException + * If the field definition is invalid. + * * @throws \Drupal\Core\Entity\EntityStorageException - * In case of failures an exception is thrown. + * In case of failures at the configuration storage level. */ protected function saveUpdated() { $module_handler = \Drupal::moduleHandler(); diff -u b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php --- b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php +++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php @@ -316,7 +316,16 @@ } /** - * {@inheritdoc} + * Overrides \Drupal\Core\Entity\Entity::save(). + * + * @return + * Either SAVED_NEW or SAVED_UPDATED, depending on the operation performed. + * + * @throws \Drupal\field\FieldException + * If the field instance definition is invalid. + * + * @throws \Drupal\Core\Entity\EntityStorageException + * In case of failures at the configuration storage level. */ public function save() { if ($this->isNew()) { @@ -333,8 +342,11 @@ * @return * SAVED_NEW if the definition was saved. * + * @throws \Drupal\field\FieldException + * If the field instance definition is invalid. + * * @throws \Drupal\Core\Entity\EntityStorageException - * In case of failures an exception is thrown. + * In case of failures at the configuration storage level. */ protected function saveNew() { $module_handler = \Drupal::moduleHandler(); @@ -377,8 +389,11 @@ * @return * SAVED_UPDATED if the definition was saved. * + * @throws \Drupal\field\FieldException + * If the field instance definition is invalid. + * * @throws \Drupal\Core\Entity\EntityStorageException - * In case of failures an exception is thrown. + * In case of failures at the configuration storage level. */ protected function saveUpdated() { $module_handler = \Drupal::moduleHandler();