Closed elfantome closed 3 weeks ago
Unfortunately this change breaks compatibility with ORM 2.x.
Fatal error: Declaration of Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, string $targetTableAlias): string must be compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, $targetTableAlias) in /src/SoftDeleteable/Filter/SoftDeleteableFilter.php on line 54
Unfortunately this change breaks compatibility with ORM 2.x.
Fatal error: Declaration of Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, string $targetTableAlias): string must be compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, $targetTableAlias) in /src/SoftDeleteable/Filter/SoftDeleteableFilter.php on line 54
In this case, maybe bumping the version number with a new release can solve the problem?
I just looked at the install stats. It is way too early to consider dropping ORM 2.x support, and the volunteer resources don't exist to support two major version branches of this package.
There might be a way to change the signature in a way to support both versions (like only adding the return type without the param type), but based on numbers and resources only supporting ORM 3.x right now is not the right decision.
Makes sense. I updated my PR to only add a return type to the method to keep compatibility with ORM 2.x
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 78.40%. Comparing base (
0632ab1
) to head (18dd98c
). Report is 38 commits behind head on main.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
thanks @elfantome!
Update Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint signature to be compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint