Skip to content
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

SoftDeleteableFilter 'addFilterConstraint' not compatible #482

Closed
RomainMILLAN opened this issue May 20, 2024 · 1 comment
Closed

SoftDeleteableFilter 'addFilterConstraint' not compatible #482

RomainMILLAN opened this issue May 20, 2024 · 1 comment
Labels

Comments

@RomainMILLAN
Copy link

Describe the bug
I'am on new project and now install SoftDeleteable, but an error is created on cache clear because the function public function addFilterConstraint(ClassMetadata $targetEntity, $targetTableAlias) are not compatible with the function of abstract class SQLFilter abstract public function addFilterConstraint(ClassMetadata $targetEntity, string $targetTableAlias): string;.

To Reproduce
Steps to reproduce the behavior:

  • Have a project on Symfony 7 version.
  • Try to install SoftDeleteable filter.

Expected behavior
It's possible to add the return statement of the addFilterConstraint method to be compatible with the abstract class SQLFilter ?

Error

symfony console ca:cl -e 'dev'

 // Clearing the cache for the dev environment with debug true                                                          

PHP Fatal error:  Declaration of Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, $targetTableAlias) must be compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, string $targetTableAlias): string in /Users/romainmillan/Sites/Develop/bteck/vendor/gedmo/doctrine-extensions/src/SoftDeleteable/Filter/SoftDeleteableFilter.php on line 54

Fatal error: Declaration of Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, $targetTableAlias) must be compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, string $targetTableAlias): string in /Users/romainmillan/Sites/Develop/bteck/vendor/gedmo/doctrine-extensions/src/SoftDeleteable/Filter/SoftDeleteableFilter.php on line 54
05:58:03 CRITICAL  [php] Fatal Compile Error: Declaration of Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, $targetTableAlias) must be compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, string $targetTableAlias): string ["exception" => Symfony\Component\ErrorHandler\Error\FatalError { …}]

In SoftDeleteableFilter.php line 54:
                                                                                                                                                                                                                                                                                 
  Compile Error: Declaration of Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::addFilterConstraint(Doctrine\ORM\Mapping\ClassMetadata $targetEntity, $targetTableAlias) must be compatible with Doctrine\ORM\Query\Filter\SQLFilter::addFilterConstraint(Doctrine\ORM\Mappin  
  g\ClassMetadata $targetEntity, string $targetTableAlias): string                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                                 

cache:clear [--no-warmup] [--no-optional-warmers]
@stof
Copy link
Owner

stof commented Jun 10, 2024

Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter is not defined in this bundle but in the extensions themselves. This should be reported to https://github.com/doctrine-extensions/DoctrineExtensions/

Also note that the stable release of those extensions does not support doctrine/orm 3.0 yet, which might be related to the error you get.

@stof stof closed this as completed Jun 10, 2024
@stof stof closed this as not planned Won't fix, can't repro, duplicate, stale Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants