- Issue created by @niklan
- π·πΊRussia niklan Russia, Perm
Test that simply shows that it can lead to a problem with undefined
$value
property. - Status changed to Needs review
over 1 year ago 2:11pm 6 September 2023 - last update
over 1 year ago 30,131 pass, 2 fail The last submitted patch, 2: core-3385629-2-test-only.patch, failed testing. View results β
- Status changed to Needs work
over 1 year ago 8:45pm 8 September 2023 - πΊπΈUnited States smustgrave
Believe to remove the functions they would have to be deprecated no?
- π·πΊRussia niklan Russia, Perm
I'm not sure, especially considering that
PrimitiveBase
is an abstract class that extends another abstract classTypedData
with exact same methods, and logic inside.Maybe we should do overwise, remove logic of these methods from
TypedData
? Just make them simply abstract and empty? Because for now they are simply broken (which test is shows): they assume that$value
property is presented, but it is not defined by it, and I don't think it should define it as well. But in this case we have to refactor some other classes which extendsTypedData
.For example,
\Drupal\Core\Config\Schema\Element
extendsTypedData
directly, because of the problem, it also defines$value
property which is makes no sense and just extra code, it should extendPrimitiveBase
or provide custom setter and getter, because ifTypedData
at some point will be changed, it will break. This all a little bit confusing, becauseTypedData
using a property that it doesn't define, and other code define it for it, but we also havePrimitiveBase
that does that and duplicate methods as well.