Skip to content

Versão com diversas atualizações, ver CHANGELOG.md #125

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

Merged
merged 7 commits into from
Feb 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .coveralls.yml

This file was deleted.

12 changes: 10 additions & 2 deletions .github/workflows/proposing-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Setup PHP with Xdebug
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.1'
coverage: xdebug

- name: Validate composer.json and composer.lock
Expand All @@ -28,9 +28,17 @@ jobs:
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 --no-suggest
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
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/vendor
composer.phar
composer.lock
.DS_Store
.idea/
/tests/log/
/build
*.cache
docker-compose.yml
.phpcs-cache
.phpunit.result.cache
phpunit.xml
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

21 changes: 21 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
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 continua sendo [versionamento semântico](https://semver.org/lang/pt-BR/).

## [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
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Validator Docs - Brasil
_Biblioteca PHP para validação de documentos do Brasil usando **Laravel**_

[![Build Status](https://app.travis-ci.com/geekcom/validator-docs.svg?branch=master)](https://app.travis-ci.com/geekcom/validator-docs)
![Build Status](https://github.com/geekcom/validator-docs/actions/workflows/proposing-changes.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/geekcom/validator-docs/badge.svg?branch=master)](https://coveralls.io/github/geekcom/validator-docs?branch=master)
[![PHPStan](https://img.shields.io/badge/PHPStan-enabled-brightgreen.svg?style=flat)](https://github.com/phpstan/phpstan)
[![Total Downloads](https://poser.pugx.org/geekcom/validator-docs/downloads)](https://packagist.org/packages/geekcom/validator-docs)
Expand Down Expand Up @@ -87,7 +87,7 @@ $this->validate($request, [

```php
$this->validate($request, [
'inscricao_estadual:UF' => 'required|inscricao_estadual:UF',
'inscricao_estadual' => 'required|inscricao_estadual:UF',
]);
```

Expand Down Expand Up @@ -209,7 +209,7 @@ public function store(Request $request)
'renavam' => 'required|renavam',
'placa' => 'required|placa',
'certidao' => 'required|certidao',
'inscricao_estadual:UF' => 'required|inscricao_estadual:UF',
'inscricao_estadual' => 'required|inscricao_estadual:SP',
]);

dd($data);
Expand All @@ -226,7 +226,7 @@ public function store(Request $request)
* **CPF** - https://geradornv.com.br/gerador-cpf/
* **NIS** - https://www.4devs.com.br/gerador_de_pis_pasep
* **CNS** - https://geradornv.com.br/gerador-cns/
* **CERTIDÃO** - https://www.treinaweb.com.br/ferramentas-para-desenvolvedores/gerador/certidao
* **CERTIDÕES** - https://www.4devs.com.br/gerador_numero_certidoes
* **INSCRIÇÃO ESTADUAL** - https://www.4devs.com.br/gerador_de_inscricao_estadual
* **RENAVAM** - https://www.4devs.com.br/gerador_de_renavam
* **PLACA** - https://www.4devs.com.br/gerador_de_placa_automoveis
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
}
],
"require": {
"php": ">=7.2",
"php": "^7.3|^8.0",
"thiagocfn/inscricaoestadual": "^1.1"
},
"require-dev": {
"phpunit/phpunit": "^8.4|^9.4",
"orchestra/testbench": "^4.0",
"php-coveralls/php-coveralls": "^2.2",
"orchestra/testbench": "^6.0",
"php-coveralls/php-coveralls": "^2.5",
"squizlabs/php_codesniffer": "*",
"phpstan/phpstan": "^0.12.5"
"phpstan/phpstan": "^1.4"
},
"autoload": {
"psr-4": {
Expand All @@ -38,14 +38,14 @@
},
"scripts": {
"phpcs": "phpcs --standard=PSR12 -n src",
"phpcbf" : "phpcbf --standard=PSR12 -n src",
"unit": "phpunit --coverage-clover ./tests/log/clover.xml --colors=always",
"unit-html": "php -d phar.readonly=0 vendor/bin/phpunit --coverage-html ./tests/log/ --colors=always",
"phpstan": "phpstan analyse src --level 0",
"phpcbf": "phpcbf --standard=PSR12 -n src",
"unit": "phpunit",
"testdox": "phpunit --testdox",
"test": [
"@phpcs",
"@unit",
"@phpstan"
"@phpstan",
"@unit"
]
}
}
Loading