Skip to content

Commit 2643cb5

Browse files
bors[bot]Holger Lösken
andauthored
Merge #94
94: Install fails, autowiring manager registry fails r=curquiza a=codedge 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](https://symfony.com/doc/current/bundles/DoctrineBundle/index.html). 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. Co-authored-by: Holger Lösken <[email protected]>
2 parents 9589206 + 5298016 commit 2643cb5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
"require": {
2121
"php": "^7.4|^8.0",
2222
"ext-json": "*",
23-
"doctrine/orm": "^2.8",
23+
"doctrine/doctrine-bundle": "^2.4",
2424
"meilisearch/meilisearch-php": "^0.18",
2525
"symfony/filesystem": "^4.0 || ^5.0",
2626
"symfony/property-access": "^4.0 || ^5.0",
2727
"symfony/serializer": "^4.0 || ^5.0"
2828
},
2929
"require-dev": {
30-
"doctrine/doctrine-bundle": "^2.3",
30+
"doctrine/orm": "^2.9",
3131
"friendsofphp/php-cs-fixer": "^3.0",
3232
"nyholm/psr7": "^1.3",
3333
"phpunit/phpunit": "^9.5",

0 commit comments

Comments
 (0)