Olivier127 / rbac-bundle

PhpRBACBundle is symfony 7 bundle with full access control library for PHP. It provides NIST Level 2 Standard Hierarchical Role Based Access Control as an easy to use library to PHP developers. It's a rework of the phprbac.net library made by OWASP for synfony 7
MIT License
18 stars 10 forks source link

Symfony 7 support #11

Open birkof opened 6 days ago

birkof commented 6 days ago

Currently, Composer limits us to Symfony 6 only.

@ Olivier127 as you know, are there any incompatibilities when upgrading?

Olivier127 commented 6 days ago

Hi @birkof , I haven't tested with SF 7 yet, but I think there shouldn't be any issues. I just need to confirm that.

birkof commented 6 days ago

I created https://github.com/Olivier127/rbac-bundle/pull/12 with this update & some code clean-ups. Other than that, I need more in-depth tests on this...

Olivier127 commented 6 days ago

It's merged, however, I have an error in Symfony 7. It seems that the DoctrineResolveTargetEntityPass no longer works.

Olivier127 commented 6 days ago

it works with this configuration :

#config/package/doctrine.yaml
doctrine:
    orm:
        resolve_target_entities:
            PhpRbacBundle\Entity\RoleInterface: App\Entity\Role
            PhpRbacBundle\Entity\PermissionInterface: App\Entity\Permission
birkof commented 6 days ago

In that case, we'll need to get rid of "permission", "role", "user" options, and to make them dynamically defined.

Olivier127 commented 6 days ago

I have updated the compiler, it works now