form-extensions
form-extensions copied to clipboard
Deprecate InlineConstraint and validator
Feature Request
I think it can be deprecated. It's usage was deprecated on SonataAdminBundle 3.x. We need to look for usage on another Sonata bundles.
Maybe ErrorElement too (but not sure about that one).
It is still used on PageBundle and MediaBundle to validate medias and pages. So probably not that easy to deprecate.
It is still used on PageBundle and MediaBundle to validate medias and pages. So probably not that easy to deprecate.
I didnt take a look but cant we just replace the usage by the "constraints" option on form ?
I think we could try to replace it for the Callback constraint from Symfony, but haven't tried yet.
I remove the milestone since it won't be done for 2.0, it requires changes on another bundles that are already released (MediaBundle)
I remove the milestone since it won't be done for 2.0, it requires changes on another bundles that are already released (MediaBundle)
Can't we remove the usage in a BC way ?
Looking at the usage we just have to
- Deprecate everything in 1.x
- Remove everything in 2.x except ErrorElement
- Remove ErrorElement in 3.x
This way, support for 1.x || 2.x is possible with the empty method
public function validate(ErrorElement $errorElement, BlockInterface $block): void
{
}
To me there is a previous step:
- Ensure on MediaBundle and PageBundle that everything can be implemented without this classes.
If we don't change the deprecated code first, we could end up in a situation where we deprecated something that cannot be done with another solution.