SonataUserBundle: DoctrineORM exception after composer update
Environment
Sonata packages
sonata-project/admin-bundle 3.24.0 3.24.0
sonata-project/block-bundle 3.5.0 3.5.0
sonata-project/cache 2.0.0 2.0.0
sonata-project/core-bundle 3.6.0 3.6.0
sonata-project/datagrid-bundle 2.2.1 2.2.1
sonata-project/doctrine-extensions 1.0.2 1.0.2
sonata-project/doctrine-orm-admin-bundle 3.1.7 3.1.7
sonata-project/easy-extends-bundle 2.2.0 2.2.0
sonata-project/exporter 1.7.1 1.7.1
sonata-project/formatter-bundle 3.3.0 3.3.0
sonata-project/user-bundle dev-master bd98e7c dev-master bd98e7c
Symfony packages
symfony/monolog-bundle v3.1.1 v3.1.1 Symfony MonologBundle symfony/phpunit-bridge v3.3.10 v3.3.10 Symfony PHPUnit Bridge symfony/polyfill-apcu v1.6.0 v1.6.0 Symfony polyfill backporting apcu… symfony/polyfill-intl-icu v1.6.0 v1.6.0 Symfony polyfill for intl’s ICU-r… symfony/polyfill-mbstring v1.6.0 v1.6.0 Symfony polyfill for the Mbstring… symfony/polyfill-php56 v1.6.0 v1.6.0 Symfony polyfill backporting some… symfony/polyfill-php70 v1.6.0 v1.6.0 Symfony polyfill backporting some… symfony/polyfill-util v1.6.0 v1.6.0 Symfony utilities for portability… symfony/security-acl v3.0.0 v3.0.0 Symfony Security Component - ACL … symfony/swiftmailer-bundle v2.6.7 v3.1.6 Symfony SwiftmailerBundle symfony/symfony v3.3.10 v3.3.10 The Symfony PHP framework
PHP version
PHP 7.1.8-1ubuntu1 (cli) (built: Aug 8 2017 15:57:37) ( NTS ) Copyright © 1997-2017 The PHP Group Zend Engine v3.1.0, Copyright © 1998-2017 Zend Technologies with Zend OPcache v7.1.8-1ubuntu1, Copyright © 1999-2017, by Zend Technologies
Subject
I did composer update and the following packages were updated:
- Updating doctrine/orm (v2.5.11 => v2.5.12): Loading from cache
- Updating cocur/slugify (v2.5 => v3.0.1): Loading from cache
- Updating sonata-project/core-bundle (3.5.1 => 3.6.0): Loading from cache
- Updating sonata-project/cache (1.1.0 => 2.0.0): Loading from cache
- Updating sonata-project/block-bundle (3.4.0 => 3.5.0): Loading from cache
- Updating sonata-project/admin-bundle (3.23.0 => 3.24.0): Loading from cache
- Updating sonata-project/formatter-bundle (3.2.3 => 3.3.0): Loading from cache
- Updating doctrine/doctrine-bundle (1.7.1 => 1.7.2): Loading from cache
- Updating doctrine/doctrine-fixtures-bundle (v2.4.0 => v2.4.1): Loading from cache
- Updating sensiolabs/security-checker (v4.1.5 => v4.1.6): Loading from cache
- Removing sonata-project/user-bundle (dev-master c8aa3ca)
- Installing sonata-project/user-bundle (dev-master bd98e7c): Cloning bd98e7c40f from cache
and then when i tried to do:
php bin/console doctrine:schema:update --force
, i got the following exception:
[Doctrine\ORM\ORMException]
Column name `id` referenced for relation from Application\Sonata\UserBundle
\Entity\User towards Sonata\UserBundle\Entity\BaseGroup does not exist.
I didnt make any changes to the generated Application/Sonata/UserBundle entities or doctrine orm configuration.
The problem occurred right after the update, im not sure where the problem comes from. I previewed all the changes between c8aa3ca bd98e7c but im not sure there is something that breaks it.
Here is my configuration:
fos_user:
db_driver: orm
firewall_name: main
user_class: Application\Sonata\UserBundle\Entity\User
from_email:
address: ilia.karkamov@gmail.com
sender_name: Iliya Karkamov
group:
group_class: Application\Sonata\UserBundle\Entity\Group
group_manager: sonata.user.orm.group_manager
service:
user_manager: sonata.user.orm.user_manager
Any ideas?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (9 by maintainers)
Found a solution…
On sonata_user config:
Not sure if the intention of the PR was to always have to define this default config or not.
@maavia10 Please use text copy/paste instead of IDE screenshots.
Well, like any user AFAIK. Just rollback to the last working version waiting that.
If it was master or another dev branches, then don’t use master. Master is unstable, it’s the goal of dev branches. You can also rollback to a specific commit with composer.
@maavia10 Again, this is not a help channel. Please stop posting answer about your issue to keep this one clean. I’ll remove the last one.
Just rollback to your previous composer state. If have difficulties to do that, please ask for help on StackOverflow or Symfony Slack channels.
Regards.
Im using the easy-extends bundle generated configuration:
@IliyaKarkamov Thanks!