Closed baumannsven closed 7 years ago
Sound legit, but I think we don't need both checks? As \DataContainer
extends from Contao\DataContainer
, checking only the later should be sufficient?
As far as I remember it won't work. I think I had a case where \DataContainer !== \Contao\DataContainer
but that should be tested.
LGTM 👍
I have a alternative fix for this problem. Before test object is a instance of \DataContainer, test if class_exists('\DataContainer'). Then works too.
What do you mean. If this better for you, i costumize this pull request.
It´s possible to check the solution of @baumannsven ? we have a fatal error at MetaModel...
@qzminski The only case where this happens is when someone is aliasing an own implementation to \DataContainer
However this is no problem when checking via instanceof
, as the inheritance must always be kept.
So the proposed check by @baumannsven is correct, as it is checking both implementations (which by contract) both will be ABI compatible.
Dc General don´t use root namespace. By action delete the check instance of \DataContainer failed.