Skip to content

Conversation

jonathan1055
Copy link
Contributor

Drupal issue https://www.drupal.org/project/coder/issues/3155865
Function dd() is already discouraged but this is now named ddm() so that should also be in the discouraged list.

@jonathan1055
Copy link
Contributor Author

jonathan1055 commented Jun 30, 2020

I noticed that only two of the 23 discouraged debug functions have test coverage:

/**
 * Debugging functions are discouraged.
 */
function test27() {
  $var = array(1, 2, 3);
  dsm($var);
  dpm($var);
}

If only a sample of the functions are tested it seems we do not need to cover every one of them. So I did not make any change to the test.

@jonathan1055
Copy link
Contributor Author

Just noticed that I added ddm under dd but if you want strict alphabetical order it should be one line further down, after ddebug_backtrace

@arkener
Copy link
Collaborator

arkener commented Jun 30, 2020

Not updating the test case for this rule is fine, as the test is mostly there to check if the rule itself works correctly. As you've already stated, I would prefer if the function list is sorted alphabetically (I know, nitpicking ☺️)

@jonathan1055
Copy link
Contributor Author

Done! I was not sure if you accept forced pushes here, so did not squash the commits. You can do that on merge, I am sure.

@arkener arkener merged commit 792cc9e into pfrenssen:8.x-3.x Jun 30, 2020
@jonathan1055 jonathan1055 deleted the 3155865-discourage-ddm branch July 1, 2020 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants