laravel-doctrine / acl

ACL for Laravel Doctrine
http://laraveldoctrine.org/
MIT License
44 stars 30 forks source link

[FEATURE] Added attribute support #63

Open seifane opened 2 years ago

seifane commented 2 years ago

Follwing my issue (https://github.com/laravel-doctrine/acl/issues/62) I propose this PR as a solution to support attributes.

The reimplementation of Attribute / Annotation reader is needed since MappingDriverChain in orm doesn't give us a reader if it's not an instance of AnnotationDriver which is not the case when using attributes. This method is taken from the doctrine-extensions repo.

Let me know if you think there's a better way of handling this, I'm not sure of myself on this one :).

dpslwk commented 2 years ago

can this be done with out change the php constraint in composer?

the 1.x branch and release of this repo are intended to support multiple laravel version in one code base 6.x, 7.x, 8.x, 9.x which is why the php support is 7 and 8

seifane commented 2 years ago

@dpslwk I just testing reverting the platform requirements and running it on a 7.4 project and it passed okay. I was just scared about leaving the attributes there for previous versions but it doesn't seem to care.

eigan commented 2 years ago

I am not using this package so it's really difficult for me to say if this is "the way to go".

Some tests would be great.

mattzuba commented 8 months ago

Adding a two year bump to this - any chance of getting this added in and new release being cut? The ORM package has this and I've used it for all of my entities, but can't use this package now.