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

ENH Use class name instead of self #1201

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz force-pushed the pulls/5.2/remove-self branch from e7e05aa to 51b178c Compare June 14, 2024 08:33
@@ -477,7 +477,7 @@ public function getController()
return $this->controller;
}

$controllerClass = self::config()->controller_class;
$controllerClass = static::config()->controller_class;
Copy link
Member Author

Choose a reason for hiding this comment

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

This should have been static previously, though self also works seemingly untintuitively. BaseElement::config() behaves differently from BaseElement::config()

Copy link
Member

@GuySartorelli GuySartorelli left a comment

Choose a reason for hiding this comment

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

LGTM

@GuySartorelli GuySartorelli merged commit cde308a into silverstripe:5.2 Jun 16, 2024
13 checks passed
@GuySartorelli GuySartorelli deleted the pulls/5.2/remove-self branch June 16, 2024 23:58
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