Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: geekcom/validator-docs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.3.2
Choose a base ref
...
head repository: geekcom/validator-docs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jan 13, 2020

  1. Merge pull request #55 from geekcom/master

    Igualando develop e master
    geekcom authored Jan 13, 2020
    Copy the full SHA
    c8e2ef2 View commit details
  2. update CHANGELOG.md

    geekcom committed Jan 13, 2020
    Copy the full SHA
    0396c27 View commit details
  3. update CHANGELOG.md

    geekcom committed Jan 13, 2020
    Copy the full SHA
    d50476f View commit details
  4. Merge pull request #56 from geekcom/develop

    Develop
    geekcom authored Jan 13, 2020
    Copy the full SHA
    581364f View commit details

Commits on Jan 16, 2020

  1. Copy the full SHA
    8e8e1d3 View commit details
  2. Copy the full SHA
    09a651e View commit details
  3. Merge pull request #57 from geekcom/develop

    Develop
    geekcom authored Jan 16, 2020
    Copy the full SHA
    f24806e View commit details
  4. suporte a travisCI

    geekcom committed Jan 16, 2020
    Copy the full SHA
    2854506 View commit details
  5. Merge pull request #58 from geekcom/develop

    suporte a travisCI
    geekcom authored Jan 16, 2020
    Copy the full SHA
    b60258c View commit details
  6. suporte a coverage

    geekcom committed Jan 16, 2020
    Copy the full SHA
    b8715f7 View commit details
  7. Merge pull request #59 from geekcom/develop

    suporte a coverage
    geekcom authored Jan 16, 2020
    Copy the full SHA
    2860dd7 View commit details
  8. atualizados, CI

    geekcom committed Jan 16, 2020
    Copy the full SHA
    d781af0 View commit details
  9. novas badges

    geekcom committed Jan 16, 2020
    Copy the full SHA
    e52c6e2 View commit details
  10. Merge pull request #60 from geekcom/develop

    atualizados, CI
    geekcom authored Jan 16, 2020
    Copy the full SHA
    d5acd0b View commit details
  11. update CHANGELOG.md

    geekcom committed Jan 16, 2020
    Copy the full SHA
    f934363 View commit details
  12. Merge pull request #61 from geekcom/develop

    update CHANGELOG.md
    geekcom authored Jan 16, 2020
    Copy the full SHA
    74c7867 View commit details
  13. melhorias para cobrir PSR-12

    geekcom committed Jan 16, 2020
    Copy the full SHA
    9477030 View commit details
  14. Merge pull request #62 from geekcom/develop

    melhorias para cobrir PSR-12
    geekcom authored Jan 16, 2020
    Copy the full SHA
    ca3562d View commit details
  15. Copy the full SHA
    6dcd479 View commit details
  16. Merge pull request #63 from geekcom/develop

    remover suporte ao scrutinizerCI
    geekcom authored Jan 16, 2020
    Copy the full SHA
    8e3418c View commit details

Commits on Jan 17, 2020

  1. atualizado e-mail do autor

    geekcom committed Jan 17, 2020
    Copy the full SHA
    0bb730e View commit details
  2. Merge pull request #64 from geekcom/develop

    atualizado e-mail do autor
    geekcom authored Jan 17, 2020
    Copy the full SHA
    2fbf850 View commit details

Commits on Jan 22, 2020

  1. Copy the full SHA
    d653f3b View commit details
  2. Merge pull request #65 from geekcom/develop

    Atualizacao de nomes de testes
    geekcom authored Jan 22, 2020
    Copy the full SHA
    aa3a165 View commit details

Commits on Apr 17, 2020

  1. Update README.md

    geekcom authored Apr 17, 2020
    Copy the full SHA
    595976b View commit details
  2. Merge pull request #67 from geekcom/geekcom-patch-1

    Update README.md
    geekcom authored Apr 17, 2020
    Copy the full SHA
    0a99f0e View commit details

Commits on May 9, 2020

  1. Copy the full SHA
    e339383 View commit details
  2. Copy the full SHA
    8c2f101 View commit details
  3. Merge pull request #69 from geekcom/all-contributors/add-geekcom

    docs: add geekcom as a contributor
    geekcom authored May 9, 2020
    Copy the full SHA
    de26744 View commit details
  4. Update README.md

    geekcom authored May 9, 2020
    Copy the full SHA
    448fd9c View commit details
  5. Copy the full SHA
    74fdb28 View commit details
  6. Copy the full SHA
    baa02bf View commit details
  7. Merge pull request #70 from geekcom/all-contributors/add-andrergcosta

    docs: add andrergcosta as a contributor
    geekcom authored May 9, 2020
    Copy the full SHA
    4be0361 View commit details
  8. Copy the full SHA
    bc4d0d4 View commit details
  9. Copy the full SHA
    ab5a991 View commit details
  10. Merge pull request #71 from geekcom/all-contributors/add-lordantonelli

    docs: add lordantonelli as a contributor
    geekcom authored May 9, 2020
    Copy the full SHA
    8017492 View commit details
  11. Copy the full SHA
    901f0be View commit details
  12. Copy the full SHA
    aa79f1a View commit details
  13. Merge pull request #72 from geekcom/all-contributors/add-MrEko

    docs: add MrEko as a contributor
    geekcom authored May 9, 2020
    Copy the full SHA
    126b0a6 View commit details
  14. Copy the full SHA
    56e3a62 View commit details
  15. Copy the full SHA
    6095f09 View commit details
  16. Merge pull request #73 from geekcom/all-contributors/add-victorhsanjos

    docs: add victorhsanjos as a contributor
    geekcom authored May 9, 2020
    Copy the full SHA
    9bac0fb View commit details
  17. Copy the full SHA
    54ad024 View commit details
  18. Copy the full SHA
    95899a7 View commit details
  19. Merge pull request #74 from geekcom/all-contributors/add-yvescabral

    docs: add yvescabral as a contributor
    geekcom authored May 9, 2020
    Copy the full SHA
    79865a3 View commit details
  20. Copy the full SHA
    db926a1 View commit details
  21. Copy the full SHA
    2683bd2 View commit details
  22. Merge pull request #75 from geekcom/all-contributors/add-setefocos

    docs: add setefocos as a contributor
    geekcom authored May 9, 2020
    Copy the full SHA
    fe9f523 View commit details
  23. Merge pull request #76 from geekcom/master

    Snc master com develop
    geekcom authored May 9, 2020
    Copy the full SHA
    b6ffb57 View commit details
  24. Merge pull request #77 from geekcom/develop

    Merge pull request #76 from geekcom/master
    geekcom authored May 9, 2020
    Copy the full SHA
    a02c814 View commit details
Showing with 9,444 additions and 219 deletions.
  1. +12 −0 .github/FUNDING.yml
  2. +44 −0 .github/workflows/proposing-changes.yml
  3. +6 −1 .gitignore
  4. +190 −1 CHANGELOG.md
  5. +105 −32 README.md
  6. +0 −2 changelog-linker.yml
  7. +21 −6 composer.json
  8. +8,257 −0 composer.lock
  9. +13 −3 phpcs.xml
  10. +0 −16 phpunit.xml
  11. +20 −0 phpunit.xml.dist
  12. +0 −9 scrutinizer.yml
  13. +8 −0 src/validator-docs/Contracts/ValidatorFormats.php
  14. +16 −0 src/validator-docs/Formats/Certidao.php
  15. +13 −0 src/validator-docs/Formats/Cnpj.php
  16. +13 −0 src/validator-docs/Formats/Cpf.php
  17. +16 −0 src/validator-docs/Formats/CpfCnpj.php
  18. +13 −0 src/validator-docs/Formats/Nis.php
  19. +3 −4 src/validator-docs/Rules/Certidao.php
  20. +3 −3 src/validator-docs/Rules/Cnh.php
  21. +9 −3 src/validator-docs/Rules/Cnpj.php
  22. +1 −1 src/validator-docs/Rules/Cns.php
  23. +9 −3 src/validator-docs/Rules/Cpf.php
  24. +35 −0 src/validator-docs/Rules/Ddd.php
  25. +33 −0 src/validator-docs/Rules/InscricaoEstadual.php
  26. +1 −1 src/validator-docs/Rules/Nis.php
  27. +13 −0 src/validator-docs/Rules/Passaporte.php
  28. +21 −0 src/validator-docs/Rules/Placa.php
  29. +117 −0 src/validator-docs/Rules/Renavam.php
  30. +2 −2 src/validator-docs/Rules/Sanitization.php
  31. +5 −3 src/validator-docs/Rules/TituloEleitoral.php
  32. +64 −38 src/validator-docs/Validator.php
  33. +28 −0 src/validator-docs/ValidatorFormats.php
  34. +15 −5 src/validator-docs/ValidatorProvider.php
  35. +41 −0 tests/Rules/RenavamTest.php
  36. +22 −0 tests/SanitizationTestCase.php
  37. +177 −84 tests/TestValidator.php
  38. +95 −0 tests/ValidatorFormatsTest.php
  39. +3 −2 tests/ValidatorTestCase.php
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: ['https://nubank.com.br/pagar/518o5/zVBzxd00Sb'] # Replace with up to 4 custom sponsorship URLs e.g.
44 changes: 44 additions & 0 deletions .github/workflows/proposing-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: "Proposing Changes"

on:
pull_request:
branches: [ master, develop ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
coverage: xdebug

- name: Validate composer.json and composer.lock
run: composer validate

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress

- name: Run Tests And Lint
run: composer test

- name: Upload coverage results to Coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php-coveralls --coverage_clover=build/logs/clover.xml -v
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
/vendor
composer.phar
composer.lock
.DS_Store
.idea/
/build
*.cache
docker-compose.yml
.phpcs-cache
.phpunit.result.cache
phpunit.xml
191 changes: 190 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,163 @@
# Changelog

A partir da versão 3.5.1 nosso modelo de logs é baseado em [mantenha um changelog](https://keepachangelog.com/pt-BR/1.0.0/) e o
nosso versionamento é [semântico](https://semver.org/lang/pt-BR/).

## [3.11.0](https://github.com/geekcom/validator-docs/compare/3.9.0...3.10.0)

## Novidades - Validação de passaporte brasileiro

- Adicionado:
- Agora é possivel validar passaporte brasileiro, consulte a doc para maiores detalhes.
- Atualizado:
- A documentação foi atualizada.

## [3.9.0](https://github.com/geekcom/validator-docs/compare/3.8.0...3.9.0)

## Novidades - Testado com Laravel 10

- Corrigido:
- A mensagem de retorno em caso de erro de validação de DDD.
- Atualizado:
- A documentação foi atualizada.

## [3.8.0](https://github.com/geekcom/validator-docs/compare/3.7.1...3.8.0)

## Novidades

- Melhorias:
- Os testes de validação de formatos foram melhorados;
- Diversas pequenas melhorias foram adicionadas;
- A doc foi melhorada.

## [3.7.1](https://github.com/geekcom/validator-docs/compare/3.7.0...3.7.1)

## Novidades

- Corrigido:
- Um dos valores usados nos testes de validação de RENAVAM;

## [3.7.0](https://github.com/geekcom/validator-docs/compare/3.6.0...3.7.0)

## Novidades

- Atualizado:
- As regras de validação de RENAVAM foram reescritas;
- Os testes de validação de RENAVAM foram atualizados.

## [3.6.0](https://github.com/geekcom/validator-docs/compare/3.5.3...3.6.0)

## Novidades

- Corrigido:
- A documentação referente a validação de inscrição estadual;
- O arquivo `composer.lock` foi removido do `.gitignore`;
- A opção depreciada do composer `--no-suggest`, foi removida do workflow Github actions.
- Atualizado:
- A versão mínima do PHP, e algumas dependências do projeto;
- As classes de validação de formatos de documentos NIS e CNPJ;
- O arquivo `phpunit.xml` foi adicionado ao `.gitignore`;
- Suporte a badge de build do Github actions;
- Suporte a badge de Coverage Status do coveralls.io.
- Removido:
- O arquivo `phpunit.xml`;
- O suporte a travisCI.
- Adicionado:
- O arquivo `phpunit.xml.dist`;
- A possibilidade de rodar testes de unidade via comando `composer testdox`;

## [3.5.4](https://github.com/geekcom/validator-docs/compare/3.5.3...3.5.4)

## Commits

- Consertado: link para o travis-ci no README.md [`e4c9dcd`](https://github.com/geekcom/validator-docs/commit/e4c9dcd124795ce9dd6a36d1114db9c2d7b999db)

## [3.5.3](https://github.com/geekcom/validator-docs/compare/3.5.2...3.5.3)

## Commits

- Modificado: link para geração de documento [`94064a9`](https://github.com/geekcom/validator-docs/commit/94064a98379dca1e781bd358e4c10d7a1cff0020)
- Consertado: retirado informação duplicada para Inscrição Estadual do README [`94064a9`](https://github.com/geekcom/validator-docs/commit/94064a98379dca1e781bd358e4c10d7a1cff0020)
- Consertado: valida formato do documento apenas se valor é informado. [`424fc22c`](https://github.com/geekcom/validator-docs/commit/424fc22c9865a77e6c27a9a26e4ed8dd9baf20eb)

## [3.5.2](https://github.com/geekcom/validator-docs/compare/3.5.1...3.5.2)

## Commits

- Adicionado: verificação de DDD. [`52bb67a`](https://github.com/geekcom/validator-docs/commit/52bb67a51bf6c36f5aef00fb9429203bfe4d4ad3)
- Adicionado: mensagem para a verificação de DDD. [`52bb67a`](https://github.com/geekcom/validator-docs/commit/52bb67a51bf6c36f5aef00fb9429203bfe4d4ad3)
- Modificado: teste no PHP 8, dependências foram atualizadas. [`a0005e1`](https://github.com/geekcom/validator-docs/commit/a0005e168eb2eca0da06d36ae92b8976c4195766)
- Modificado: fix Sanitization class to deal with null values. [`d57c8e9`](https://github.com/geekcom/validator-docs/commit/d57c8e9076769d2e978d5bd3a8fbd470980b5bbb)
- Modificado/Adicionado: melhora coverage para Renavam. [`574114d`](https://github.com/geekcom/validator-docs/commit/574114d29ef5d98784972aafe7213fcf6bac4d8e)
- Consertado: resolve erro com sanitize. [`a6d33e5`](https://github.com/geekcom/validator-docs/commit/a6d33e54a66090ffb485e7385e9c1fc40ca4e9da)

## [3.5.1](https://github.com/geekcom/validator-docs/compare/3.5.0...3.5.1)

## Commits

- Modificado: Atualizar versão da lib na doc. [`e61829b`](https://github.com/geekcom/validator-docs/commit/e61829be54353c0335db425962d7c2e9075d727f)
- Corrigido: validação de Placa não precisa de sanitization. [`d5a0e7b`](https://github.com/geekcom/validator-docs/commit/d5a0e7be832003332395b5e3eac2a58f879ca060)

---
<!-- changelog-linker -->

<!-- dumped content start -->

## [3.5.0]

- [#100] fix tests, melhorias gerais, Thanks to [@geekcom]
- [#102] Sync master with develop, Thanks to [@geekcom]
- [#77] Merge pull request [#76] from geekcom/master, Thanks to [@geekcom]
- [#62] melhorias para cobrir PSR-12, Thanks to [@geekcom]
- [#63] remover suporte ao scrutinizerCI, Thanks to [@geekcom]
- [#64] atualizado e-mail do autor, Thanks to [@geekcom]
- [#65] Atualizacao de nomes de testes, Thanks to [@geekcom]
- [#67] Update README.md, Thanks to [@geekcom]
- [#76] Sync master com develop, Thanks to [@geekcom]
- [#79] Merge pull request [#78] from geekcom/master, Thanks to [@geekcom]
- [#78] Sync master com develop, Thanks to [@geekcom]
- [#101] Sync, Thanks to [@geekcom]
- [#80] Merge pull request [#79] from geekcom/develop, Thanks to [@geekcom]
- [#81] Merge pull request [#80] from geekcom/master, Thanks to [@geekcom]
- [#82] Update README.md, Thanks to [@geekcom]
- [#83] Merge pull request [#82] from geekcom/master, Thanks to [@geekcom]
- [#85] Sync, Thanks to [@geekcom]
- [#86] Merge pull request [#85] from geekcom/master, Thanks to [@geekcom]
- [#90] Adicionando validação de Renavam, Thanks to [@rafaelneris]
- [#93] Valida Inscrição Estadual para cada Unidade Federativa, Thanks to [@thicolares]
- [#95] Validação Placa, Thanks to [@omarkdev]
- [#96] Corrige estilo de código na classe do Renavam, Thanks to [@omarkdev]
- [#97] Cria workflow no github para rodar testes ao propor novo pull request, Thanks to [@omarkdev]
- [#98] Sync master into develop, Thanks to [@geekcom]
- [#99] Merge pull request [#98] from geekcom/master, Thanks to [@geekcom]
- [#61] update CHANGELOG.md, Thanks to [@geekcom]

<!-- dumped content end -->

<!-- dumped content start -->

## [3.4.0]

- [#60] atualizados, CI, Thanks to [@geekcom]
- [#59] suporte a coverage, Thanks to [@geekcom]
- [#58] suporte a travisCI, Thanks to [@geekcom]
- [#57] Develop, Thanks to [@geekcom]
- [#56] Develop, Thanks to [@geekcom]

<!-- dumped content end -->

<!-- dumped content start -->

## [3.3.2]

- [#55] Igualando develop e master, Thanks to [@geekcom]
- [#54] Arrumando cnh, Thanks to [@MrEko]
- [#51] update CHANGELOG.md, Thanks to [@geekcom]

<!-- dumped content end -->

<!-- dumped content start -->

## [3.3.1]

- [#50] minor correction, update doc, Thanks to [@geekcom]
@@ -98,4 +254,37 @@
[@andrergcosta]: https://github.com/andrergcosta
[@MrEko]: https://github.com/MrEko
[#49]: https://github.com/geekcom/validator-docs/pull/49
[#50]: https://github.com/geekcom/validator-docs/pull/50
[#50]: https://github.com/geekcom/validator-docs/pull/50
[#55]: https://github.com/geekcom/validator-docs/pull/55
[#54]: https://github.com/geekcom/validator-docs/pull/54
[#51]: https://github.com/geekcom/validator-docs/pull/51
[#102]: https://github.com/geekcom/validator-docs/pull/102
[#101]: https://github.com/geekcom/validator-docs/pull/101
[#100]: https://github.com/geekcom/validator-docs/pull/100
[#99]: https://github.com/geekcom/validator-docs/pull/99
[#98]: https://github.com/geekcom/validator-docs/pull/98
[#97]: https://github.com/geekcom/validator-docs/pull/97
[#96]: https://github.com/geekcom/validator-docs/pull/96
[#95]: https://github.com/geekcom/validator-docs/pull/95
[#93]: https://github.com/geekcom/validator-docs/pull/93
[#90]: https://github.com/geekcom/validator-docs/pull/90
[#86]: https://github.com/geekcom/validator-docs/pull/86
[#85]: https://github.com/geekcom/validator-docs/pull/85
[#83]: https://github.com/geekcom/validator-docs/pull/83
[#82]: https://github.com/geekcom/validator-docs/pull/82
[#81]: https://github.com/geekcom/validator-docs/pull/81
[#80]: https://github.com/geekcom/validator-docs/pull/80
[#79]: https://github.com/geekcom/validator-docs/pull/79
[#78]: https://github.com/geekcom/validator-docs/pull/78
[#77]: https://github.com/geekcom/validator-docs/pull/77
[#76]: https://github.com/geekcom/validator-docs/pull/76
[#75]: https://github.com/geekcom/validator-docs/pull/75
[#67]: https://github.com/geekcom/validator-docs/pull/67
[#65]: https://github.com/geekcom/validator-docs/pull/65
[#64]: https://github.com/geekcom/validator-docs/pull/64
[#63]: https://github.com/geekcom/validator-docs/pull/63
[#62]: https://github.com/geekcom/validator-docs/pull/62
[#61]: https://github.com/geekcom/validator-docs/pull/61
[@thicolares]: https://github.com/thicolares
[@rafaelneris]: https://github.com/rafaelneris
[@omarkdev]: https://github.com/omarkdev
Loading