Problem/Motivation

The business_rules_action (defined in \Drupal\business_rules\Entity\Action), business_rules_condition (defined in \Drupal\business_rules\Entity\Condition), and business_rules_variable (defined in \Drupal\business_rules\Entity\Variable) entity types are config entity, with corresponding @ConfigEntityType annotations.

As of 8.6.0, ConfigEntityType annotations need to define a config_export key so that they can be exported properly. See the annotation for core's \Drupal\block\Entity\Block for an illustrative example.

This will need to be fixed to be compatible with D9, and to avoid notices like the following:

Entity type "business_rules_variable" is using config schema as a fallback for a missing `config_export` definition is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. See https://www.drupal.org/node/2949023.

Proposed resolution

Add config_export keys for Actions, Conditions, and Variables.

Remaining tasks

  1. Determine what needs to be added to the config_export key in the @ConfigEntityType annotation for Actions, update issue summary
  2. Determine what needs to be added to the config_export key in the @ConfigEntityType annotation for Conditions, update issue summary
  3. Determine what needs to be added to the config_export key in the @ConfigEntityType annotation for Variables, update issue summary
  4. Write a patch
  5. Review and feedback
  6. RTBC and feedback
  7. Commit

User interface changes

None.

API changes

Compatibility with Drupal 9.

Data model changes

None.

Comments

mparker17 created an issue. See original summary.

billdaff’s picture

StatusFileSize
new2.9 KB

Hello, I had to create a patch to address this for my own Drupal site. This is my first post/contribution so I am not sure if I generated the patch correctly. Sorry if it is not, but it works for me using patch files in composer and maybe it will help someone else.

mparker17’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new4.06 KB

Hi @billdaff! Welcome to the Drupal community, and thank you for contributing!

(as an aside, I noticed that your drupal.org user account had not yet been confirmed as "not a spammer" so I've done that for you... you can read more about what that means here)

Your patch is excellent, although it was missing some metadata that makes it easy for Git to figure out how to apply it (Git prefers patches in unified format). So I've re-uploaded your patch some more of that metadata and I've uploaded it to this message (Git extends the unified format even further with info about which commit you started from, making merge conflicts less likely). If you're interested in the method I used, I've thoroughly-documented it in a blog post. I've made sure to credit you in the patch.

I also renamed the patch slightly to include Drupal.org's issue ID (3172492) and comment number that I intend to upload to (#3), in order to make it a bit easier for the maintainers (who are likely to end up with a whole bunch of patches in their Downloads folder).

Also, a pro tip, once you've uploaded a patch, change the issue status to "Needs Review" to indicate to maintainers and other people using the module that you'd like them to review your patch! That also tells Testbot to run automated tests on your patch to ensure there aren't any regressions.

I'm currently in the middle of other client work right now but I'll try to manually test your patch soon, and if everything works, move it to RTBC ("Reviewed and Tested By the Community").

Thank you and welcome! :D

mparker17’s picture

(EDIT - in this comment, I tried to change the issue's credits but was unsuccessful)

Note testbot's report of a "composer require-dev failure" is an issue with the business_rules-8.x-1.x branch, not your patch!: https://www.drupal.org/node/2863145/qa

nwom’s picture

Status: Needs review » Reviewed & tested by the community

#3 works perfectly. Thank you!

colan’s picture

Title: [D9] Define config_export in @ConfigEntityType annotation for Action, Condition, Variable » Define config_export in @ConfigEntityType annotation for Action, Condition, Variable
Version: 8.x-1.x-dev » 2.x-dev

  • colan committed 03e2504 on 2.x authored by billdaff
    Issue #3172492 by mparker17, billdaff: Define config_export in @...
colan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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