Closed Felsfungus closed 1 year ago
After some debugging i found out, that the default connection is needed for installation, but we can override the connection by service configuration:
\SpecShaper\EncryptBundle\Subscribers\DoctrineEncryptSubscriber:
class: '%spec_shaper_encrypt.subscriber_class%'
arguments:
$annotationArray: '%spec_shaper_encrypt.annotation_classes%'
$isDisabled: '%spec_shaper_encrypt.is_disabled%'
tags:
- { name: doctrine.event_subscriber, connection: api }
Is that the way i should go or is there a better way?
Rather than overriding the service definition in your own bundle, I would suggest we instead set a config parameter in the spec_shaper_encrypt.yaml, and set the definition during dependency injection. I also want to look at how i can enable the subscriber for multiple entity connections. I'm currently working on a multitenant application and need to apply this bundle to potentially hundreds of database connections. I'll keep your use case in mind.
That sounds good to me and would make configuration better. Thank you :-)
If you think about configuration: I would like to ask how you would solve the problem, that there might be more than one entity manager with different connections that have different entities with some encrypted columns. Is there a way to solve that case?
Leave with me for the moment, I'm also rewriting for flex install at the same time.
Sorry, don't want to annoy you :-). My case is solved for now, thank you for your response. I will keep on track for changes!
Dev-master now has config settings in config/spec_shaper_encrypt.yaml allowing you to define the connection name, and/or multiple connection names.
Hey,
i installed version v2.0.1 of EncryptBundle and i'm getting the following error message:
I do not have a connection named "default" for reasons. Can i configure the bundle in any way not to use the connection named "default"? In my doctrine.yaml i configured the default connection this way:
When configuring a connection named "default" the error is gone, but i would like not to have a connection named "default".
Thank you for your work :-)