ingenerator / php-utils

Simple, standalone utility classes for PHP applications
BSD 3-Clause "New" or "Revised" License
1 stars 2 forks source link

Fix StrictDate::date_after tests & deprecate validating InvalidUserDateTime #46

Closed acoulton closed 2 years ago

acoulton commented 2 years ago

The ::date_after, ::date_immutable etc validators are designed to be used with a data array that already contains either DateTimeImmutable or our placeholder InvalidUserDateTime objects. This worked for a while but is a problematic data / logic structure - deprecate in favour of deciding whether your app is going to validate input as strings or as datetimes.