Closed azamalvi closed 3 years ago
any update?
I'm having the same issue. @azamalvi I'm guessing you are using Doctrine ODM 2. I'm currently doing an upgrade to ODM 2 on my project and the same issue appears.
Can anyone from the team specify if this will be supported in the very near future?
Thanks.
There was a commit, but not a release https://github.com/FriendsOfSymfony/FOSUserBundle/commit/6733bc89e832335e3b6ef83568b51dcf4c06202f
Is there any update on this? it's still happening for me
Can confirm with the following packages:
"require": {
"php": "^7.4",
"ext-ctype": "*",
"ext-iconv": "*",
"ext-intl": "*",
"friendsofsymfony/user-bundle": "^2.1",
"sonata-project/admin-bundle": "^3.93",
"sonata-project/doctrine-mongodb-admin-bundle": "^3.7",
"sonata-project/exporter": "2.x",
"sonata-project/intl-bundle": "^2.10",
"sonata-project/translation-bundle": "^2.7",
"sonata-project/user-bundle": "^4.11",
"symfony/apache-pack": "^1.0",
"symfony/dotenv": "^4.4",
"symfony/flex": "^1.12",
"symfony/framework-bundle": "^4.4",
"symfony/http-kernel": "^4.4",
"symfony/yaml": "^4.4",
"twig/twig": "^2.9"
},
This has at least been fixed inside the SonataUserBundle
itself:
https://github.com/sonata-project/SonataUserBundle/issues/1120
Should those mappings not overwrite these invalid ones?
Refs: https://github.com/FriendsOfSymfony/FOSUserBundle/pull/2889
Strange! Composer uses 2.1.2.
According to the repo the fix is there for 2.x:
But locally the code looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<doctrine-mongo-mapping xmlns="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping
http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping.xsd">
<mapped-superclass name="FOS\UserBundle\Model\User" collection="fos_user_user">
<field name="username" fieldName="username" type="string" />
Am I missing something?
Latest commit 658be34 on 16 Oct 2019 -> Fix included.
Latest release: 2.1.2 @stof stof released this on 8 Mar 2018
https://github.com/FriendsOfSymfony/FOSUserBundle/releases
I'm confused.
Since the fix should be included in dev-master
I will try that version.
As expected the issue does not exist with dev-master
.
This is fixed in the 2.2.0 release
@stof can you release a 2.1.3 with this fix?
Symfony FOSUserBundle versions: v2.1.2
Description of the problem including expected versus actual behavior: It looks like that this plugin is not working for MongoDB. When I try to use that it throw an error The attribute 'fieldName' is not allowed. It is related to User.mongodb.xml and Group.mongodb.xml.
fieldName
should befield-name
Steps to reproduce:
Provide logs (if relevant): Element '{http://doctrine-project.org/schemas/odm/doctrine-mongo-mapping}field', attribute 'fieldName': The attribute 'fieldName' is not allowed.