jpfuentes2 / php-activerecord

ActiveRecord implementation for PHP
http://www.phpactiverecord.org/
Other
1.32k stars 443 forks source link

Bugfix - Explicit Time Zone assignment regression from #532 #539

Closed Rican7 closed 8 years ago

Rican7 commented 8 years ago

So PR #533 was fantastic in fixing an issue regarding passing in an explicit time-zone during column casting and attribute assigning. Unfortunately, the merge of #532 caused a regression as it overwrote the fix made in #533. 😞

This PR fixes that regression.

The included test makes sure the behavior is correct, and the following snippet demonstrates the issue at hand:

screen shot 2016-05-19 at 12 05 55 pm

Rican7 commented 8 years ago

Took a few tries to catch all the places where we were "doing it wrong", but it's good now. Thank god for tests...

/cc: @koenpunt @jpfuentes2

jpfuentes2 commented 8 years ago

Let's move discussion to upgrading php-unit to #540.

This is why we write tests. Excellent test coverage here, @Rican7 :)

Rican7 commented 8 years ago

Thanks @jpfuentes2. Tests FTW.