mogilvie / EncryptBundle

Encryption bundle
82 stars 27 forks source link

How to use attribute instead of annotations #31

Closed memememetoo closed 1 year ago

memememetoo commented 1 year ago

I want to use attribute instead of annotation for "@Encrypted" .

What is the attribute equivalent of "@Encrypted" for entities?

memememetoo commented 1 year ago

I tried "#[Encrypted]", but its not working. Its showing an error "data is missing".

genseirin commented 1 year ago

I'm also interested in support for attributes.

memememetoo commented 1 year ago

I'm also interested in support for attributes.

Looks like the support is not there yet. I am using this bundle instead. https://packagist.org/packages/michaeldegroot/doctrine-encrypt-bundle

it supports Attributes!!

genseirin commented 1 year ago

Thank you, @codenamerana

genseirin commented 1 year ago

https://packagist.org/packages/michaeldegroot/doctrine-encrypt-bundle

But it doesn't seem to support Symfony 6. EncryptBundle has more recent updates and is compatible. Maybe it's easier to add attribute support here.

memememetoo commented 1 year ago

https://packagist.org/packages/michaeldegroot/doctrine-encrypt-bundle

But it doesn't seem to support Symfony 6. EncryptBundle has more recent updates and is compatible. Maybe it's easier to add attribute support here.

I am already using michaeldegroot in latest symfony 6. No issues.

mogilvie commented 1 year ago

Thanks for the suggestion. I have updated to support Attribute declaration of #[Encrypted] to master for the moment. Please let me know if this meets your needs and I will publish.

memememetoo commented 1 year ago

Thanks for the update :)

genseirin commented 1 year ago

perfect, thank you!

WietseDevelto commented 1 year ago

Thanks for the suggestion. I have updated to support Attribute declaration of #[Encrypted] to master for the moment. Please let me know if this meets your needs and I will publish.

I am using the master branch and the annotation, but the data is still not encrypted. Am I missing something?

mogilvie commented 1 year ago

@WietseDevelto Have pushed the definition by Attribute to v3.0.2 release. Annotations are still supported but will are deprecated and will be removed in next major release.