@MasterCopipaster

Ошибка The doctrine/orm package is required when the doctrine.orm config is set как вылечить?

Установил symfony
symfony new my_project

Устанавливаю doctrine

composer require doctrine/doctrine-bundle



Using version ^2.2 for doctrine/doctrine-bundle
./composer.json has been updated
Running composer update doctrine/doctrine-bundle
Loading composer repositories with package information
Restricting packages listed in "symfony/symfony" to "5.2.*"
Updating dependencies
Lock file operations: 11 installs, 0 updates, 0 removals
- Locking composer/package-versions-deprecated (1.11.99.1)
- Locking doctrine/annotations (1.12.1)
- Locking doctrine/cache (1.10.2)
- Locking doctrine/collections (1.6.7)
- Locking doctrine/dbal (3.0.0)
- Locking doctrine/doctrine-bundle (2.2.3)
- Locking doctrine/event-manager (1.1.1)
- Locking doctrine/lexer (1.2.1)
- Locking doctrine/persistence (2.1.0)
- Locking doctrine/sql-formatter (1.1.1)
- Locking symfony/doctrine-bridge (v5.2.4)
Writing lock file
Installing dependencies from lock file (including require-dev)
Package operations: 11 installs, 0 updates, 0 removals
- Installing composer/package-versions-deprecated (1.11.99.1): Extracting archive
- Installing doctrine/lexer (1.2.1): Extracting archive
- Installing doctrine/annotations (1.12.1): Extracting archive
- Installing doctrine/cache (1.10.2): Extracting archive
- Installing doctrine/collections (1.6.7): Extracting archive
- Installing doctrine/event-manager (1.1.1): Extracting archive
- Installing doctrine/persistence (2.1.0): Extracting archive
- Installing symfony/doctrine-bridge (v5.2.4): Extracting archive
- Installing doctrine/sql-formatter (1.1.1): Extracting archive
- Installing doctrine/dbal (3.0.0): Extracting archive
- Installing doctrine/doctrine-bundle (2.2.3): Extracting archive
Generating optimized autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
37 packages you are using are looking for funding.
Use the `composer fund` command to find out more!

Symfony operations: 2 recipes (d0cf39cc4589497ee527a9eefa9944a1)
- Configuring doctrine/annotations (>=1.0): From github.com/symfony/recipes:master
- Configuring doctrine/doctrine-bundle (>=2.0): From github.com/symfony/recipes:master
Executing script cache:clear [KO]
[KO]
Script cache:clear returned with error code 1
!!
!! In Configuration.php line 332:
!!
!! The doctrine/orm package is required when the doctrine.orm config is set.
!!
!!
!!
Script @auto-scripts was called via post-update-cmd

Installation failed, reverting ./composer.json and ./composer.lock to their original content.


Все на этом хорошая жизнь закончилась - как вылечить?
Слышал бредовые советы что в doctrine.yaml
Надо удалить строчки
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App

Но это полный бред, ибо без ник конечно пакет установится но работать он абсолютно не будет.
  • Вопрос задан
  • 1198 просмотров
Решения вопроса 1
@tukreb
Установите symfony/orm-pack в него уже входит всё что нужно в том числе и doctrine/doctrine-bundle
Ответ написан
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы