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

Issues with configureFilters and setSearchFields when using michaeldegroot/doctrine-encrypt-bundle #6468

Open
eduridgebotswana opened this issue Oct 11, 2024 · 0 comments

Comments

@eduridgebotswana
Copy link

eduridgebotswana commented Oct 11, 2024

Hi,

I’m encountering an issue while using EasyAdmin in combination with the michaeldegroot/doctrine-encrypt-bundle to encrypt database fields.

I’ve encrypted certain fields (e.g., firstName, lastName) in my entity using the michaeldegroot/doctrine-encrypt-bundle.
However, when I try to set filters using configureFilters or search fields using setSearchFields in EasyAdmin, they do not seem to work with the encrypted fields.

// In the EasyAdmin Controller
public function configureFilters(Filters $filters): Filters
{
    return $filters
        ->add('firstName')
        ->add('lastName');
}

public function configureCrud(Crud $crud): Crud
{
    return $crud
        ->setSearchFields(['firstName', 'lastName']);
}

I expect to be able to filter and search through these fields, but since they are encrypted, neither filtering nor searching seems to work.

Is there a way to make EasyAdmin work with encrypted fields, especially for filtering and searching? If anyone has experience with this specific use case or knows a workaround, I would appreciate any guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant