Skip to content
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

Merged
merged 105 commits into from
Sep 9, 2023

Commits on Aug 23, 2020

  1. Configuration menu
    Copy the full SHA
    314aa36 View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2020

  1. Drop support for PHP 7.2

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    5150428 View commit details
    Browse the repository at this point in the history
  2. Update version of PHPUnit package

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Aug 26, 2020
    Configuration menu
    Copy the full SHA
    966c510 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2020

  1. Update version of "respect/coding-standard"

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    72dd881 View commit details
    Browse the repository at this point in the history
  2. 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>
    henriquemoody committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    80ff37c View commit details
    Browse the repository at this point in the history
  3. Remove PHP 8.0 from the build matrix

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Aug 27, 2020
    Configuration menu
    Copy the full SHA
    a65980c View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2020

  1. Add support for PHP 8.0

    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>
    henriquemoody committed Aug 28, 2020
    Configuration menu
    Copy the full SHA
    f53b77a View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2020

  1. Configuration menu
    Copy the full SHA
    2fad28b View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2020

  1. 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>
    henriquemoody committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    e0c6f33 View commit details
    Browse the repository at this point in the history
  2. 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>
    henriquemoody committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    ed304f3 View commit details
    Browse the repository at this point in the history
  3. 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>
    henriquemoody and caseyamcl committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    8b2819e View commit details
    Browse the repository at this point in the history
  4. 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>
    Olumide Samson and henriquemoody committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    029fa7f View commit details
    Browse the repository at this point in the history
  5. 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>
    v0idpwn and henriquemoody committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    ff253c7 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    444f105 View commit details
    Browse the repository at this point in the history
  7. Make "HexRgbColor" rule case-insensitive

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    1809e9f View commit details
    Browse the repository at this point in the history
  8. 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>
    henriquemoody committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    d532e94 View commit details
    Browse the repository at this point in the history
  9. Create "Decimal" rule

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Oct 4, 2020
    Configuration menu
    Copy the full SHA
    6c3aed9 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2020

  1. Add "Decimal" link to related rules

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Oct 5, 2020
    Configuration menu
    Copy the full SHA
    1eb5b9d View commit details
    Browse the repository at this point in the history
  2. Fix wrong changelog in the Decimal's documentation

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Oct 5, 2020
    Configuration menu
    Copy the full SHA
    5ba7646 View commit details
    Browse the repository at this point in the history

Commits on Feb 6, 2021

  1. Fix PHPStan issues

    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>
    henriquemoody committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    44a60f6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a0b538 View commit details
    Browse the repository at this point in the history
  3. 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>
    henriquemoody committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    f1be730 View commit details
    Browse the repository at this point in the history
  4. 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>
    henriquemoody committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    9c9c76e View commit details
    Browse the repository at this point in the history
  5. 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>
    henriquemoody committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    f9b9dd2 View commit details
    Browse the repository at this point in the history
  6. 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>
    henriquemoody committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    5450ef8 View commit details
    Browse the repository at this point in the history
  7. 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>
    henriquemoody committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    2060207 View commit details
    Browse the repository at this point in the history
  8. 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>
    henriquemoody committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    3dcd859 View commit details
    Browse the repository at this point in the history
  9. 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>
    henriquemoody committed Feb 6, 2021
    Configuration menu
    Copy the full SHA
    51ad23e View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2021

  1. Configuration menu
    Copy the full SHA
    143420e View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2021

  1. Remove ignored error from PHPStan

    Signed-off-by: Henrique Moody <henriquemoody@gmail.com>
    henriquemoody committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    be7e667 View commit details
    Browse the repository at this point in the history
  2. Revert "Use "sokil/php-isocodes" on CountryCode"

    This reverts commit 2060207.
    henriquemoody committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    edbbe7f View commit details
    Browse the repository at this point in the history
  3. Revert "Use "sokil/php-isocodes" on LanguageCode"

    This reverts commit 5450ef8.
    henriquemoody committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    b78f602 View commit details
    Browse the repository at this point in the history
  4. Revert "Use "sokil/php-isocodes" on CurrencyCode"

    This reverts commit f9b9dd2.
    henriquemoody committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    745a571 View commit details
    Browse the repository at this point in the history
  5. Revert "Use "sokil/php-isocodes" on SubdivisionCode"

    This reverts commit 9c9c76e.
    henriquemoody committed Mar 19, 2021
    Configuration menu
    Copy the full SHA
    4c21a7f View commit details
    Browse the repository at this point in the history

Commits on May 5, 2021

  1. Configuration menu
    Copy the full SHA
    6602941 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2021

  1. Configuration menu
    Copy the full SHA
    b8ee424 View commit details
    Browse the repository at this point in the history

Commits on Jan 19, 2022

  1. Configuration menu
    Copy the full SHA
    4847fe4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    60566e2 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bf4082d View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2022

  1. Configuration menu
    Copy the full SHA
    e219da2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5e264f9 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Configuration menu
    Copy the full SHA
    c7a6f2e View commit details
    Browse the repository at this point in the history

Commits on Oct 22, 2022

  1. Configuration menu
    Copy the full SHA
    c215761 View commit details
    Browse the repository at this point in the history
  2. PHPUnit tests for RuPay

    rakshit087 committed Oct 22, 2022
    Configuration menu
    Copy the full SHA
    0cd309d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1abf32c View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Use json_validate in Rules\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.
    Ayesh committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    746c755 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    15f148d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8e345b7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2951dfd View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e5223a0 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    13f20e7 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2c5793a View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    74d7f03 View commit details
    Browse the repository at this point in the history
  9. Updated CHANGELOG.md

    alganet committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    ecccfb8 View commit details
    Browse the repository at this point in the history
  10. Updated docs

    alganet committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    3eb085a View commit details
    Browse the repository at this point in the history
  11. Updates for IntVal changes

    alganet committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    9ae39de View commit details
    Browse the repository at this point in the history
  12. Updated docheaders

    alganet committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    1481c8e View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Configuration menu
    Copy the full SHA
    d304ace View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1e96fd1 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e2f752 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    74dee73 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8b3c607 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f080f7d View commit details
    Browse the repository at this point in the history
  7. 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>
    dependabot[bot] committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    a96614b View commit details
    Browse the repository at this point in the history
  8. 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>
    dependabot[bot] committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    7776652 View commit details
    Browse the repository at this point in the history
  9. 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>
    dependabot[bot] committed Feb 15, 2023
    Configuration menu
    Copy the full SHA
    c6eaf05 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2023

  1. Fix docs links

    alganet committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    a3e016b View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2023

  1. 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
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    689026f View commit details
    Browse the repository at this point in the history
  2. 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.
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    ef4778b View commit details
    Browse the repository at this point in the history
  3. Use SPDX IDs for licensing

    SPDX IDs are shorter than licensing notes previously used, and
    adhere better to FOSS standards. It is also machine-readable.
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    ab3732f View commit details
    Browse the repository at this point in the history
  4. Drop PHP 7.4 support

    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    8cafa3f View commit details
    Browse the repository at this point in the history
  5. Increase phpstan level from 7 to 8

     - Fixed all phpstan errors and ignoreds.
     - False positives now have a "Why:" comment on phpstan config.
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    727e7cc View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    493a665 View commit details
    Browse the repository at this point in the history
  7. 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
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    fc8230a View commit details
    Browse the repository at this point in the history
  8. Use libphonenumber

    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.
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    cc3bf86 View commit details
    Browse the repository at this point in the history
  9. 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.
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    6173757 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    55290af View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    7e7c3f2 View commit details
    Browse the repository at this point in the history
  12. Add PublicDomainSuffix Rule

     - 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
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    e2b6138 View commit details
    Browse the repository at this point in the history
  13. Auto update postal code list

     - 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.
    alganet committed Feb 19, 2023
    Configuration menu
    Copy the full SHA
    ce9608d View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    154cccf View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    7c28d2c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    5fe4b96 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    bae314d View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2023

  1. Configuration menu
    Copy the full SHA
    636906f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f545c1 View commit details
    Browse the repository at this point in the history

Commits on Mar 9, 2023

  1. Update Regional Information (Respect#1410)

    Co-authored-by: The Respect Panda <therespectpanda@gmail.com>
    github-actions[bot] and TheRespectPanda committed Mar 9, 2023
    Configuration menu
    Copy the full SHA
    2080e0d View commit details
    Browse the repository at this point in the history

Commits on Mar 10, 2023

  1. 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>
    henriquemoody committed Mar 10, 2023
    Configuration menu
    Copy the full SHA
    508566e View commit details
    Browse the repository at this point in the history

Commits on Mar 11, 2023

  1. 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.
    dcorrea777 committed Mar 11, 2023
    Configuration menu
    Copy the full SHA
    afa4cc4 View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2023

  1. Update Regional Information (Respect#1414)

    Co-authored-by: The Respect Panda <therespectpanda@gmail.com>
    github-actions[bot] and TheRespectPanda committed Mar 19, 2023
    Configuration menu
    Copy the full SHA
    dd053f2 View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2023

  1. 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>
    henriquemoody committed Mar 22, 2023
    Configuration menu
    Copy the full SHA
    830ad97 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2023

  1. 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>
    henriquemoody committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    003830b View commit details
    Browse the repository at this point in the history
  2. 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>
    henriquemoody committed Apr 1, 2023
    Configuration menu
    Copy the full SHA
    8a7bc1a View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2023

  1. 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>
    henriquemoody committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    e8fcdb6 View commit details
    Browse the repository at this point in the history
  2. 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>
    henriquemoody committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    07c4095 View commit details
    Browse the repository at this point in the history
  3. 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>
    henriquemoody committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    ee8dd98 View commit details
    Browse the repository at this point in the history
  4. 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>
    henriquemoody committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    445af45 View commit details
    Browse the repository at this point in the history
  5. 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>
    henriquemoody committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    049b0b2 View commit details
    Browse the repository at this point in the history
  6. 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>
    henriquemoody committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    ebcf247 View commit details
    Browse the repository at this point in the history
  7. Make data providers static

    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>
    henriquemoody committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    2ee7509 View commit details
    Browse the repository at this point in the history
  8. 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>
    henriquemoody committed Apr 3, 2023
    Configuration menu
    Copy the full SHA
    2a74396 View commit details
    Browse the repository at this point in the history

Commits on Jun 14, 2023

  1. Update Regional Information

    TheRespectPanda authored and alganet committed Jun 14, 2023
    Configuration menu
    Copy the full SHA
    703f610 View commit details
    Browse the repository at this point in the history

Commits on Sep 9, 2023

  1. Configuration menu
    Copy the full SHA
    4aab1b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6de3b42 View commit details
    Browse the repository at this point in the history
  3. Merge branch '2.3'

    # 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
    596868636 committed Sep 9, 2023
    Configuration menu
    Copy the full SHA
    ae51b23 View commit details
    Browse the repository at this point in the history