1,18c1,11 < diff --git a/modules/schemadotorg_demo_umami_content/src/SchemaDotOrgDemoUmamiContentInstallHelper.php b/modules/schemadotorg_demo_umami_content/src/SchemaDotOrgDemoUmamiContentInstallHelper.php < index c3aa5be..d06e6af 100644 < --- a/modules/schemadotorg_demo_umami_content/src/SchemaDotOrgDemoUmamiContentInstallHelper.php < +++ b/modules/schemadotorg_demo_umami_content/src/SchemaDotOrgDemoUmamiContentInstallHelper.php < @@ -2,6 +2,7 @@ < < namespace Drupal\schemadotorg_demo_umami_content; < < +use Drupal\demo_umami_content\InstallHelper; < use Drupal\Component\Utility\Html; < < include \Drupal::root() . '/core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php'; < @@ -14,7 +15,7 @@ include \Drupal::root() . '/core/profiles/demo_umami/modules/demo_umami_content/ < * < * @see \Drupal\demo_umami_content\InstallHelper < */ < -class SchemaDotOrgDemoUmamiContentInstallHelper extends \Drupal\demo_umami_content\InstallHelper { < +class SchemaDotOrgDemoUmamiContentInstallHelper extends InstallHelper { --- > diff --git a/modules/schemadotorg_auto_entitylabel/tests/src/Kernel/SchemaDotOrgAutoEntityLabelTest.php b/modules/schemadotorg_auto_entitylabel/tests/src/Kernel/SchemaDotOrgAutoEntityLabelTest.php > index e06e4c3..015c7a1 100644 > --- a/modules/schemadotorg_auto_entitylabel/tests/src/Kernel/SchemaDotOrgAutoEntityLabelTest.php > +++ b/modules/schemadotorg_auto_entitylabel/tests/src/Kernel/SchemaDotOrgAutoEntityLabelTest.php > @@ -31,7 +31,7 @@ class SchemaDotOrgAutoEntityLabelTest extends SchemaDotOrgKernelEntityTestBase { > /** > * {@inheritdoc} > */ > - protected function setUp() { > + protected function setUp(): void { > parent::setUp(); 19a13,31 > $this->installEntitySchema('node'); > diff --git a/modules/schemadotorg_descriptions/tests/src/Functional/SchemaDotOrgDescriptionsTest.php b/modules/schemadotorg_descriptions/tests/src/Functional/SchemaDotOrgDescriptionsTest.php > index 2649414..38d7a26 100644 > --- a/modules/schemadotorg_descriptions/tests/src/Functional/SchemaDotOrgDescriptionsTest.php > +++ b/modules/schemadotorg_descriptions/tests/src/Functional/SchemaDotOrgDescriptionsTest.php > @@ -30,7 +30,7 @@ class SchemaDotOrgDescriptionsTest extends SchemaDotOrgBrowserTestBase { > /** > * {@inheritdoc} > */ > - protected function setUp() { > + protected function setUp(): void { > parent::setUp(); > $this->placeBlock('help_block'); > } > diff --git a/modules/schemadotorg_inline_entity_form/tests/src/Kernel/SchemaDotOrgInlineEntityFormTest.php b/modules/schemadotorg_inline_entity_form/tests/src/Kernel/SchemaDotOrgInlineEntityFormTest.php > index e91130e..c817c2f 100644 > --- a/modules/schemadotorg_inline_entity_form/tests/src/Kernel/SchemaDotOrgInlineEntityFormTest.php > +++ b/modules/schemadotorg_inline_entity_form/tests/src/Kernel/SchemaDotOrgInlineEntityFormTest.php > @@ -33,7 +33,7 @@ class SchemaDotOrgInlineEntityFormTest extends SchemaDotOrgKernelEntityTestBase 21a34,39 > */ > - protected function setUp() { > + protected function setUp(): void { > parent::setUp(); > > $this->installConfig(['schemadotorg_inline_entity_form']); 23c41 < index 9ecd776..5ef4fa4 100644 --- > index 1b044dc..3d01be9 100644 26c44 < @@ -59,7 +59,7 @@ class SchemaDotOrgJsonApiManagerTest extends SchemaDotOrgKernelTestBase { --- > @@ -61,7 +61,7 @@ class SchemaDotOrgJsonApiManagerTest extends SchemaDotOrgKernelTestBase { 73c91 < index f47d3c0..1bc1774 100644 --- > index 0339022..7656a9b 100644 86c104 < * Hooks related to Schema.org Blueprints JSON-LD module. --- > * Hooks to define and alter Schema.org JSON-LD. 105c123 < @@ -92,8 +97,8 @@ function hook_schemadotorg_jsonld_alter(array &$data, \Drupal\Core\Routing\Route --- > @@ -91,8 +96,8 @@ function hook_schemadotorg_jsonld_alter(array &$data, \Drupal\Core\Routing\Route 116c134 < @@ -129,8 +134,8 @@ function hook_schemadotorg_jsonld_entity_load(array &$data, \Drupal\Core\Entity\ --- > @@ -128,8 +133,8 @@ function hook_schemadotorg_jsonld_entity_load(array &$data, \Drupal\Core\Entity\ 127c145 < @@ -169,7 +174,7 @@ function hook_schemadotorg_jsonld_entity_alter(array &$data, \Drupal\Core\Entity --- > @@ -168,7 +173,7 @@ function hook_schemadotorg_jsonld_entity_alter(array &$data, \Drupal\Core\Entity 137c155 < index d56863b..15efd0e 100644 --- > index f5648b0..045e13f 100644 140c158 < @@ -35,7 +35,7 @@ class SchemaDotOrgJsonLdBuilderTest extends SchemaDotOrgKernelEntityTestBase { --- > @@ -34,7 +34,7 @@ class SchemaDotOrgJsonLdBuilderTest extends SchemaDotOrgKernelEntityTestBase { 150c168 < index 0145a1d..525b661 100644 --- > index a2a4ae8..0e1e820 100644 153c171 < @@ -38,7 +38,7 @@ class SchemaDotOrgJsonLdManagerTest extends SchemaDotOrgKernelEntityTestBase { --- > @@ -36,7 +36,7 @@ class SchemaDotOrgJsonLdManagerTest extends SchemaDotOrgKernelEntityTestBase { 213c231 < index 32d0cf3..53fe3fd 100644 --- > index 8f8235d..6da15e1 100644 216c234 < @@ -51,7 +51,7 @@ class SchemaDotOrgJsonLdEmbedTest extends SchemaDotOrgKernelEntityTestBase { --- > @@ -50,7 +50,7 @@ class SchemaDotOrgJsonLdEmbedTest extends SchemaDotOrgKernelEntityTestBase { 224a243,292 > diff --git a/modules/schemadotorg_mapping_set/tests/src/Kernel/SchemaDotOrgMappingSetManagerTest.php b/modules/schemadotorg_mapping_set/tests/src/Kernel/SchemaDotOrgMappingSetManagerTest.php > index 2badbf5..7e7ef49 100644 > --- a/modules/schemadotorg_mapping_set/tests/src/Kernel/SchemaDotOrgMappingSetManagerTest.php > +++ b/modules/schemadotorg_mapping_set/tests/src/Kernel/SchemaDotOrgMappingSetManagerTest.php > @@ -40,7 +40,7 @@ class SchemaDotOrgMappingSetManagerTest extends SchemaDotOrgKernelEntityTestBase > /** > * {@inheritdoc} > */ > - protected function setUp() { > + protected function setUp(): void { > parent::setUp(); > > $this->installConfig(['schemadotorg_mapping_set']); > diff --git a/modules/schemadotorg_mapping_set/tests/src/Unit/Breadcrumb/SchemaDotOrgMappingSetBreadcrumbBuilderTest.php b/modules/schemadotorg_mapping_set/tests/src/Unit/Breadcrumb/SchemaDotOrgMappingSetBreadcrumbBuilderTest.php > index a92e651..1604b98 100644 > --- a/modules/schemadotorg_mapping_set/tests/src/Unit/Breadcrumb/SchemaDotOrgMappingSetBreadcrumbBuilderTest.php > +++ b/modules/schemadotorg_mapping_set/tests/src/Unit/Breadcrumb/SchemaDotOrgMappingSetBreadcrumbBuilderTest.php > @@ -24,9 +24,7 @@ class SchemaDotOrgMappingSetBreadcrumbBuilderTest extends UnitTestCase { > // @see \Drupal\Core\Breadcrumb\Breadcrumb > // @see \Drupal\Core\Cache\RefinableCacheableDependencyTrait > // @see \Drupal\Core\Cache\Cache > - $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') > - ->disableOriginalConstructor() > - ->getMock(); > + $cache_contexts_manager = $this->createMock('Drupal\Core\Cache\Context\CacheContextsManager'); > // Always return TRUE for ::assertValidTokens so that any cache context > // will be accepted. > $cache_contexts_manager->method('assertValidTokens')->willReturn(TRUE); > @@ -49,9 +47,7 @@ class SchemaDotOrgMappingSetBreadcrumbBuilderTest extends UnitTestCase { > * @covers ::applies > */ > public function testApplies($expected, $route_name = NULL) { > - $breadcrumb_builder = $this->getMockBuilder('\Drupal\schemadotorg_mapping_set\Breadcrumb\SchemaDotOrgMappingSetBreadcrumbBuilder') > - ->onlyMethods([]) > - ->getMock(); > + $breadcrumb_builder = $this->createMock('\Drupal\schemadotorg_mapping_set\Breadcrumb\SchemaDotOrgMappingSetBreadcrumbBuilder'); > > $route_match = $this->createMock('Drupal\Core\Routing\RouteMatchInterface'); > $route_match->expects($this->once()) > @@ -87,9 +83,7 @@ class SchemaDotOrgMappingSetBreadcrumbBuilderTest extends UnitTestCase { > */ > public function testBuild() { > // Build a breadcrumb builder to test. > - $breadcrumb_builder = $this->getMockBuilder('\Drupal\schemadotorg_mapping_set\Breadcrumb\SchemaDotOrgMappingSetBreadcrumbBuilder') > - ->onlyMethods([]) > - ->getMock(); > + $breadcrumb_builder = $this->createMock('\Drupal\schemadotorg_mapping_set\Breadcrumb\SchemaDotOrgMappingSetBreadcrumbBuilder'); > > // Add a translation manager for t(). > $translation_manager = $this->getStringTranslationStub(); 226c294 < index 020e2f0..5561778 100644 --- > index d9b9314..b941400 100644 229c297 < @@ -29,7 +29,7 @@ class SchemaDotOrgParagraphsTest extends SchemaDotOrgKernelEntityTestBase { --- > @@ -39,7 +39,7 @@ class SchemaDotOrgParagraphsTest extends SchemaDotOrgKernelEntityTestBase { 237c305 < $this->installConfig(['schemadotorg_paragraphs']); --- > $this->installEntitySchema('view'); 239c307 < index b3352ab..877e54a 100644 --- > index a18a569..c9e4ea2 100644 242c310 < @@ -38,7 +38,7 @@ class SchemaDotOrgRdfTest extends SchemaDotOrgBrowserTestBase { --- > @@ -42,7 +42,7 @@ class SchemaDotOrgRdfTest extends SchemaDotOrgBrowserTestBase { 252c320 < index 54e1c2f..61493f0 100644 --- > index c69d261..078a831 100644 302c370 < index 5fdb7c4..a266de8 100644 --- > index 99eda04..60e3a2b 100644 305c373,381 < @@ -36,9 +36,7 @@ class SchemaDotOrgReportFilterFormTest extends UnitTestCase { --- > @@ -35,16 +35,12 @@ class SchemaDotOrgReportFilterFormTest extends UnitTestCase { > $container->set('string_translation', $this->getStringTranslationStub()); > > // Mock URL generator. > - $url_generator = $this->getMockBuilder('Drupal\Core\Routing\UrlGenerator') > - ->disableOriginalConstructor() > - ->getMock(); > + $url_generator = $this->createMock('Drupal\Core\Routing\UrlGenerator'); > $container->set('url_generator', $url_generator); 315a392,428 > diff --git a/modules/schemadotorg_subtype/tests/src/Unit/SchemaDotOrgSubtypeBreadcrumbBuilderTest.php b/modules/schemadotorg_subtype/tests/src/Unit/SchemaDotOrgSubtypeBreadcrumbBuilderTest.php > index 50ae3b1..818408e 100644 > --- a/modules/schemadotorg_subtype/tests/src/Unit/SchemaDotOrgSubtypeBreadcrumbBuilderTest.php > +++ b/modules/schemadotorg_subtype/tests/src/Unit/SchemaDotOrgSubtypeBreadcrumbBuilderTest.php > @@ -24,9 +24,7 @@ class SchemaDotOrgSubtypeBreadcrumbBuilderTest extends UnitTestCase { > // @see \Drupal\Core\Breadcrumb\Breadcrumb > // @see \Drupal\Core\Cache\RefinableCacheableDependencyTrait > // @see \Drupal\Core\Cache\Cache > - $cache_contexts_manager = $this->getMockBuilder('Drupal\Core\Cache\Context\CacheContextsManager') > - ->disableOriginalConstructor() > - ->getMock(); > + $cache_contexts_manager = $this->createMock('Drupal\Core\Cache\Context\CacheContextsManager'); > // Always return TRUE for ::assertValidTokens so that any cache context > // will be accepted. > $cache_contexts_manager->method('assertValidTokens')->willReturn(TRUE); > @@ -49,9 +47,7 @@ class SchemaDotOrgSubtypeBreadcrumbBuilderTest extends UnitTestCase { > * @covers ::applies > */ > public function testApplies($expected, $route_name = NULL) { > - $breadcrumb_builder = $this->getMockBuilder('\Drupal\schemadotorg_subtype\Breadcrumb\SchemaDotOrgSubtypeBreadcrumbBuilder') > - ->onlyMethods([]) > - ->getMock(); > + $breadcrumb_builder = $this->createMock('\Drupal\schemadotorg_subtype\Breadcrumb\SchemaDotOrgSubtypeBreadcrumbBuilder'); > > $route_match = $this->createMock('Drupal\Core\Routing\RouteMatchInterface'); > $route_match->expects($this->once()) > @@ -86,9 +82,7 @@ class SchemaDotOrgSubtypeBreadcrumbBuilderTest extends UnitTestCase { > */ > public function testBuild() { > // Build a breadcrumb builder to test. > - $breadcrumb_builder = $this->getMockBuilder('\Drupal\schemadotorg_subtype\Breadcrumb\SchemaDotOrgSubtypeBreadcrumbBuilder') > - ->onlyMethods([]) > - ->getMock(); > + $breadcrumb_builder = $this->createMock('\Drupal\schemadotorg_subtype\Breadcrumb\SchemaDotOrgSubtypeBreadcrumbBuilder'); > > // Add a translation manager for t(). > $translation_manager = $this->getStringTranslationStub(); 343c456 < index f0851ac..d9055f8 100644 --- > index 77cd3c9..5cf2eca 100644 346c459 < @@ -38,7 +38,7 @@ class SchemaDotOrgTaxonomyPropertyVocabularyManagerTest extends SchemaDotOrgKern --- > @@ -37,7 +37,7 @@ class SchemaDotOrgTaxonomyPropertyVocabularyManagerTest extends SchemaDotOrgKern 356c469 < index d916926..7b51341 100644 --- > index 1e9af79..da1dd09 100644 359c472 < @@ -53,7 +53,7 @@ class SchemaDotOrgTranslationManagerTest extends SchemaDotOrgKernelEntityTestBas --- > @@ -52,7 +52,7 @@ class SchemaDotOrgTranslationManagerTest extends SchemaDotOrgKernelEntityTestBas 367a481,521 > diff --git a/schemadotorg.api.php b/schemadotorg.api.php > index 2ab439d..f2983b7 100644 > --- a/schemadotorg.api.php > +++ b/schemadotorg.api.php > @@ -1,5 +1,6 @@ > > +use Drupal\schemadotorg\SchemaDotOrgEntityFieldManagerInterface; > /** > * @file > * Hooks to define and alter mappings, entity types and fields. > @@ -170,7 +171,7 @@ function hook_schemadotorg_mapping_defaults($entity_type_id, $bundle, $schema_ty > // Get the field name which can either be _add_ or empty. > // This value is displayed via a checkbox. > $name = (!$mapping && in_array($schema_type, $default_subtypes)) > - ? \Drupal\schemadotorg\SchemaDotOrgEntityFieldManagerInterface::ADD_FIELD > + ? SchemaDotOrgEntityFieldManagerInterface::ADD_FIELD > : ''; > > // Get machine name with subtype suffix. > diff --git a/src/SchemaDotOrgHelpManager.php b/src/SchemaDotOrgHelpManager.php > index 7ec7bc6..c546f9f 100644 > --- a/src/SchemaDotOrgHelpManager.php > +++ b/src/SchemaDotOrgHelpManager.php > @@ -2,6 +2,7 @@ > > namespace Drupal\schemadotorg; > > +use Michelf\Markdown; > use Drupal\Core\Extension\ExtensionPathResolver; > use Drupal\Core\Routing\RouteMatchInterface; > use Drupal\Core\StringTranslation\StringTranslationTrait; > @@ -87,7 +88,7 @@ class SchemaDotOrgHelpManager implements SchemaDotOrgHelpManagerInterface { > if (class_exists('\Michelf\Markdown')) { > return [ > // phpcs:ignore Drupal.Classes.FullyQualifiedNamespace.UseStatementMissing > - '#markup' => \Michelf\Markdown::defaultTransform($contents), > + '#markup' => Markdown::defaultTransform($contents), > ]; > } > else { 380a535,547 > diff --git a/tests/src/Kernel/SchemaDotOrgEntityDisplayBuilderTest.php b/tests/src/Kernel/SchemaDotOrgEntityDisplayBuilderTest.php > index 454c2d9..408147d 100644 > --- a/tests/src/Kernel/SchemaDotOrgEntityDisplayBuilderTest.php > +++ b/tests/src/Kernel/SchemaDotOrgEntityDisplayBuilderTest.php > @@ -38,7 +38,7 @@ class SchemaDotOrgEntityDisplayBuilderTest extends SchemaDotOrgKernelEntityTestB > /** > * {@inheritdoc} > */ > - protected function setUp() { > + protected function setUp(): void { > parent::setUp(); > > $this->entityDisplayRepository = $this->container->get('entity_display.repository'); 393a561,599 > diff --git a/tests/src/Kernel/SchemaDotOrgEntityTest.php b/tests/src/Kernel/SchemaDotOrgEntityTest.php > index c68679d..bfe0894 100644 > --- a/tests/src/Kernel/SchemaDotOrgEntityTest.php > +++ b/tests/src/Kernel/SchemaDotOrgEntityTest.php > @@ -21,7 +21,7 @@ class SchemaDotOrgEntityTest extends SchemaDotOrgKernelEntityTestBase { > /** > * {@inheritdoc} > */ > - protected function setUp() { > + protected function setUp(): void { > parent::setUp(); > $this->installConfig(['schemadotorg_subtype']); > } > diff --git a/tests/src/Kernel/SchemaDotOrgEntityTypeBuilderTest.php b/tests/src/Kernel/SchemaDotOrgEntityTypeBuilderTest.php > index 9f245a4..91921c6 100644 > --- a/tests/src/Kernel/SchemaDotOrgEntityTypeBuilderTest.php > +++ b/tests/src/Kernel/SchemaDotOrgEntityTypeBuilderTest.php > @@ -32,7 +32,7 @@ class SchemaDotOrgEntityTypeBuilderTest extends SchemaDotOrgKernelEntityTestBase > /** > * {@inheritdoc} > */ > - protected function setUp() { > + protected function setUp(): void { > parent::setUp(); > > $this->entityDisplayRepository = $this->container->get('entity_display.repository'); > diff --git a/tests/src/Kernel/SchemaDotOrgInstallerTest.php b/tests/src/Kernel/SchemaDotOrgInstallerTest.php > index dbb903a..3c2b0ac 100644 > --- a/tests/src/Kernel/SchemaDotOrgInstallerTest.php > +++ b/tests/src/Kernel/SchemaDotOrgInstallerTest.php > @@ -20,7 +20,7 @@ class SchemaDotOrgInstallerTest extends SchemaDotOrgKernelTestBase { > /** > * {@inheritdoc} > */ > - protected function setUp() { > + protected function setUp(): void { > parent::setUp(); > > $this->installer = $this->container->get('schemadotorg.installer'); 395c601 < index 7c91f72..dc766d4 100644 --- > index 3d38245..64a2e99 100644 408c614 < index d6fef9e..db17842 100644 --- > index a929fc4..ab26ed2 100644 411c617 < @@ -63,7 +63,7 @@ class SchemaDotOrgMappingEntityTest extends SchemaDotOrgKernelTestBase { --- > @@ -64,7 +64,7 @@ class SchemaDotOrgMappingEntityTest extends SchemaDotOrgKernelTestBase { 434c640 < index b4d6c0f..4a6f53f 100644 --- > index 35dd791..5ebc97b 100644 437c643 < @@ -41,7 +41,7 @@ class SchemaDotOrgMappingManagerTest extends SchemaDotOrgKernelTestBase { --- > @@ -49,7 +49,7 @@ class SchemaDotOrgMappingManagerTest extends SchemaDotOrgKernelTestBase { 447c653 < index 2efaf90..c834d7f 100644 --- > index b1ec1ec..6501968 100644 450c656 < @@ -38,7 +38,7 @@ class SchemaDotOrgMappingStorageTest extends SchemaDotOrgKernelTestBase { --- > @@ -41,7 +41,7 @@ class SchemaDotOrgMappingStorageTest extends SchemaDotOrgKernelTestBase { 460c666 < index a938e9f..0b08da6 100644 --- > index 15693bc..49b6244 100644 473c679 < index e30a35a..9ddd965 100644 --- > index 8d45e90..ce9dbef 100644 476c682 < @@ -41,7 +41,7 @@ class SchemaDotOrgMappingTypeStorageTest extends SchemaDotOrgKernelTestBase { --- > @@ -36,7 +36,7 @@ class SchemaDotOrgMappingTypeStorageTest extends SchemaDotOrgKernelTestBase { 486c692 < index 4030b4b..3c30679 100644 --- > index c7f5a16..8d91feb 100644 499c705 < index b326e34..b634297 100644 --- > index 0f05464..ed2a80e 100644 549c755 < index ab345aa..cdebbe7 100644 --- > index 933ba38..d019ffd 100644 552c758 < @@ -50,9 +50,7 @@ class SchemaDotOrgSchemaTypeBuilderTest extends UnitTestCase { --- > @@ -49,9 +49,7 @@ class SchemaDotOrgSchemaTypeBuilderTest extends UnitTestCase {