Open zluiten opened 5 years ago
This repository has been closed and moved to laminas-api-tools/api-tools-doctrine-querybuilder; a new issue has been opened at https://github.com/laminas-api-tools/api-tools-doctrine-querybuilder/issues/1.
This repository has been moved to laminas-api-tools/api-tools-doctrine-querybuilder. If you feel that this patch is still relevant, please re-open against that repository, and reference this issue. To re-open, we suggest the following workflow:
git rebase -i origin/{branch}
)
By extracting the type casting to its own class it can be easily replaced when needed. Preferring composition over inheritance etc.
It becomes better testable as well.
I tried to keep BC by proxying to the TypeCaster and instantiating the TypeCaster in the AbstractFilter::getTypeCaster() method when not set in case FilterManager::filter() method is overridden.