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

Unable to resolve service "Laminas\Hydrator\ClassMethodsHydrator" to a factory error #15

Closed
lampi87 opened this issue Jan 20, 2021 · 3 comments

Comments

@lampi87
Copy link
Contributor

lampi87 commented Jan 20, 2021

Hi!

Since version 3.3.3 I get an error on opening login page

Datei:
D:\Projects\3lal\infoscreen\vendor\laminas\laminas-servicemanager\src\ServiceManager.php:601
Meldung:
Unable to resolve service "Laminas\Hydrator\ClassMethodsHydrator" to a factory; are you certain you provided it during configuration?
Stack trace:
#0 D:\Projects\3lal\infoscreen\vendor\laminas\laminas-servicemanager\src\ServiceManager.php(677): Laminas\ServiceManager\ServiceManager->getFactory('Laminas\\Hydrato...')
#1 D:\Projects\3lal\infoscreen\vendor\laminas\laminas-servicemanager\src\ServiceManager.php(225): Laminas\ServiceManager\ServiceManager->doCreate('Laminas\\Hydrato...')
#2 D:\Projects\3lal\infoscreen\vendor\lm-commons\lmc-user\src\LmcUser\Factory\UserHydrator.php(19): Laminas\ServiceManager\ServiceManager->get('lmcuser_base_hy...')
#3 D:\Projects\3lal\infoscreen\vendor\laminas\laminas-servicemanager\src\ServiceManager.php(678): LmcUser\Factory\UserHydrator->__invoke(Object(Laminas\ServiceManager\ServiceManager), 'lmcuser_user_hy...', NULL)
#4 D:\Projects\3lal\infoscreen\vendor\laminas\laminas-servicemanager\src\ServiceManager.php(225): Laminas\ServiceManager\ServiceManager->doCreate('lmcuser_user_hy...')
#5 D:\Projects\3lal\infoscreen\vendor\lm-commons\lmc-user\src\LmcUser\Factory\Form\Register.php(18): Laminas\ServiceManager\ServiceManager->get('lmcuser_registe...')
#6 D:\Projects\3lal\infoscreen\vendor\laminas\laminas-servicemanager\src\ServiceManager.php(678): LmcUser\Factory\Form\Register->__invoke(Object(Laminas\ServiceManager\ServiceManager), 'lmcuser_registe...', Object(LmcUserDoctrineORM\Options\ModuleOptions))
#7 D:\Projects\3lal\infoscreen\vendor\laminas\laminas-servicemanager\src\ServiceManager.php(225): Laminas\ServiceManager\ServiceManager->doCreate('lmcuser_registe...')
#8 D:\Projects\3lal\infoscreen\vendor\lm-commons\lmc-user\src\LmcUser\Factory\Controller\UserControllerFactory.php(27): Laminas\ServiceManager\ServiceManager->get('lmcuser_registe...')

I've tried it with different version of laminas-servicemanager (3.5.1, 3.6.1, 3.6.2) without success. Any ideas what's missing?
With version 3.3.2 it's working. But I need session storage fix...

Best regards,
Alex

@alexz707
Copy link

As the debug output says it can't find the ClassMethodsHydrator itself I would think that you did not enable the 'Laminas\Hydrator' Module?
Can you please try to put that in the modules.config.php?

Because the fix @svycka made would introduce the same problem the PR should fix..

@svycka
Copy link
Contributor

svycka commented Feb 11, 2021

@alexz707 it can't find ClassMethodsHydrator because it tied to get from the wrong place

matwright added a commit that referenced this issue Feb 27, 2021
Fixed BC break #15 introduced in #13
@matwright
Copy link
Contributor

@lampi87 can you test with the current master branch and confirm if this is resolved and I'll create a new release.

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

4 participants