- Move "tests/phpunit.xml" to "phpunit.xml.dist"
- Update documentation and contributing documents
- Update Travis settings
- Add "phpunit.xml" in the Git ignore list
Skipping TLD check allows for local domains like "machine.dev",
but the default behavior of the rule still the same: it validates
TLDs, so domains will only be valid (by default) if the TLD is a
valid one.
The signature of rule (using the builder) changes from:
v::domain() // Still works, same behavior as before.
To:
v::domain(false) // Skips TLD check.
Fix#33.
The "Domain" rule now validates domains on "ASCII Compatible Encoding"
[ACE][1] for internationalized domain names (ICANN, 2003).
An excerpt from Wikipedia article:
> If given a label containing at least one non-ASCII character, ToASCII
> will apply the Nameprep algorithm, which converts the label to
> lowercase and performs other normalization, and will then translate the
> result to ASCII using [Punycode][16] before prepending the four-character
> string ["xn--"][17].
[1]: http://wikipedia.org/wiki/Internationalized_domain_name#ToASCII_and_ToUnicode
[16]: http://tools.ietf.org/html/rfc3492
[17]: http://www.atm.tut.fi/list-archive/ietf-announce/msg13572.html
The API of Symfony\Component\Validator changed more than 2 years ago, so
this validation rule wasn't working for quite a long time.
This fixes the validator to work with versions >= 2.1 of
Symfony/Validation as the change on composer shows us. Although a bug
fix, this breaks compatibility with people already using this validator.
I was astonished to not find any tests for that validator also. :(
With those tests we can ensure that any change on the component API will
be noticed by us.
Updated all tests to ensure we don't fail an empty input, right across the board now. One rule for all but NotEmpty Class family. Instead of testing validate methods we should test against the __invoke method which is what validator uses. Updated all validate methods and calling __invoke directly in tests.