ZF-Commons / ZfcUser

A generic user registration and authentication module for ZF2. Supports Zend\Db and Doctrine2. (Formerly EdpUser)
BSD 3-Clause "New" or "Revised" License
497 stars 343 forks source link

ServiceManagerAwareInterface #623

Closed dymen1 closed 8 years ago

dymen1 commented 8 years ago

Deprecated: ServiceManagerAwareInterface is deprecated and will be removed in version 3.0, along with the ServiceManagerAwareInitializer. Please update your class ZfcUser\Authentication\Storage\Db to remove the implementation, and start injecting your dependencies via factory instead.

I am using zf-commons/zfc-user (1.4.2) and I get this with ZF version is 2.5.3.

Are there any plans to support the servicemanager 2.7.5 release?

Danielss89 commented 8 years ago

@dymen1 I have not looked into the 2.7.5 release. Do you know what is needed to support that version?

dymen1 commented 8 years ago

@Danielss89 All ServiceLocatorAwareInterfaceand ServiceManagerAwareInterface implementations need to be removed and replaced by factory injection, I am currently aliasing my own factories so zfcUser uses these to generate it's classes. Classes I currently create via my own factory:

Service Manager:

Controllers:

But there is currently another issue running within the ZF mvc package https://github.com/zendframework/zend-mvc/issues/87

This means that the \ZfcUser\Controller\UserController currently throws a deprecated error that will confuse most people.

svycka commented 8 years ago

If you not going to refactor soon maybe add zendframework/zend-mvc <2.7 to composer and release new version? this is really annoying

Danielss89 commented 8 years ago

I'm going to do the refactor this weekend.

Danielss89 commented 8 years ago

Also: PR welcome if you really need it ASAP!

ghost commented 8 years ago

Hi all! So, how best to fix it?

ZeinEddin commented 8 years ago

Will this be fixed soon? Is #627 ok to be used?

dymen1 commented 8 years ago

@ZeinEddin it isn't official and doesn't support BC.

melledijkstra commented 8 years ago

Also getting this issue, hope that it's fixed soon

stijnhau commented 8 years ago

Have did a test for the master branch https://github.com/stijnhau/ZfcUser/commit/e331c828647d9b41e997f63b55e55e685787b4b9 Not a fan of the servicemanerg object everwhere i think it's best toi inject all the dependencies. Are you agreeing witrh me before i do all the refactoring?

svycka commented 8 years ago

@stijnhau I think this is better, but does it solve deprecated *AwareInterface problem?

stijnhau commented 8 years ago

It does. Altough still need to do this on a lot more classes. So it's a WIP.

Danielss89 commented 8 years ago

Fix in #637

hongkongpfui commented 8 years ago

Can we reopen this as ZfcUser\Service\User still use this interface?

Danielss89 commented 8 years ago

@hongkongpfui Fixed in 1.4.4

miqueiasrafael commented 8 years ago

On my return only:

A value for the identity was not provided prior to authentication with ObjectRepository authentication adapter

in GIT

https://gist.github.com/miqueiasrafael/b8fb93873442e527dea9e1def351acf8