-
-
Notifications
You must be signed in to change notification settings - Fork 498
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
Backport ImageProviderInterface from 4.x #2271
Backport ImageProviderInterface from 4.x #2271
Conversation
*/ | ||
private $imageProvider; | ||
|
||
public function __construct(ImagineInterface $imagineAdapter, ImageProvider $imageProvider) | ||
public function __construct(ImagineInterface $imagineAdapter, ImageProviderInterface $imageProvider) |
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.
Not sure but this change looks like BC break to me.
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 only think of one situation, namely when someone extends the validator and its constructor.
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 wouldn't it be BC @jordisala1991 ?
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 could also remove the explicit parameter type and check it at runtime.
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.
If it is BC, fine by me :)
If it's okay for you @jordisala1991 we'll merge this |
Subject
I am preparing to migrate to Symfony 5 and all new Sonata bundle, including Media Bundle 4. One issue is that I have a class that inherits from
ImageProvider
. This is no longer possible in 4.0, where a new interfaceImageProviderInterface
is introduced. It would be convenient if I could migrate my implementation to this new interface before migrating every Sonata/Symfony package.I am targeting this branch, because it backports a feature from 4.0.
Changelog