Commit 99867562 authored by catch's avatar catch
Browse files

fix: #3557505...

fix: #3557505 \Drupal\Core\Entity\EntityLastInstalledSchemaRepository::getLastInstalledDefinition() triggers deprecations on PHP 8.5

By: @alexpott
By: @smustgrave
(cherry picked from commit 59fd86e6)
parent ad6eb723
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -300,6 +300,9 @@ public function addField($field, $type, $langcode) {
          if (!$entity_type_id && $target_definition instanceof EntityDataDefinitionInterface) {
            $entity_type_id = $target_definition->getEntityTypeId();
          }
          if (!$entity_type_id) {
            throw new QueryException(sprintf("Cannot determine entity type for relationship '%s' for field '%s'", $relationship_specifier ?? '', $field));
          }
          $entity_type = $this->entityTypeManager->getActiveDefinition($entity_type_id);
          $field_storage_definitions = $this->entityFieldManager->getActiveFieldStorageDefinitions($entity_type_id);
          // Add the new entity base table using the table and sql column.
+2 −2
Original line number Diff line number Diff line
@@ -4,7 +4,6 @@

namespace Drupal\KernelTests\Core\Entity;

use Drupal\Component\Plugin\Exception\PluginNotFoundException;
use Drupal\Core\Entity\Query\QueryException;
use Drupal\entity_test\Entity\EntityTest;
use Drupal\entity_test\EntityTestHelper;
@@ -218,7 +217,8 @@ public function testQuery(): void {
   * Tests the invalid specifier in the query relationship.
   */
  public function testInvalidSpecifier(): void {
    $this->expectException(PluginNotFoundException::class);
    $this->expectException(QueryException::class);
    $this->expectExceptionMessage("Cannot determine entity type for relationship 'language' for field 'langcode.language.foo'");
    $this->container
      ->get('entity_type.manager')
      ->getStorage('taxonomy_term')