Closed zluiten closed 3 years ago
Any idea what's needed to get this in?
@netiul I've rebased against the new "1.9.x" branch; you'll need to pull from your own remote to get your local checkout up-to-date.
However, tests are failing.
I tried a number of different approaches to fix them, but it seems like there's something fundamentally broken in the testing suite or with the existing dependencies, and after a few hours trying to figure it all out, I need to leave that to others to resolve. Hopefully, if they get resolved, your tests will pass again, and we can merge and release.
@weierophinney Thanks for the work you do and have done! About the tests, it looks like they passed on travis?
You're right! They hadn't been when I was testing before, but they clearly do now! The only issue is CS, which is not your problem to fix in this case (it's a line-length issue with our copyright lines). I'll get that fixed shortly.
@weierophinney Apologies, I somehow completed missed you having reviewed this. Thanks though, I'll soon process your remarks.
@weierophinney Thanks again for the review and apologies for the late reply. Incorporated your suggestions and meanwhile fixed a bug as noted here.
The Travis builds with lowest composer dependencies (--prefer-lowest
) for 7.3 and 7.4 are (still) disabled. I'm not familiar with reason why those are disabled (I tested, builds do fail). I think it's out of scope of this PR to fix that.
I've also added support for immutable date doctrine field variants. That was actually the reason I wanted to extract the type casting behavior so I could replace the TypeCaster with one that supported the immutable date types.
Hey @weierophinney, can you have another look?
@weierophinney Thanks again. I've put something in the README.
This is follow up on zfcampus/zf-doctrine-querybuilder#57
Description
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 kept 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.