-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
You have requested a non-existent service "knp_menu.menu_provider.chain" #17910
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
Comments
@xabbuh I don't have exact steps to reproduce right now. But the call to the service The code that is generated is something like: protected function getNicoDossier_Entity_CategoryRepositoryService()
{
return $this->services['nico_dossier.entity.category_repository'] = $this->get('knp_menu.menu_provider.chain')->getRepository('Nico\\DossierBundle\\Entity\\Category');
} So for some reason the The KnpMenuBundle in my project is a dependency of the SonataAdminBundle, so that may be related to this issue (?) |
in the first place, i only do a composer update when it arrived. got SonataAdminBundle too, i delete cache, composer cache, vendors, then i do a composer update and got this error. |
for me in the ProjectContainer.php, the code is: /**
* Gets the 'ao_translation.entity_manager' service.
*
* This service is shared.
* This method always returns the same instance of the service.
*
* @return \Doctrine\ORM\EntityManager A Doctrine\ORM\EntityManager instance.
*/
protected function getAoTranslation_EntityManagerService()
{
return $this->services['ao_translation.entity_manager'] = $this->get('knp_menu.menu_provider.chain')->getManager('default');
} |
@ibasaw Do you have some example code and configuration I can add to a blank Symfony Standard Edition that will lead to this issue? |
@xabbuh : this is because i used https://github.com/adrianolek/AOTranslationBundle. i had deleted it, and no more error... |
No more error by deleting the line99 of ReplaceAliasByActualDefinitionPass.php $definition->setFactoryService($this->updateFactoryServiceReference($definition->getFactoryService(), $currentId, $newId)); Not sure if this is the solution though. |
I think that simply having KnpMenuBundle and trying to cache:clear triggers the error. |
By simply adding the KnpMenuBundle I cannot reproduce your issue. Can you please fork the Symfony Standard Edition and make the changes that are needed to reproduce it? |
I have the same error with Symfony 2.8 and KnpMenuBundle. I also have this error with a Symfony 2.3 project. But if I rollback few commits in both my 2.8 and 2.3 projects the problem is "solved" so I'm pretty sure it's not a bug from Knp. |
@fungio I do agree but as long as I cannot reproduce your issue I am unable to create a fix. |
I have the same issue. Problem solved by adding to /app/services.yml: knp_menu.menu_provider.chain:
class: %knp_menu.menu_provider.chain.class%
arguments: [ {} ]
public: true |
Thank you all for investigating this issue. However, as @xabbuh said, we need to be able to reproduce this issue consistently in order to fix it. So please, could someone fork the Symfony Standard edition and add the minimum number of third-party bundles, config and PHP code to reproduce the issue? Thank you! |
@javiereguiluz : which version of symfony ? 2.8 ? |
If it's a real Symfony bug, the version should be "the oldest Symfony version which is still maintained and suffers the bug". So it can be 2.3, 2.7 or 2.8. |
I tried @rapemer solution and now I get the same error from another service |
@nvasse yeah, it seems to be problem with services public = false |
Error occured when I used |
Status: Reviewed |
I'm sorry, that test case was proofing something completely irrelevant. In order to reproduce this issue:
|
…terJ) This PR was squashed before being merged into the 2.3 branch (closes #17942). Discussion ---------- Fix bug when using an private aliased factory service | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #17910, #17915 | License | MIT | Doc PR | - /cc @xabbuh Commits ------- de406c0 Fix bug when using an private aliased factory service
in my composer.json, got : "symfony/symfony": "2.8.*@dev"
got this error after a composer update
The text was updated successfully, but these errors were encountered: