Unverified Commit f2469de9 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3087546 by Berdir, alexpott, martin107, jibran: Remove deprecated entity manager

parent 2a009c5e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -818,8 +818,8 @@
 *   special methods for accessing commonly-used services, or you can call a
 *   generic method to access any service. Examples:
 *   @code
 *   // Retrieve the entity.manager service object (special method exists).
 *   $manager = \Drupal::entityManager();
 *   // Retrieve the entity_type.manager service object (special method exists).
 *   $entity_type_manager = \Drupal::entityTypeManager();
 *   // Retrieve the service object for machine name 'foo.bar'.
 *   $foobar = \Drupal::service('foo.bar');
 *   @endcode
+0 −12
Original line number Diff line number Diff line
@@ -553,12 +553,6 @@ services:
  theme_installer:
    class: Drupal\Core\Extension\ThemeInstaller
    arguments: ['@theme_handler', '@config.factory', '@config.installer', '@module_handler', '@config.manager', '@asset.css.collection_optimizer', '@router.builder', '@logger.channel.default', '@state']
  # @deprecated in Drupal 8.0.x and will be removed before 9.0.0. Use the other
  #   entity* services instead.
  entity.manager:
    class: Drupal\Core\Entity\EntityManager
    parent: container.trait
    deprecated: The "%service_id%" service is deprecated. You should use the 'entity_type.manager' service instead.
  entity.memory_cache:
    class: Drupal\Core\Cache\MemoryCache\MemoryCache
  entity_type.manager:
@@ -918,12 +912,6 @@ services:
    arguments: ['@state']
    tags:
      - { name: event_subscriber }
  entity.query:
    class: Drupal\Core\Entity\Query\QueryFactory
    arguments: ['@entity_type.manager']
    calls:
      - [setContainer, ['@service_container']]
    deprecated: The "%service_id%" service is deprecated. Use the 'entity_type.manager' service to get an entity type's storage object and then call \Drupal\Core\Entity\EntityStorageInterface::getQuery() or \Drupal\Core\Entity\EntityStorageInterface::getAggregateQuery() instead. See https://www.drupal.org/node/2849874
  entity.query.config:
    class: Drupal\Core\Config\Entity\Query\QueryFactory
    arguments: ['@config.factory', '@keyvalue', '@config.manager']

core/includes/entity.inc

deleted100644 → 0
+0 −485

File deleted.

Preview size limit exceeded, changes collapsed.

+0 −1
Original line number Diff line number Diff line
@@ -350,7 +350,6 @@ function install_begin_request($class_loader, &$install_state) {

  // Load module basics (needed for hook invokes).
  include_once __DIR__ . '/module.inc';
  require_once __DIR__ . '/entity.inc';

  // Create a minimal mocked container to support calls to t() in the pre-kernel
  // base system verification code paths below. The strings are not actually
+0 −17
Original line number Diff line number Diff line
@@ -257,23 +257,6 @@ public static function currentUser() {
    return static::getContainer()->get('current_user');
  }

  /**
   * Retrieves the entity manager service.
   *
   * @return \Drupal\Core\Entity\EntityManagerInterface
   *   The entity manager service.
   *
   * @deprecated in drupal:8.0.0 and is removed from drupal:9.0.0.
   *   Use \Drupal::entityTypeManager() instead in most cases. If the needed
   *   method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the
   *   deprecated \Drupal\Core\Entity\EntityManager to find the
   *   correct interface or service.
   */
  public static function entityManager() {
    @trigger_error("\Drupal::entityManager() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal::entityTypeManager() instead in most cases. If the needed method is not on \Drupal\Core\Entity\EntityTypeManagerInterface, see the deprecated \Drupal\Core\Entity\EntityManager to find the correct interface or service. See https://www.drupal.org/node/2549139", E_USER_DEPRECATED);
    return static::getContainer()->get('entity.manager');
  }

  /**
   * Retrieves the entity type manager.
   *
Loading