single-table-inheritance
single-table-inheritance copied to clipboard
`newFromBuilder` does not maintain mutated attributes
https://github.com/jonspalmer/single-table-inheritance/blob/main/src/SingleTableInheritanceTrait.php#L188
Constructing this object with no attributes and then setting them as "filtered" does not mutate properties that are intended to be mutated.
I have verified that passing the attributes directly to the constructor does mutate the intended properties.
I'm not completely following the problem. Can you provide a failing test case in a PR?
@jonspalmer, went ahead and did that. You can see the failure in this test case -- https://github.com/jonspalmer/single-table-inheritance/pull/71/files#diff-4b4e276a9a1eda9f7dbedda3cd6730765e4f0efba71a699d4e80a49d03054240R36
I made one that passes using direct instantiation as well.