If an annotation doesn't have a "config_export" item the error message says:

Drupal\Core\Config\Schema\SchemaIncompleteException: Entity type 'Drupal\Core\Config\Entity\ConfigEntityType' is missing 'config_export' definition in its annotation

It would be more useful if the error message indicated what the annotation is for, it would help track down which annotation is missing the item.

CommentFileSizeAuthor
#16 interdiff_13_16.txt894 bytesanmolgoyal74
#16 drupal-config_export_annotation-3132759-16.patch1.92 KBanmolgoyal74
#14 interdiff_7-13.txt1.67 KBmvonfrie
#13 drupal-config_export_annotation-3132759-13.patch1.95 KBmvonfrie
#12 drupal-config_export_annotation-3132759-12.patch1.95 KBmvonfrie
#11 drupal-config_export_annotation-3132759-11.patch1.98 KBmvonfrie
#10 interdiff_7-10.txt1.69 KBmvonfrie
#10 drupal-config_export_annotation-3132759-10.patch1.98 KBmvonfrie
#9 interdiff_7-9.txt1.69 KBmvonfrie
#9 drupal-config_export_annotation-3132759-9.patch1.98 KBmvonfrie
#7 interdiff-5-7.txt944 bytesAaronBauman
#7 drupal-config_export_annotation-3132759-7.patch1.95 KBAaronBauman
#5 interdiff-2-5.txt747 bytesAaronBauman
#5 drupal-config_export_annotation-3132759-5.patch1.81 KBAaronBauman
#2 drupal-config_export_annotation-3132759-2.patch940 bytesAaronBauman
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

DamienMcKenna created an issue. See original summary.

AaronBauman’s picture

Status: Active » Needs review
FileSize
940 bytes

ConfigEntityTypeInterface defines a getClass() method
We should just use that, which will return the specific class with the annotation issue.

One-liner

Status: Needs review » Needs work

The last submitted patch, 2: drupal-config_export_annotation-3132759-2.patch, failed testing. View results

pavnish’s picture

Assigned: Unassigned » pavnish
AaronBauman’s picture

Status: Needs work » Needs review
FileSize
1.81 KB
747 bytes

Update test coverage for this change.

Status: Needs review » Needs work

The last submitted patch, 5: drupal-config_export_annotation-3132759-5.patch, failed testing. View results

AaronBauman’s picture

Fixed test coverage.

pavnish’s picture

Assigned: pavnish » Unassigned
mvonfrie’s picture

Fixed the patch for 9.0.x.
The method TestCase::expectDeprecationMessageRegExp() has been renamed to TestCase::expectDeprecationMessageMatches().

mvonfrie’s picture

The patched code ends with a blank line which somehow was also shown by the IDE in the #7 patch. Removed the second blank line at the end and hope this works now.

mvonfrie’s picture

mvonfrie’s picture

mvonfrie’s picture

mvonfrie’s picture

Sorry for the clutter. It took me a while to find out that the error "trailing whitespace" actually means "windows line ending" which I forgot to change in my editor after a re-installation.

jungle’s picture

Status: Needs review » Needs work
+++ b/core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityBaseUnitTest.php
@@ -635,8 +635,11 @@ public function testToArraySchemaException() {
+      ->willReturn("Mock_ConfigEntityTypeInterface");
...
+    $this->expectExceptionMessage("Entity type 'Mock_ConfigEntityTypeInterface' is missing 'config_export' definition in its annotation");

The test is green, but in reality, it never throws error on specific Interface, it's against specific Class.

Let's change Mock_ConfigEntityTypeInterface to FooConfigEntity to make sense more

anmolgoyal74’s picture

jungle’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, it's ready to me.

jungle’s picture

Version: 9.0.x-dev » 9.2.x-dev
alexpott’s picture

Version: 9.2.x-dev » 9.1.x-dev
Component: extension system » configuration entity system
Status: Reviewed & tested by the community » Fixed

Committed and pushed b2519618b4 to 9.2.x and c8b93171c9 to 9.1.x. Thanks!

  • alexpott committed b251961 on 9.2.x
    Issue #3132759 by mvonfrie, AaronBauman, anmolgoyal74, jungle,...

  • alexpott committed c8b9317 on 9.1.x
    Issue #3132759 by mvonfrie, AaronBauman, anmolgoyal74, jungle,...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.