Closed mpiot closed 5 years ago
public function getExtendedType()
must still be implemented. Otherwise the bundle becomes incompatible with older Symfony versions.
and this is also incompatible with PHP 5.5.9. Merging that would require bumping the min PHP version.
Wouldn't adding a simple:
public static function getExtendedTypes()
{
return [TextType::class];
}
fix the issue?
yeah, I think that adding that method without removing the other ones might be enough. (to be ready for Symfony 5, we would need the return type, but dropping PHP 5 support before adding support for Symfony 5 is probably fine)
I've test, the deprecation is removed when we add the new one, the old is only called if the new don't exist.
Then, I add the public static getExtendedTypes()
methods, keep the previous public function getExtendedType()
, and update the composer php version to ^7.1.3 (needed for the return type: http://php.net/manual/en/language.types.iterable.php ).
Is this going to get merged?
Is bumping the PHP version necessary? Couldn't the iterable
be added "later"?
I'll look if the return type is defined in the interface, if yes, we're forced to specify it. Else we can remove the iterable
.
If this commit is really needed, so it should be merged in separate branch and major version should be updated.
@mpiot As the method is currently only annotated in the interface it should work without iterable
and bumping the PHP version.
@althaus Yes, I'm so sorry, I've see it a week ago, but not take time to fix...
I've removed it :-)
New release was created https://github.com/Exercise/HTMLPurifierBundle/releases/tag/V2.0.4
This PR fix this deprecation since Symfony 4.2