Addition of a mapper which can cast properties to primitive types #11
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.
Hi, I'd like to put this up for review. This adds a mapper which can cast to primitive types, it takes an existing mapper (Standard, Symfony, etc.) and then does some simple casting after they've done the leg work.
It adds an annotation called 'Cast' which is required to be placed on the properties you want converted. I'm not particularly happy having to add an annotation but it's not possible to read the
@var
comment as opcode caches can be configured to strip comments.This does add some bloat to the Bindto project and I understand if this should be kept separate.