-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
添加setDefault,用来设置默认值,当有些字段不需要可填可不填,或者该字段用于某个控制器的固定值时可使用->setDefault() #1
Commits on Aug 23, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 314aa36 - Browse repository at this point
Copy the full SHA 314aa36View commit details
Commits on Aug 26, 2020
-
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5150428 - Browse repository at this point
Copy the full SHA 5150428View commit details -
Update version of PHPUnit package
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 966c510 - Browse repository at this point
Copy the full SHA 966c510View commit details
Commits on Aug 27, 2020
-
Update version of "respect/coding-standard"
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 72dd881 - Browse repository at this point
Copy the full SHA 72dd881View commit details -
Configure continuous integration with GitHub actions
This commit will also remove Travis and Scrutinizer and will configure Codecov as a code coverage tool. A few changes in the PHPUnit configuration already had to be made before, but became more visible now. They're along with this commit. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 80ff37c - Browse repository at this point
Copy the full SHA 80ff37cView commit details -
Remove PHP 8.0 from the build matrix
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for a65980c - Browse repository at this point
Copy the full SHA a65980cView commit details
Commits on Aug 28, 2020
-
We already supported PHP 8.0 as our constrains in the "composer.json" file was ">=7.3", but we were not testing it before. Because of that, I found a bug on "EndsWith" which is fixed now. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f53b77a - Browse repository at this point
Copy the full SHA f53b77aView commit details
Commits on Sep 1, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 2fad28b - Browse repository at this point
Copy the full SHA 2fad28bView commit details
Commits on Oct 4, 2020
-
Only define filter_var options when it is valid
The third argument of "filter_var" must be either an integer or an array. On PHP 8 this "FilterVar" rule fails because we always pass that argument, even if it is null. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e0c6f33 - Browse repository at this point
Copy the full SHA e0c6f33View commit details -
Check "bcmath" extension before executing tests
Although BCMath is necessary to execute "Ip" and "Iban" rules, we not required that in the "composer.json" file. That's because if someone wants to use the library, but doesn't want to use those rules, they would not need to install that extension. However, when executing the tests, they will break. This commit will verify whether the extension exists to test "Ip" and "Iban" rules. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ed304f3 - Browse repository at this point
Copy the full SHA ed304f3View commit details -
Auto-resolve exception namespaces
After the refactoring on the Factory class [1], to throw exceptions of a specific rule, it is necessary to add the exception namespace of that rule. That change makes sense when someone wants to create rules from the Validator class, but when using rules as classes, it's not as handy. This commit will auto-resolve exception based on the rule namespace, just as it used to be. [1]: 1f217dd Co-authored-by: Casey McLaughlin <caseyamcl@gmail.com> Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8b2819e - Browse repository at this point
Copy the full SHA 8b2819eView commit details -
Remove "Key" prefix from KeyException message
Most Validation errors are sent to Users/Visitors or Clients and as such might not need to know it was a Key their inputs are being validated upon. Co-authored-by: Henrique Moody <henriquemoody@gmail.com> Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 029fa7f - Browse repository at this point
Copy the full SHA 029fa7fView commit details -
Allow file-related rules to validate PSR-7 interfaces
The PSR-7 has two interfaces that allow us to validate them as files. This commit will allow some rules to validate those interfaces. Co-authored-by: Henrique Moody <henriquemoody@gmail.com> Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ff253c7 - Browse repository at this point
Copy the full SHA ff253c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 444f105 - Browse repository at this point
Copy the full SHA 444f105View commit details -
Make "HexRgbColor" rule case-insensitive
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1809e9f - Browse repository at this point
Copy the full SHA 1809e9fView commit details -
Create mixin with rules names as methods
One of the reasons for this change is to spare some space on the Validator class, leaving only real code there. However, the biggest reason is that IDEs can auto-complete rules after Validator creates the first rule. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for d532e94 - Browse repository at this point
Copy the full SHA d532e94View commit details -
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 6c3aed9 - Browse repository at this point
Copy the full SHA 6c3aed9View commit details
Commits on Oct 5, 2020
-
Add "Decimal" link to related rules
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 1eb5b9d - Browse repository at this point
Copy the full SHA 1eb5b9dView commit details -
Fix wrong changelog in the Decimal's documentation
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5ba7646 - Browse repository at this point
Copy the full SHA 5ba7646View commit details
Commits on Feb 6, 2021
-
This commit will fix an issue but ignore two of them because it will require some refactoring that won't be possible in a PATCH version. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 44a60f6 - Browse repository at this point
Copy the full SHA 44a60f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a0b538 - Browse repository at this point
Copy the full SHA 5a0b538View commit details -
Use the last MINOR version in updaters
We have three workflows that automatically update the code. They are using version 2.0 as a base to create their changes. We need to update that because the last supported version is 2.1. Since I do not think it is a good idea to change code every time a new MINOR version is released, I moved that value to a repository secret. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f1be730 - Browse repository at this point
Copy the full SHA f1be730View commit details -
Use "sokil/php-isocodes" on SubdivisionCode
Inside the "data/" directory, we have files with lists of subdivisions that need to be updated. We have to update them manually, or we automate that task with a script and GitHub actions. The two options are very time consuming and also not ideal. We don't want to deal with that problem and, thinking that the user of this library may want to show the data that we validate, we should create a whole library to make it more usable. The "sokil/php-isocodes" is a simple library that, even supports translations. It's frequently updated and has gone to major performance updates. I am not fond of the idea of requiring an external library to install Validation, as I have seen that gone wrong before [1]. Ideally, that would be an optional dependency for people who would like to use those rules, but to make that happen, we need to release a MAJOR version. [1]: d072b4d Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 9c9c76e - Browse repository at this point
Copy the full SHA 9c9c76eView commit details -
Use "sokil/php-isocodes" on CurrencyCode
Since "sokil/php-isocodes" is a dependency of our repository already, it makes sense to use it as a source of currency codes instead of keeping a list of currencies ourselves. By using that library, we can also validate currency codes using different sets. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for f9b9dd2 - Browse repository at this point
Copy the full SHA f9b9dd2View commit details -
Use "sokil/php-isocodes" on LanguageCode
Since we already have that library as a dependency of our repository, it makes sense to use it as a source of language codes instead of keeping a list of currencies ourselves. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 5450ef8 - Browse repository at this point
Copy the full SHA 5450ef8View commit details -
Use "sokil/php-isocodes" on CountryCode
Since we already have that library as a dependency of our repository, it makes sense to use it as a source of country codes instead of keeping a list of currencies ourselves. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2060207 - Browse repository at this point
Copy the full SHA 2060207View commit details -
Upgrade supported version of "egulias/email-validator"
We could simply add version 3.0 instead of replacing it, but I would like to stimulate people to keep their libraries up-to-date. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3dcd859 - Browse repository at this point
Copy the full SHA 3dcd859View commit details -
Call mbstring functions without getting encoding
The functions from the mbstring can deal find with strings without forcing an specific encoding. However, sometimes "mb_detect_encoding()" cannot identify the encoding therefore the functions that expect a valid encoding will trigger a PHP error. This commit will remove the unnecessary use of "mb_detect_encoding()." Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 51ad23e - Browse repository at this point
Copy the full SHA 51ad23eView commit details
Commits on Mar 14, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 143420e - Browse repository at this point
Copy the full SHA 143420eView commit details
Commits on Mar 19, 2021
-
Remove ignored error from PHPStan
Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for be7e667 - Browse repository at this point
Copy the full SHA be7e667View commit details -
Revert "Use "sokil/php-isocodes" on CountryCode"
This reverts commit 2060207.
Configuration menu - View commit details
-
Copy full SHA for edbbe7f - Browse repository at this point
Copy the full SHA edbbe7fView commit details -
Revert "Use "sokil/php-isocodes" on LanguageCode"
This reverts commit 5450ef8.
Configuration menu - View commit details
-
Copy full SHA for b78f602 - Browse repository at this point
Copy the full SHA b78f602View commit details -
Revert "Use "sokil/php-isocodes" on CurrencyCode"
This reverts commit f9b9dd2.
Configuration menu - View commit details
-
Copy full SHA for 745a571 - Browse repository at this point
Copy the full SHA 745a571View commit details -
Revert "Use "sokil/php-isocodes" on SubdivisionCode"
This reverts commit 9c9c76e.
Configuration menu - View commit details
-
Copy full SHA for 4c21a7f - Browse repository at this point
Copy the full SHA 4c21a7fView commit details
Commits on May 5, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 6602941 - Browse repository at this point
Copy the full SHA 6602941View commit details
Commits on Aug 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b8ee424 - Browse repository at this point
Copy the full SHA b8ee424View commit details
Commits on Jan 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4847fe4 - Browse repository at this point
Copy the full SHA 4847fe4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 60566e2 - Browse repository at this point
Copy the full SHA 60566e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf4082d - Browse repository at this point
Copy the full SHA bf4082dView commit details
Commits on Jun 8, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e219da2 - Browse repository at this point
Copy the full SHA e219da2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e264f9 - Browse repository at this point
Copy the full SHA 5e264f9View commit details
Commits on Jun 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c7a6f2e - Browse repository at this point
Copy the full SHA c7a6f2eView commit details
Commits on Oct 22, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c215761 - Browse repository at this point
Copy the full SHA c215761View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0cd309d - Browse repository at this point
Copy the full SHA 0cd309dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1abf32c - Browse repository at this point
Copy the full SHA 1abf32cView commit details
Commits on Feb 13, 2023
-
Use
json_validate
inRules\Json
if available (Respect#1394)[`json_validate` function](https://wiki.php.net/rfc/json_validate) [added in PHP 8.3](https://php.watch/versions/8.3/json_validate) validates a given string input to contain valid JSON without decoding it in memory. This adds a function availability check to `Rules\Json`, and uses the new function instead of decoding the given input, followed by a last-error check.
Configuration menu - View commit details
-
Copy full SHA for 746c755 - Browse repository at this point
Copy the full SHA 746c755View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15f148d - Browse repository at this point
Copy the full SHA 15f148dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e345b7 - Browse repository at this point
Copy the full SHA 8e345b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2951dfd - Browse repository at this point
Copy the full SHA 2951dfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for e5223a0 - Browse repository at this point
Copy the full SHA e5223a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13f20e7 - Browse repository at this point
Copy the full SHA 13f20e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2c5793a - Browse repository at this point
Copy the full SHA 2c5793aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74d7f03 - Browse repository at this point
Copy the full SHA 74d7f03View commit details -
Configuration menu - View commit details
-
Copy full SHA for ecccfb8 - Browse repository at this point
Copy the full SHA ecccfb8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3eb085a - Browse repository at this point
Copy the full SHA 3eb085aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ae39de - Browse repository at this point
Copy the full SHA 9ae39deView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1481c8e - Browse repository at this point
Copy the full SHA 1481c8eView commit details
Commits on Feb 15, 2023
-
Configuration menu - View commit details
-
Copy full SHA for d304ace - Browse repository at this point
Copy the full SHA d304aceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e96fd1 - Browse repository at this point
Copy the full SHA 1e96fd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e2f752 - Browse repository at this point
Copy the full SHA 1e2f752View commit details -
Configuration menu - View commit details
-
Copy full SHA for 74dee73 - Browse repository at this point
Copy the full SHA 74dee73View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b3c607 - Browse repository at this point
Copy the full SHA 8b3c607View commit details -
Configuration menu - View commit details
-
Copy full SHA for f080f7d - Browse repository at this point
Copy the full SHA f080f7dView commit details -
Bump codecov/codecov-action from 1 to 3 (Respect#1398)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 3. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v1...v3) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for a96614b - Browse repository at this point
Copy the full SHA a96614bView commit details -
Bump actions/checkout from 2 to 3 (Respect#1399)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v2...v3) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 7776652 - Browse repository at this point
Copy the full SHA 7776652View commit details -
Update symfony/validator requirement from ^3.0||^4.0 to ^3.0||^4.0||^…
…5.0 (Respect#1400) Updates the requirements on [symfony/validator](https://github.com/symfony/validator) to permit the latest version. - [Release notes](https://github.com/symfony/validator/releases) - [Changelog](https://github.com/symfony/validator/blob/6.2/CHANGELOG.md) - [Commits](https://github.com/symfony/validator/commits/v5.4.19) --- updated-dependencies: - dependency-name: symfony/validator dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for c6eaf05 - Browse repository at this point
Copy the full SHA c6eaf05View commit details
Commits on Feb 18, 2023
-
Configuration menu - View commit details
-
Copy full SHA for a3e016b - Browse repository at this point
Copy the full SHA a3e016bView commit details
Commits on Feb 19, 2023
-
Improve FilterVar with FILTER_VALIDATE_* options
The `filter_var` function is more of a sanitizer, but we as a validation library do not care for that use case. We should treat its sanitizings as a signal for checking if the type after sanitization matches the option provided. This fixes Respect#1387
Configuration menu - View commit details
-
Copy full SHA for 689026f - Browse repository at this point
Copy the full SHA 689026fView commit details -
Remove version info from Tld.php
We currently use a GitHub action to automate updating this file. That action has the ability to ignore making the PR if the file didn't changed. Having the version number, which changed a line, was causing several useless PR. Users can still check if Tld.php changed by seeing the git log, and a manual note should be issued by the maintainer on the CHANGELOG.md file when a release containing such changes is made.
Configuration menu - View commit details
-
Copy full SHA for ef4778b - Browse repository at this point
Copy the full SHA ef4778bView commit details -
SPDX IDs are shorter than licensing notes previously used, and adhere better to FOSS standards. It is also machine-readable.
Configuration menu - View commit details
-
Copy full SHA for ab3732f - Browse repository at this point
Copy the full SHA ab3732fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8cafa3f - Browse repository at this point
Copy the full SHA 8cafa3fView commit details -
Increase phpstan level from 7 to 8
- Fixed all phpstan errors and ignoreds. - False positives now have a "Why:" comment on phpstan config.
Configuration menu - View commit details
-
Copy full SHA for 727e7cc - Browse repository at this point
Copy the full SHA 727e7ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 493a665 - Browse repository at this point
Copy the full SHA 493a665View commit details -
Make KeySet impossible to wrap in not(), fix structure message
The use case for negating a keyset is very confusing, and can lead to validators that don't do what they expect. This commit introduces NonNegatable rules, which will throw a Component exception if you try to wrap them in `Not`. This change was necessary to ensure proper message reporting when extra keys exist on the keyset. This fixes Respect#1349
Configuration menu - View commit details
-
Copy full SHA for fc8230a - Browse repository at this point
Copy the full SHA fc8230aView commit details -
Doing regex on phone numbers is not a great idea. This is a breaking change, but a good one. Phone validation is now much stricter, and allows choosing the country.
Configuration menu - View commit details
-
Copy full SHA for cc3bf86 - Browse repository at this point
Copy the full SHA cc3bf86View commit details -
Use PHP files and setup a runtime cache for CountryInfo
Previously, we were loading country info from a JSON file. This changes it to use PHP files instead. It also caches these resources across calls avoiding these files to be loaded more than once per process.
Configuration menu - View commit details
-
Copy full SHA for 6173757 - Browse repository at this point
Copy the full SHA 6173757View commit details -
Configuration menu - View commit details
-
Copy full SHA for 55290af - Browse repository at this point
Copy the full SHA 55290afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e7c3f2 - Browse repository at this point
Copy the full SHA 7e7c3f2View commit details -
- List will be auto-updated from https://publicsuffix.org/list/public_suffix_list.dat - Updated AbstractSearcher rules to be case insensitive - Updated PR creator bots - Docs and tests
Configuration menu - View commit details
-
Copy full SHA for e2b6138 - Browse repository at this point
Copy the full SHA e2b6138View commit details -
- For this particular updater, a list of exceptions to the rules downloaded by geonames is included in POSTAL_CODES_EXTRA, for cases in which we seem to do better than geonames itself based on previous user reports. - Added an option to also validate formatting of the postal codes. - Combined multiple PR bots into a single one.
Configuration menu - View commit details
-
Copy full SHA for ce9608d - Browse repository at this point
Copy the full SHA ce9608dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 154cccf - Browse repository at this point
Copy the full SHA 154cccfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c28d2c - Browse repository at this point
Copy the full SHA 7c28d2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fe4b96 - Browse repository at this point
Copy the full SHA 5fe4b96View commit details -
Configuration menu - View commit details
-
Copy full SHA for bae314d - Browse repository at this point
Copy the full SHA bae314dView commit details
Commits on Feb 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 636906f - Browse repository at this point
Copy the full SHA 636906fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f545c1 - Browse repository at this point
Copy the full SHA 8f545c1View commit details
Commits on Mar 9, 2023
-
Update Regional Information (Respect#1410)
Co-authored-by: The Respect Panda <therespectpanda@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2080e0d - Browse repository at this point
Copy the full SHA 2080e0dView commit details
Commits on Mar 10, 2023
-
Update list of rules in the chained validator (Respect#1411)
The "bic" rule has been removed, and two more rules were added. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 508566e - Browse repository at this point
Copy the full SHA 508566eView commit details
Commits on Mar 11, 2023
-
Increase test coverage for some rules (Respect#1412)
- Add test for null value in the Cnpj rule. - Add UploadedFileInterface object test for Size rule. - Add test for invalid values in Sorted rule.
Configuration menu - View commit details
-
Copy full SHA for afa4cc4 - Browse repository at this point
Copy the full SHA afa4cc4View commit details
Commits on Mar 19, 2023
-
Update Regional Information (Respect#1414)
Co-authored-by: The Respect Panda <therespectpanda@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for dd053f2 - Browse repository at this point
Copy the full SHA dd053f2View commit details
Commits on Mar 22, 2023
-
Fix the typo on the "Exists" rule's exception
When I created that rule, I barely spoke English. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 830ad97 - Browse repository at this point
Copy the full SHA 830ad97View commit details
Commits on Apr 1, 2023
-
Standardize exception messages
Most exception messages in Validation use "must" and "must not" in their templates, but a few rules don't. I fixed most of them, but AlwaysValid and AlwaysInvalid remain because I wonder if they will be better if I update them. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 003830b - Browse repository at this point
Copy the full SHA 003830bView commit details -
Improve readability of integration tests
The integration tests use the same pattern to test exception messages. With my changes, we won't validate which exception we throw in those tests, but matching the message is enough. I created three functions to replace most of those tests. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 8a7bc1a - Browse repository at this point
Copy the full SHA 8a7bc1aView commit details
Commits on Apr 3, 2023
-
Allow creating paths from fixture files
We had a method that returned the full path of the fixture directory, and we frequently would concatenate that path with a file we needed. I changed it to include the file's path inside the fixture directory. That way, we avoid repeating the same patter over and over. I made the method static because we use it in data providers, which need to be static. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for e8fcdb6 - Browse repository at this point
Copy the full SHA e8fcdb6View commit details -
Create stubs for PSR-7 interfaces
When we write tests requiring those interfaces, we create mocks. Those new stubs will make those tests easier to read and allow us to reduce the number of mocks we write with PHPUnit, making the code in the tests a bit less complex. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 07c4095 - Browse repository at this point
Copy the full SHA 07c4095View commit details -
Create class to help testing the Attribute rule
With that, the tests will be more straightforward, and we won't need to use the test class in the data providers. That will help us later because, on PHPUnit 10, all data providers need to be static. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ee8dd98 - Browse repository at this point
Copy the full SHA ee8dd98View commit details -
Create a class to help test the Callable rule
With that, the tests will be more straightforward, and we won't need to use the test class in the data providers. That will help us later because, on PHPUnit 10, all data providers need to be static. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 445af45 - Browse repository at this point
Copy the full SHA 445af45View commit details -
Do not use the test class to test the Callback rule
That will help us later because, on PHPUnit 10, all data providers need to be static. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 049b0b2 - Browse repository at this point
Copy the full SHA 049b0b2View commit details -
Do not use mocks to simulate a rule
We can use the AlwaysValid and AlwaysInvalid rules in the tests instead of mocking them. Those changes will help us later because we mainly use the `createValidatableMock()` in the data providers and, as from PHPUnit 10, all data providers need to be static. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for ebcf247 - Browse repository at this point
Copy the full SHA ebcf247View commit details -
From PHPUnit 10, all data providers need to be static. This commit will make migrating from version 9 to 10 a bit easier. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2ee7509 - Browse repository at this point
Copy the full SHA 2ee7509View commit details -
Use a concrete class to test AbstractEnvelop
It's essential to test our abstract classes because users might use them. However, creating mocks when writing those tests make the code too complicated. Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 2a74396 - Browse repository at this point
Copy the full SHA 2a74396View commit details
Commits on Jun 14, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 703f610 - Browse repository at this point
Copy the full SHA 703f610View commit details
Commits on Sep 9, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 4aab1b6 - Browse repository at this point
Copy the full SHA 4aab1b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6de3b42 - Browse repository at this point
Copy the full SHA 6de3b42View commit details -
# Conflicts: # library/Exceptions/ExistsException.php # library/Exceptions/FalseValException.php # library/Exceptions/KeyException.php # library/Exceptions/KeySetException.php # library/Exceptions/NoException.php # library/Exceptions/PhoneException.php # library/Exceptions/SfException.php # library/Exceptions/TrueValException.php # library/Exceptions/YesException.php # library/Rules/AbstractRule.php # library/Validator.php
Configuration menu - View commit details
-
Copy full SHA for ae51b23 - Browse repository at this point
Copy the full SHA ae51b23View commit details