diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php index a07d17bd55..958e26b042 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -55,7 +55,7 @@ class ContentEntityForm extends EntityForm implements ContentEntityFormInterface */ public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL) { if ($entity_repository instanceof EntityManagerInterface) { - @trigger_error('Passing the entity.manager service to ContentEntityForm::__construct() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0.', E_USER_DEPRECATED); + @trigger_error('Passing the entity.manager service to ContentEntityForm::__construct() is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Pass the entity.repository service instead. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED); } $this->entityRepository = $entity_repository; $this->entityTypeBundleInfo = $entity_type_bundle_info ?: \Drupal::service('entity_type.bundle.info'); diff --git a/core/tests/Drupal/Tests/Core/Entity/ContentEntityFormTest.php b/core/tests/Drupal/Tests/Core/Entity/ContentEntityFormTest.php new file mode 100644 index 0000000000..d4f884575b --- /dev/null +++ b/core/tests/Drupal/Tests/Core/Entity/ContentEntityFormTest.php @@ -0,0 +1,28 @@ +prophesize(EntityManagerInterface::class)->reveal(); + $entity_type_bundle_info = $this->prophesize(EntityTypeBundleInfoInterface::class)->reveal(); + $time = $this->prophesize(TimeInterface::class)->reveal(); + new ContentEntityForm($entity_manager, $entity_type_bundle_info, $time); + } + +}