|
| 1 | +# CHANGELOG |
| 2 | + |
| 3 | +## 2.3.1 |
| 4 | + |
| 5 | +- (DOC) Update the documentation [128](https://github.com/auraphp/Aura.Filter/pull/128), [129](https://github.com/auraphp/Aura.Filter/pull/129) |
| 6 | +- (FIX) PHP Notice when trying to sanitize a string to integer [132](https://github.com/auraphp/Aura.Filter/issues/132) |
| 7 | +- (ADD) 'phpunit/phpunit' as require-dev dependency in composer.json . |
| 8 | +- (ADD) Added CHANGELOG.md file. |
| 9 | +- (REMOVE) Removed CHANGES.md file. |
| 10 | + |
| 11 | +## 2.3.0 |
| 12 | + |
| 13 | +- (ADD) Implement JsonSerializable in the Failure class |
| 14 | +- (DOC) Update the documentation |
| 15 | +- (FIX) Removed undefined but registered sanitizers from SanitizerLocator |
| 16 | + |
| 17 | +## 2.2.0 |
| 18 | + |
| 19 | +This release adds new validation and sanitizing rules: |
| 20 | + |
| 21 | +- `lowerCase` for all-lower-case values |
| 22 | +- `upperCase` for all-upper-case values |
| 23 | +- `titleCase` for title-cased values |
| 24 | +- `lowerCaseFirst` for values where the first character is lower-case |
| 25 | +- `upperCaseFirst` for values where the first character is upper-case |
| 26 | + |
| 27 | +## 2.1.0 |
| 28 | + |
| 29 | +This release adds an `isNotBlank()` validation specifier, and fixes a bug where sanitizing `to()` a rule on a missing field raised a notice. |
| 30 | + |
| 31 | +## 2.0.0 |
| 32 | + |
| 33 | +First stable release. |
| 34 | + |
| 35 | +- (FIX) The Spec class now reports failures better when closures are used in HHVM. |
| 36 | + |
| 37 | +- (TST) Improved testing. |
| 38 | + |
| 39 | +## 2.0.0-beta3 |
| 40 | + |
| 41 | +Third beta release. |
| 42 | + |
| 43 | +- (BRK) Due to new blank-checking in ValidateSpec::applyRule(), remove 'blank' validation rule, and add 'isBlank()' validation spec method. |
| 44 | + |
| 45 | +- (FIX) Filter arguments using arrays, resources, and objects (including closures) no longer cause errors when creating the default filter message. |
| 46 | + |
| 47 | +- (ADD) Validation now fails on missing (unset or null) fields. |
| 48 | + |
| 49 | +- (DOC) Update documentation. |
| 50 | + |
| 51 | +## 2.0.0-beta2 |
| 52 | + |
| 53 | +Second beta release. |
| 54 | + |
| 55 | +- (ADD) Add UTF-8 support in Alpha, Alnum, Strlen*, and Word filters with help from @mivanov93. |
| 56 | + |
| 57 | + - All string-length filters are now multi-byte aware using either `mbstring` or `iconv` extensions. |
| 58 | + |
| 59 | + - In alnum and alpha rules, use unicode letters and digits instead of ctype. |
| 60 | + |
| 61 | + - In word rules, use unicode letters and digits instead of \w and \W. |
| 62 | + |
| 63 | +- (ADD) More robust email validation based on is_email() from @dominicsayers, plus IDN support as suggested by @dg via the `intl` extension. |
| 64 | + |
| 65 | +- (TEST) Update Travis-CI config to use containers. |
| 66 | + |
| 67 | +- (DOCS) Update relevant documentation. |
| 68 | + |
| 69 | +## 2.0.0-beta1 |
| 70 | + |
| 71 | +First 2.0 beta release. |
| 72 | + |
| 73 | +- BREAK: Renamed class Filter to SubjectFilter. |
| 74 | + |
| 75 | +- BREAK: Removed method SubjectFilter::strict() and all "strict" behavior, as get_object_vars() is not guaranteed in some objects (e.g. magic get/set vs public properties) |
| 76 | + |
| 77 | +- BREAK: Replaced method SubjectFilter::getMessages() et al with getFailures(); failures are now reported as a FailureCollection instead of as an array of text messages. |
| 78 | + |
| 79 | +- BREAK: Removed classes Rule\Validate\Ipv4 and Ipv6 in favor of allowing flags on |
| 80 | + Rule\Validate\Ip. |
| 81 | + |
| 82 | +- BREAK: Removed class Rule\Validate\InTableColumn entirely, as it requires a PDO connection. This is better implemented as part of a group of database-related filters, rather than as a special case herein. |
| 83 | + |
| 84 | +- BREAK: Moved namespace Rule\Locator to Locator. |
| 85 | + |
| 86 | +- BREAK: Renamed class Spec\AbstractSpec to Spec\Spec. |
| 87 | + |
| 88 | +- BREAK: Removed method Spec\Spec::getFailureMode(). |
| 89 | + |
| 90 | +- BREAK: Moved constants from SubjectFilter to Spec\Spec. |
| 91 | + |
| 92 | +- BREAK: Removed methods ValueFilter::assert() and setExceptionClass(). |
| 93 | + |
| 94 | +- ADD: Class FilterFactory now takes two constructor params, $validate_factories and $sanitize_factories, to allow injection of rule factories at construction time. |
| 95 | + |
| 96 | +- ADD: Class AbstractStaticFilter to allow users to create static value filters. |
| 97 | + |
| 98 | +## 2.0.0-alpha1 |
| 99 | + |
| 100 | +First 2.0 dev release; breaking changes are coming. |
| 101 | + |
| 102 | +## 1.1.0 |
| 103 | + |
| 104 | +- Add Translator::set() method, to set custom messages. |
| 105 | +- Docblock and metadata corrections. |
| 106 | + |
| 107 | +## 1.0.2 |
| 108 | + |
| 109 | +Hygiene release: docblock and Composer updates. |
| 110 | + |
| 111 | +## 1.0.1 |
| 112 | + |
| 113 | +Hygeine release: point travis status badge to develop branch. |
| 114 | + |
| 115 | +## 1.0.0 |
| 116 | + |
| 117 | +- [ADD] German translations; thanks @geissler |
| 118 | + |
| 119 | +- [ADD] Rule\Isbn from @geissler |
| 120 | + |
| 121 | +- [DOC] Docblock cleanup (mostly style, some typo fixes and return type |
| 122 | + additions) |
| 123 | + |
| 124 | +- [ADD] RuleCollection::addMessages(), to complement Aura.Input |
| 125 | + Filter::addMessages(), per @harikt |
| 126 | + |
| 127 | +- [CHG] Translator::translate() to deal with array values. |
| 128 | + |
| 129 | +- [CHG] Rule\InKeys to add a 'keys' pseudo-param, for message translations |
| 130 | + |
| 131 | +- [DOC] Fixed wrong parameter order in readme; thanks @chrissound |
| 132 | + |
| 133 | +## 1.0.0-beta2 |
| 134 | + |
| 135 | +There are some BC breaks in this release, but it's a "Google" beta, so ... |
| 136 | + |
| 137 | +- [NEW] Rule\All: the value must pass all of the specified sub-rules. |
| 138 | + |
| 139 | +- [NEW] Rule\Any: the value must pass any one of a series of sub-rules. |
| 140 | + |
| 141 | +- [NEW] Rule\Closure: pass a closure to filter the value. |
| 142 | + |
| 143 | +- [NEW] Rule\Locale: the value must be a locale code. |
| 144 | + |
| 145 | +- [NEW] Rule\Method: call a method on the value object being filtered so that |
| 146 | + it may filter itself. |
| 147 | + |
| 148 | +- [CHG] Various typo fixes from pborrelli. |
| 149 | + |
| 150 | +- [CHG] In all rules, make validate()/sanitize() public so they can be called |
| 151 | + directly from custom rules. |
| 152 | + |
| 153 | +- [NEW] Add translation facility and internationalization messages. |
| 154 | + |
| 155 | +- [REF] Remove StdClass typehints (objects don't descend from StdClass) |
| 156 | + |
| 157 | +- [BRK] Remove property $message; replace with $message_map and $message_key. |
| 158 | + |
| 159 | +- [ADD] Property $params to retain params passed to validate() and sanitize(). |
| 160 | + |
| 161 | +- [ADD] Methods setParams(), setMessageKey(), and getParams(). |
| 162 | + |
| 163 | +- [CHG] Method is(), isNot(), et. al. set the appropriate message key. |
| 164 | + |
| 165 | +- [ADD] Method RuleCollection::useFieldMessage() to specify a single message |
| 166 | + to be used when a field fials one or more of its filter rules |
| 167 | + |
| 168 | +- [BRK] Registry entries *must* be wrapped in a callable from now on |
| 169 | + |
| 170 | +- [FIX] In Rule\DateTime, improve checking for valid dates |
| 171 | + |
| 172 | +- [ADD] Method RuleCollection::setRule() so we can implement Aura.Input FilterInterface |
| 173 | + |
| 174 | +- [CHG] For standalone scripts/instance.php usage, moved all rules to a rule |
| 175 | + registry located in scripts/registry.php |
| 176 | + |
| 177 | + |
| 178 | +## 1.0.0-beta1 |
| 179 | + |
| 180 | +Initial release. |
0 commit comments