Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #2625986: enforce type string for plugin IDs. #311

Open
wants to merge 1 commit into
base: 8.x-3.x
Choose a base branch
from

Conversation

torenware
Copy link
Contributor

Drupal Issue https://www.drupal.org/node/2625986.

I'm starting out with bottleneck routines that get called a lot. No tests yet, but I want to get this out there so people can figure out where we need to better enforce types.

No test yet.

@@ -50,6 +50,9 @@ public function createReactionRule(array $configuration = []) {
* {@inheritdoc}
*/
public function createAction($id) {
if (!is_string($id)) {
throw new \InvalidArgumentException(t('Rules Action IDs must be strings.'));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exception messages should not use t(), we are in the lowest levels of API here.

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