Skip to content

Install fails, autowiring manager registry fails #94

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

Merged
merged 3 commits into from
Jun 21, 2021
Merged

Conversation

codedge
Copy link
Contributor

@codedge codedge commented Jun 20, 2021

This PR fixes a problem with the current installation of the package.

How to reproduce

  1. Create a new project with Symfony Flex.
  2. Then run composer req "meilisearch/search-bundle:^0.3"

This will create an error like this:

Run composer recipes at any time to see the status of your Symfony recipes.

Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!
!!  In DefinitionErrorExceptionPass.php line 54:
!!
!!    Cannot autowire service "MeiliSearch\Bundle\Command\MeiliSearchImportComman
!!    d": argument "$managerRegistry" of method "__construct()" references interf
!!    ace "Doctrine\Persistence\ManagerRegistry" but no such service exists. Did
!!    you create a class that implements this interface?
!!
!!
!!
Script @auto-scripts was called via post-update-cmd

The solution

Using Symfonys Doctrine Bundle.

This PR further adds the bundle to the require section, and not only to the require-dev section, as meilisearch-symfony uses this package not only for development purposes.

Doctrines ORM package is only required for development purposes of this package.

@codedge codedge changed the title Install fails, use proper manager registry Install fails, autowiring manager registry fails Jun 21, 2021
Copy link
Member

@curquiza curquiza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @codedge for this addition. Is it breaking for the users?

@curquiza
Copy link
Member

bors merge

@bors
Copy link
Contributor

bors bot commented Jun 21, 2021

@bors bors bot merged commit 2643cb5 into main Jun 21, 2021
@bors bors bot deleted the sort-doctrine-packages branch June 21, 2021 16:20
@codedge
Copy link
Contributor Author

codedge commented Jun 21, 2021

No, I don't think it is breaking for the user. It currently is when installing the package, so I would suggest releasing this as a 0.3.1 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

Successfully merging this pull request may close these issues.

2 participants