Refactor EntityDto: deprecate 3 methods and allow access to ClassMeta… #7113
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Another refactoring. Please just tell me if you have better things to do than checking my refactoring PRs 😬
Notes:
ClassMetadata
and provide no extra value IMHO. If they don't exist anymore there is less EA code to maintain and IMHO the client code is easier to follow if there is no extra wrapper between Doctrine and the client code.getPropertyDataType()
is not only a wrapper overClassMetadata
but also mixesFieldMapping
withAssociationMapping
and so it returns sometimesstring
sometimesint
-> so it makes things even more complicated than just usingClassMetadata
itself. I also plan a PR for deprecatinggetPropertyMetadata
(in the first place because it mixesFieldMapping
withAssociationMapping
).\array_key_exists
withisset
simply because Doctrine ORM (and alsoSymfony\Bridge\Doctrine\Form\DoctrineOrmTypeGuesser
) checks the same thing withisset
instead of\array_key_exists
But in 5.0.0 all occurances can be changed from 9 lines to 1 line: