* Check that referenced action and condition plugins are available
* Check the referenced Rules expression plugins are available
* Check that required modules are enabled
* Check that variable names only contain allowed characters in data selectors
* "The context %name may only be configured using a selector."
* "The context %name may not be configured using a selector."
* "The data type of the configured context does not match the context's %name requirement."
* "Missing configuration for required context %name."

Comments

klausi created an issue. See original summary.

klausi’s picture

Status: Active » Needs review
fago’s picture

Status: Needs review » Needs work

thanks, PR looks good I just added a minor note / suggestion.

I've not seen any coverage for the following points though? -> Setting needs work.
* Check that required modules are enabled
* "The data type of the configured context does not match the context's %name requirement."

So maybe, get this merged and open a follow-op or complete it here?
Also I'm wondering, is this the complete list compiled from what Drupal 7 does? We should make sure we do not miss anything by checking d7 integrity checks, but it seems you have done so already? :)

  • klausi committed 78e3aa0 on 8.x-3.x
    Issue #2655604: Added integrity check violations for missing plugins,...
klausi’s picture

Issue summary: View changes
Status: Needs work » Active

Renamed the method and merged the PR.

Yes, those 2 checks you mentioned are still missing.

Yes, I looked through D7 and that were all I could identify. Added another for required contexts were the configuration is missing.

Let's continue in this issue with the remaining violations.

klausi’s picture

Status: Active » Needs work
fago’s picture

I think we also miss integrity checks in data processors. Just added the following comment:

// Note that accessing an unavailable variable will throw an evaluation
// exception. That's exactly what needs to happen. Invalid tokens must
// be checked when checking integrity.
$rules_state->getVariable($variable_name);

Then, action & condition plugins must be able to complete an integrity check for their configuration also. Then, we need to implement this for the component integration such that we can check a used component exists and all required contexts are configured.

klausi’s picture

Status: Needs work » Needs review

Data processors: yes, let's open a dedicated follow-up issue for that.

Same for actions and condition plugins ==> follow-up.

Required contexts is now covered in the PR.

klausi’s picture

klausi’s picture

Follow-up for actions and conditions: #2658944: Integrity check on action and condition plugins.

@fago: can you edit the issue summary there? I don't have an example for a use case.

  • klausi committed f089923 on 8.x-3.x
    Issue #2655604: Added integrity checks for data type matching
    
klausi’s picture

Status: Needs review » Fixed

merged.

I think we are covered with the follow-up issues linked above.

Status: Fixed » Closed (fixed)

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