Remove fieldDescription deprecation#1170
Conversation
| { | ||
| public function __construct() | ||
| { | ||
| $this->parentAssociationMappings = []; |
There was a problem hiding this comment.
This is already the default value. And the __construct() override disallow to pass a name as argument.
|
|
||
| $this->type = $this->type ?: $associationMapping['type']; | ||
| $this->mappingType = $this->mappingType ?: $associationMapping['type']; | ||
| // NEXT_MAJOR: Remove the next line. |
There was a problem hiding this comment.
The next line is uselss because the fieldName is supposed to be set to find the association mapping.
Plus in next major, the field name will be set with new FieldDescription('FieldName')
|
|
||
| $this->type = $this->type ?: $fieldMapping['type']; | ||
| $this->mappingType = $this->mappingType ?: $fieldMapping['type']; | ||
| // NEXT_MAJOR: Remove the next line. |
There was a problem hiding this comment.
The next line is uselss because the fieldName is supposed to be set to find the association mapping.
Plus in next major, the field name will be set with new FieldDescription('FieldName')
|
What is wrong with static analysis ? @sonata-project/contributors |
|
You have the click the button 😉 That issue is typical of circular dependencies, here is how we solve it at Basically, I think you will have to let Composer know what version of @OskarStark I think the Github Action should fail when Composer fails, why is that not the case? |
How can I do this ? |
|
Use |
This won't be a long term fix, or we will have to update the version every time. And why the composer would work for test but not for quality assurance ?
Should be fix. |
Good question. Also, why does it fail only now and not before? I notice that the Composer command is not the same, but that's it. Note that Composer 2 has been released, maybe it has to do with that?
This means the difference probably lies in that guess. For some reason, Composer does not have access at the branch name in the case of the QA workflow. |
|
Does any of this helps? composer/composer#8579 (comment) AFAIK it was only needed on block bundle 3.x because it has circular dependency with admin 3.x (and the provided solution is not working on every case, I copied it from the old travis config I will try to use somethinh from that comment). |
|
Fixed here for blockbundle: sonata-project/SonataBlockBundle#773 |
I will wait for the dev-kit pr then :) |
|
The problem is with this Pr: sonata-project/SonataAdminBundle#6438 I gave a reason to not add that conflict, and it also creates cyclic dependency, so IMho we should revert that part and add the requirement here |
|
On the block bundle 3.x is needed because of another cyclic dependency (and we should avoid them), fixed in 4.x |
It's not the same to add a requirement here or add a conflict to AdminBundle. With a requirement, 3.25 orm cant be install without 3.78. But 3.78 can be install with 3.23 witch I wanted to avoid. I dont understand why you call this a cyclic dependency. Its not because there is a conflict between admin and orm that admin needs orm. |
Something is wrong if the admin bundle (which does not require orm or mongodb persistence , because it is the other way around) is relying on a specific behavior of a specific version of the persistence. We either have a behavioral bc break or I cant understand. Is the admin bundle who defines the interfaces and the expected behavior, and the persistence who implements those contracts... |
To resume the situation: The right behavior is the following,
BUT, the persistence bundle was not passing the option, and the default value was true. In practice, the impact of the function A vs the function B is so minimal that I start to think that the best solution would be indeed to remove the conflict. |
|
Ready to review now @sonata-project/contributors |
| @@ -35,6 +30,7 @@ public function setAssociationMapping($associationMapping) | |||
|
|
|||
| $this->type = $this->type ?: $associationMapping['type']; | |||
There was a problem hiding this comment.
Off topic: if these ternaries are intended to "catch" only null values (instead of other falsy values), we should use ?? instead.

Subject
BC
Changelog