-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add TemplateRegistryAwareInterface #6390
Add TemplateRegistryAwareInterface #6390
Conversation
* @return MutableTemplateRegistryInterface | ||
*/ | ||
final public function getTemplateRegistry() | ||
final public function getTemplateRegistry(): ?MutableTemplateRegistryInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it can return null?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can in 3.x.
It won't in master. A next major would be needed indeed.
interface TemplateRegistryOwnerInterface | ||
{ | ||
// NEXT_MAJOR: uncomment this method in 4.0 | ||
//public function getTemplateRegistry(): MutableTemplateRegistryInterface; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here it cannot?
@@ -1353,7 +1353,7 @@ public function generateMenuUrl($name, array $parameters = [], $referenceType = | |||
return $this->routeGenerator->generateMenuUrl($this, $name, $parameters, $referenceType); | |||
} | |||
|
|||
final public function setTemplateRegistry(MutableTemplateRegistryInterface $templateRegistry) | |||
final public function setTemplateRegistry(MutableTemplateRegistryInterface $templateRegistry): void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Imo this is a BC break
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's final
Other packages use the term "aware" instead "owner" for cases like this ( |
1b49dbf
to
4b0d16b
Compare
@wbloszyk Please wait for multiple approval before merging (generally 2 is fine). |
I ask about merge on slack. I prefer 1 approve per refactoring PR and 2+ for new feature. |
namespace Sonata\AdminBundle\Templating; | ||
|
||
/** | ||
* /** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo in comment
It's a team project. And people can't be connected every day. |
Also, it's open-source software… there are a loooooot more users than a company project. |
Subject
I am targeting this branch, because this change respect BC.
Changelog