Commit 236ef204 authored by Berdir's avatar Berdir Committed by Berdir

Issue #3045296 by Berdir: Remove deprecated code for 8.6 and older

parent 22364a3f
......@@ -6,7 +6,7 @@ type: module
dependencies:
- ctools:ctools
- drupal:path
- drupal:system (>=8.5)
- drupal:system (>=8.6)
- token:token
configure: entity.pathauto_pattern.collection
......
......@@ -7,6 +7,7 @@ use Drupal\Core\Entity\EntityFieldManagerInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Entity\FieldableEntityInterface;
use Drupal\Core\Plugin\Context\ContextDefinition;
use Drupal\Core\Plugin\Context\EntityContextDefinition;
use Drupal\Core\Plugin\Discovery\ContainerDeriverInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\Core\StringTranslation\TranslationInterface;
......@@ -86,7 +87,7 @@ class EntityAliasTypeDeriver extends DeriverBase implements ContainerDeriverInte
$this->derivatives[$entity_type_id]['types'] = [$this->tokenEntityMapper->getTokenTypeForEntityType($entity_type_id)];
$this->derivatives[$entity_type_id]['provider'] = $entity_type->getProvider();
$this->derivatives[$entity_type_id]['context'] = [
$entity_type_id => new ContextDefinition("entity:$entity_type_id", $this->t('@label being aliased', ['@label' => $entity_type->getLabel()]))
$entity_type_id => EntityContextDefinition::fromEntityType($entity_type)->setLabel($this->t('@label being aliased', ['@label' => $entity_type->getLabel()]))
];
}
}
......
......@@ -53,7 +53,7 @@ class PathautoKernelTest extends KernelTestBase {
ConfigurableLanguage::createFromLangcode('fr')->save();
$this->installSchema('node', ['node_access']);
$this->installSchema('system', ['url_alias', 'sequences', 'router']);
$this->installSchema('system', ['sequences']);
$type = NodeType::create(['type' => 'page']);
$type->save();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment