ZF-Commons / zfc-rbac

Role-based access control module to provide additional features on top of Zend\Permissions\Rbac
BSD 3-Clause "New" or "Revised" License
181 stars 111 forks source link

Does not support EventManager 3.0 and throws fatal error #347

Closed svycka closed 7 years ago

svycka commented 7 years ago

first doesn't have zendframework/zend-eventmanager as dependancy in composer.json but it is used in the library this worked because zendframework/zend-mvc has it and now when zendframework/zend-mvc allows zendframework/zend-eventmanager:3.0 we have zendframework/zend-eventmanager:3.0 installed and this error:

Fatal error: Declaration of ZfcRbac\Guard\AbstractGuard::attach(Zend\EventManager\EventManagerInterface $events) must be compatible with Zend\EventManager\ListenerAggregateInterface::attach(Zend\EventManager\EventManagerInterface $events, $priority = 1) in /var/www/fam/vendor/zf-commons/zfc-rbac/src/ZfcRbac/Guard/AbstractGuard.php on line

in master this is fixed by adding zendframework/zend-eventmanager:3.0 support so can we have a release a bit faster?

svycka commented 7 years ago

as workaround I had to add "zendframework/zend-eventmanager": "^2.6.3" to my project composer.json even if I not use event-manager.

bakura10 commented 7 years ago

Current master has a looser dependency: https://github.com/ZF-Commons/zfc-rbac/blob/master/composer.json#L32

Can you please try to try using the "dev-master" dependency of zfc-rbac? We're thinking of soon creating a new version of ZfcRbac with those updated dependencies.

svycka commented 7 years ago

@bakura10 sorry I have no plans using dev version but that fatal error yes dev-master fixed it as far as I can see.

bakura10 commented 7 years ago

I was not asking using a dev version, just to make sure that the master version indeed solves the issue, as we should tag it soon :)

svycka commented 7 years ago

@bakura10 dev-master working on my dev server and tests pass so I guess should work.

Is there any clues when it will be released because soon so far means at least few months and I don't see the end :D

bakura10 commented 7 years ago

Haha it all depends on @danizord when he can reviews the code :p.

michalbundyra commented 7 years ago

@bakura10 @svycka @danizord I can confirm - dev-master works fine also in my project. Thanks!

svycka commented 7 years ago

well reviews often is done before merging to master so.. :D anyway just saying that latest version 2.5.6 throws fatal error

bakura10 commented 7 years ago

Yeah you're correct :D. As said in #348 the only issue for now is that I've just pulled the project, tried to run the tests but experienced lot of errors :/. So I'll need to check that before to make sure I'm not missing anything.

bakura10 commented 7 years ago

I've tagged 2.6.0. This should fix this issue.