-
-
Notifications
You must be signed in to change notification settings - Fork 142
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
Drop unnesessary constructor #701
Drop unnesessary constructor #701
Conversation
/** | ||
* @param string $name | ||
*/ | ||
public function __construct($name, EngineInterface $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.
The only change I see at first glance is that parent definition is allowing null
for the 2nd argument.
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.
abstract class AbstractAdminBlockService extends AbstractBlockService implements AdminBlockServiceInterface
abstract class AbstractBlockService implements BlockServiceInterface
{
...
/**
* NEXT_MAJOR: Make `$twig` argument mandatory and remove other arguments.
*
* @param Environment|EngineInterface|string $templatingOrDeprecatedName
*/
public function __construct($templatingOrDeprecatedName = null, EngineInterface $templating = 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.
Yes, that's exactly what I'm pointing (EngineInterface $templating = null
). Although I don't know if it worths.
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.
This change is require to #700
f676e41
to
22d99a9
Compare
Thanks @wbloszyk ! |
@greg0ire Can you release it? I need it in sonata-project/SonataMediaBundle#1740 |
Sure! |
@greg0ire Can you edit public function __construct($name, EngineInterface $templating) to public function __construct($name, ?EngineInterface $templating = null)
My bad, i miss it. |
There is no constructor in |
Oh, this PR fix it. I dont have it in media-bundle becouse it is not release yet. 🥇 for me. All it is OK. |
Subject
This change will allow prepare blocks which extends
AbstractAdminBlockService
to use one parameter constructor required in BlockBundle 4.xI am targeting this branch, because it is PATCH.