Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecated warning #45

Open
Reeed opened this issue Mar 5, 2016 · 1 comment
Open

Deprecated warning #45

Reeed opened this issue Mar 5, 2016 · 1 comment

Comments

@Reeed
Copy link

Reeed commented Mar 5, 2016

Hi,

since I updated your project to the latest ZendFramework version there are plenty of deprecated warnings like:
"Deprecated: You are retrieving the service locator from within the class CsnUser\Controller\IndexController. Please be aware that ServiceLocatorAwareInterface is deprecated and will be removed in version 3.0, along with the ServiceLocatorAwareInitializer. You will need to update your class to accept all dependencies at creation, either via constructor arguments or setters, and use a factory to perform the injections. "
As I'm new to ZendFramework for me it is not clear how to migrate the code to avoid this warning.
Could you provide a solution?

Best Regards,
Mike R.

@coolcsn
Copy link
Owner

coolcsn commented Mar 7, 2016

Hello Mike,

  1. Unfortunately, there is no other solution, but to use older version of
    Zend Framework 2.
  2. You can suppress the PHP warnings if you still want to use a newer
    version of the Framework. You can do this by changing the values in php.ini
    file or with code.
    To avoid the warnings we have to upgrade the modules to use ZF3.
    We may do that this year, but for now I can not promise it.
    You know how it is on this planet. It is called priorities. We have to work
    for money in order to survive.
    Also lets face it. When you use a framework you usually stick with a
    concrete version.
    The true of the matter is that when you create a software project with a
    given version with a framework, you are doomed to stay with it.
    We still maintain a lot of projects we did with ZF1. We would like to be
    able to upgrade to ZF2 or even ZF3, but this is not possible.

I hope we will have enough time to update the projects this year. But for
now use the solutions I described in the beginning of the e-mail.

Best Regards,
Stoyan Cheresharov

On Sat, Mar 5, 2016 at 9:47 AM, Reeed notifications@github.com wrote:

Hi,

since I updated your project to the latest ZendFramework version there are
plenty of deprecated warnings like:
"Deprecated: You are retrieving the service locator from within the class
CsnUser\Controller\IndexController. Please be aware that
ServiceLocatorAwareInterface is deprecated and will be removed in version
3.0, along with the ServiceLocatorAwareInitializer. You will need to update
your class to accept all dependencies at creation, either via constructor
arguments or setters, and use a factory to perform the injections. "
As I'm new to ZendFramework for me it is not clear how to migrate the code
to avoid this warning.
Could you provide a solution?

Best Regards,
Mike R.


Reply to this email directly or view it on GitHub
#45.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants