Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Features exported og permissions comments often exceed maximum length of 80 characters, example:
/**
* @file
* project.features.og_features_permission.inc
*/
/**
* Implements hook_og_features_default_permissions().
*/
function project_og_features_default_permissions() {
$permissions = array();
// Exported og permission: 'node:project_organisation:handle unpublished vacancy'
$permissions['node:project_organisation:handle unpublished vacancy'] = array(
'roles' => array(
'coordinator' => 'coordinator',
),
);
return $permissions;
}
When running phpcs with Drupal standard on it it will get flagged by:
Drupal.Files.LineLength.TooLong
FILE: project.features.og_features_permission.inc
----------------------------------------------------------------------
FOUND 2 ERRORS AND 1 WARNING AFFECTING 2 LINES
----------------------------------------------------------------------
13 | WARNING | [ ] Line exceeds 80 characters; contains 81
| | characters
----------------------------------------------------------------------
PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
----------------------------------------------------------------------
This issue can be fixed together with: #2855159: OG permissions features export: Drupal.Commenting.InlineComment.InvalidEndChar
Comment | File | Size | Author |
---|---|---|---|
#3 | og_features_permission_export_comment-2855162-3.patch | 984 bytes | alexverb |
Comments
Comment #2
alexverb CreditAttribution: alexverb commentedComment #3
alexverb CreditAttribution: alexverb commentedHere's a patch based on how features does field_base and field_instance comments.
Also fixes: #2855159: OG permissions features export: Drupal.Commenting.InlineComment.InvalidEndChar
Did not test export yet.