Skip to content

Commit

Permalink
stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasgiovanny committed Mar 24, 2023
1 parent a82fdd4 commit 596edee
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 29 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to `laravel-serpro-datavalid` will be documented in this file

## 1.0.0 - 2023-03-24

- Stable version
- Require PHP 8.0
- Support Laravel 9 and 10
- Drop support for Laravel 7 and 8

## 0.3.4 - 2021-01-26

- Update to support Laravel 7 and 8
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ SERPRO_DATAVALID_SANDBOX=false
2. To use this package, you just need to import the Person Facades.

```php
use lucasgiovanny\SerproDataValid\Person;
use LucasGiovanny\SerproDataValid\Person;
```

### Available methods
Expand All @@ -62,7 +62,7 @@ use lucasgiovanny\SerproDataValid\Person;
Example:

```php
use lucasgiovanny\SerproDataValid\Person;
use LucasGiovanny\SerproDataValid\Person;

$data = [
'nome' => "João da Silva",
Expand All @@ -86,7 +86,7 @@ $validation = Person::rawValidation("00000000000", $data);
Example:

```php
use lucasgiovanny\SerproDataValid\Person;
use LucasGiovanny\SerproDataValid\Person;

$validation = Person::validateName("00000000000", "João da Silva");
//return true or false;
Expand All @@ -106,7 +106,7 @@ $validation = Person::validateName("00000000000", "João da Silva", true);
Example:

```php
use lucasgiovanny\SerproDataValid\Person;
use LucasGiovanny\SerproDataValid\Person;

$validation = Person::validateGender("00000000000", "F"); // gender needs to be "F" or "M"
//return true or false;
Expand All @@ -121,7 +121,7 @@ $validation = Person::validateGender("00000000000", "F"); // gender needs to be
Example:

```php
use lucasgiovanny\SerproDataValid\Person;
use LucasGiovanny\SerproDataValid\Person;

$validation = Person::isBrazilian("00000000000");
//return true or false;
Expand All @@ -138,7 +138,7 @@ $validation = Person::isBrazilian("00000000000");
Example:

```php
use lucasgiovanny\SerproDataValid\Person;
use LucasGiovanny\SerproDataValid\Person;

$parents = [
'mother_name' => 'Eurica Magalhães Souza';
Expand All @@ -163,7 +163,7 @@ $validation = Person::validateParentsName("00000000000", $parents, true);
Example:

```php
use lucasgiovanny\SerproDataValid\Person;
use LucasGiovanny\SerproDataValid\Person;

$validation = Person::isCPFRegular("00000000000");
//return true or false;
Expand All @@ -179,7 +179,7 @@ $validation = Person::isCPFRegular("00000000000");
Example:

```php
use lucasgiovanny\SerproDataValid\Person;
use LucasGiovanny\SerproDataValid\Person;

$validation = Person::validatePhoto("00000000000", base64_encode($photo));
//return true or false;
Expand Down
15 changes: 7 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,21 @@
}
],
"require": {
"php": ">=7.2",
"guzzlehttp/guzzle": "~6.0",
"illuminate/support": "^6.0|^7.0|^8.0"
"php": "^8.0",
"guzzlehttp/guzzle": "^7.5",
"illuminate/support": "^9.0|^10.0"
},
"require-dev": {
"orchestra/testbench": "^4.0",
"mockery/mockery": "^1.3"
"orchestra/testbench": "^7.0",
},
"autoload": {
"psr-4": {
"lucasgiovanny\\SerproDataValid\\": "src"
"LucasGiovanny\\SerproDataValid\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"lucasgiovanny\\SerproDataValid\\Tests\\": "tests"
"LucasGiovanny\\SerproDataValid\\Tests\\": "tests"
}
},
"scripts": {
Expand All @@ -35,7 +34,7 @@
"extra": {
"laravel": {
"providers": [
"lucasgiovanny\\SerproDataValid\\SerproDataValidServiceProvider"
"LucasGiovanny\\SerproDataValid\\SerproDataValidServiceProvider"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/CouldNotSendRequest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace lucasgiovanny\SerproDataValid\Exceptions;
namespace LucasGiovanny\SerproDataValid\Exceptions;

class CouldNotSendRequest extends \Exception
{
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidRequestorResponse.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace lucasgiovanny\SerproDataValid\Exceptions;
namespace LucasGiovanny\SerproDataValid\Exceptions;

class InvalidRequestOrResponse extends \Exception
{
Expand Down
4 changes: 2 additions & 2 deletions src/Facades/Person.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php

namespace lucasgiovanny\SerproDataValid;
namespace LucasGiovanny\SerproDataValid;

use Illuminate\Support\Facades\Facade;

class Person extends Facade
{
protected static function getFacadeAccessor()
{
return 'lucasgiovanny\SerproDataValid\Models\Person';
return 'LucasGiovanny\SerproDataValid\Models\Person';
}
}
2 changes: 1 addition & 1 deletion src/Models/BaseModel.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace lucasgiovanny\SerproDataValid\Models;
namespace LucasGiovanny\SerproDataValid\Models;

class BaseModel
{
Expand Down
6 changes: 3 additions & 3 deletions src/Models/Person.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?php

namespace lucasgiovanny\SerproDataValid\Models;
namespace LucasGiovanny\SerproDataValid\Models;

use Carbon\Carbon;
use lucasgiovanny\SerproDataValid\Exceptions\InvalidRequestOrResponse;
use lucasgiovanny\SerproDataValid\SerproDataValid;
use LucasGiovanny\SerproDataValid\Exceptions\InvalidRequestOrResponse;
use LucasGiovanny\SerproDataValid\SerproDataValid;
use stdClass;

class Person extends BaseModel
Expand Down
6 changes: 3 additions & 3 deletions src/SerproDataValid.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<?php

namespace lucasgiovanny\SerproDataValid;
namespace LucasGiovanny\SerproDataValid;

use Exception;
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\Exception\ClientException;
use lucasgiovanny\SerproDataValid\Exceptions\CouldNotSendRequest;
use lucasgiovanny\SerproDataValid\Exceptions\InvalidRequestOrResponse;
use LucasGiovanny\SerproDataValid\Exceptions\CouldNotSendRequest;
use LucasGiovanny\SerproDataValid\Exceptions\InvalidRequestOrResponse;

class SerproDataValid
{
Expand Down
2 changes: 1 addition & 1 deletion src/SerproDataValidServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace lucasgiovanny\SerproDataValid;
namespace LucasGiovanny\SerproDataValid;

use Illuminate\Support\ServiceProvider;

Expand Down
2 changes: 1 addition & 1 deletion tests/SerproDataValidTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace lucasgiovanny\SerproDataValid\Tests;
namespace LucasGiovanny\SerproDataValid\Tests;

use Orchestra\Testbench\TestCase;

Expand Down

0 comments on commit 596edee

Please sign in to comment.