only in patch2: unchanged: --- a/src/Form/POSForm.php +++ b/src/Form/POSForm.php @@ -8,7 +8,7 @@ use Drupal\commerce_price\Price; use Drupal\commerce_store\CurrentStore; use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Entity\ContentEntityForm; -use Drupal\Core\Entity\EntityManagerInterface; +use Drupal\Core\Entity\EntityRepositoryInterface; use Drupal\Core\Entity\EntityTypeBundleInfoInterface; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; @@ -45,8 +45,8 @@ class POSForm extends ContentEntityForm { /** * Constructs a new POSForm object. * - * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager - * The entity manager. + * @param \Drupal\Core\Entity\EntityRepositoryInterface $entity_repository + * The entity repository service. * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info * The entity type bundle info. * @param \Drupal\Component\Datetime\TimeInterface $time @@ -56,8 +56,8 @@ class POSForm extends ContentEntityForm { * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory * Used for storing the current active order. */ - public function __construct(EntityManagerInterface $entity_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, CurrentStore $current_store, PrivateTempStoreFactory $temp_store_factory) { - parent::__construct($entity_manager, $entity_type_bundle_info, $time); + public function __construct(EntityRepositoryInterface $entity_repository, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, CurrentStore $current_store, PrivateTempStoreFactory $temp_store_factory) { + parent::__construct($entity_repository, $entity_type_bundle_info, $time); $this->currentStore = $current_store; // This is a hack around what I think is a php bug, at least in 7.1.15 @@ -71,7 +71,7 @@ class POSForm extends ContentEntityForm { */ public static function create(ContainerInterface $container) { return new static( - $container->get('entity.manager'), + $container->get('entity.repository'), $container->get('entity_type.bundle.info'), $container->get('datetime.time'), $container->get('commerce_store.current_store'),