Skip to content

Commit

Permalink
Updated PHP version and dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
WendellAdriel committed Sep 1, 2023
1 parent a527346 commit 454ba23
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 17 deletions.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"illuminate/console": "^9.0|^10.0",
"illuminate/database": "^9.0|^10.0",
"illuminate/http": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0",
"illuminate/validation": "^9.0|^10.0"
},
"require-dev": {
"laravel/pint": "~1.5.0",
"orchestra/testbench": "^6.0|^7.20|^8.0",
"pestphp/pest": "v1.22.6",
"pestphp/pest-plugin-faker": "^1.0.0"
"laravel/pint": "^1.11",
"orchestra/testbench": "^7.20|^8.10",
"pestphp/pest": "v2.15",
"pestphp/pest-plugin-faker": "^2.0"
},
"scripts": {
"lint": "pint",
Expand Down
3 changes: 1 addition & 2 deletions tests/Unit/AttributeCastTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

declare(strict_types=1);

use function Pest\Faker\faker;
use WendellAdriel\ValidatedDTO\Tests\Datasets\AttributesDTO;
use WendellAdriel\ValidatedDTO\Tests\Datasets\ModelCastInstance;

it('properly casts a Model property to a DTO class', function () {
$model = new ModelCastInstance([
'name' => faker()->name,
'name' => fake()->name,
'metadata' => '{"age": 10, "doc": "foo"}',
]);

Expand Down
5 changes: 2 additions & 3 deletions tests/Unit/ResourceDTOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@

use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
use function Pest\Faker\faker;
use WendellAdriel\ValidatedDTO\ResourceDTO;
use WendellAdriel\ValidatedDTO\Support\ResourceCollection;
use WendellAdriel\ValidatedDTO\Tests\Datasets\UserResourceDTO;

beforeEach(function () {
$this->name = faker()->name;
$this->age = faker()->numberBetween(1, 100);
$this->name = fake()->name;
$this->age = fake()->numberBetween(1, 100);
});

it('validates that a ResourceDTO can be converted to a JsonResponse', function () {
Expand Down
3 changes: 1 addition & 2 deletions tests/Unit/SimpleDTOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Console\Command;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use function Pest\Faker\faker;
use WendellAdriel\ValidatedDTO\Exceptions\InvalidJsonException;
use WendellAdriel\ValidatedDTO\SimpleDTO;
use WendellAdriel\ValidatedDTO\Tests\Datasets\CallableCastingDTOInstance;
Expand All @@ -21,7 +20,7 @@
use WendellAdriel\ValidatedDTO\Tests\Datasets\User;

beforeEach(function () {
$this->subject_name = faker()->name;
$this->subject_name = fake()->name;
});

it('instantiates a SimpleDTO', function () {
Expand Down
3 changes: 1 addition & 2 deletions tests/Unit/ValidatedDTOTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use Illuminate\Validation\ValidationException;
use function Pest\Faker\faker;
use WendellAdriel\ValidatedDTO\Exceptions\InvalidJsonException;
use WendellAdriel\ValidatedDTO\Tests\Datasets\MapBeforeExportDTO;
use WendellAdriel\ValidatedDTO\Tests\Datasets\MapBeforeValidationDTO;
Expand All @@ -21,7 +20,7 @@
use WendellAdriel\ValidatedDTO\ValidatedDTO;

beforeEach(function () {
$this->subject_name = faker()->name;
$this->subject_name = fake()->name;
});

it('instantiates a ValidatedDTO validating its data', function () {
Expand Down
5 changes: 2 additions & 3 deletions tests/Unit/WireableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@
declare(strict_types=1);

use Illuminate\Support\Collection;
use function Pest\Faker\faker;
use WendellAdriel\ValidatedDTO\SimpleDTO;
use WendellAdriel\ValidatedDTO\Tests\Datasets\SimpleNameDTO;
use WendellAdriel\ValidatedDTO\Tests\Datasets\WireableDTO;

beforeEach(function () {
$this->name = faker()->name;
$this->age = faker()->numberBetween(1, 100);
$this->name = fake()->name;
$this->age = fake()->numberBetween(1, 100);
});

it('validates that a Wireable DTO will return the correct data for the toLivewire method', function () {
Expand Down

0 comments on commit 454ba23

Please sign in to comment.