Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ jobs:
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.0, 8.1, 8.2]
laravel: ["9.x"]
laravel: ['10.x', '9.x']
stability: [prefer-lowest, prefer-stable]
exclude:
- laravel: '10.x'
php: 8.0

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -37,7 +40,7 @@ jobs:

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.62.1" --dev --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.64.1" --dev --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction

- name: Execute tests
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A bunch of general-purpose value objects you can use in your Laravel application

---

The package requires PHP `^8.0.2` and Laravel `^9.33`.
The package requires `PHP 8` or higher and `Laravel 9` or higher.

## #StandWithUkraine
[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
Expand Down
10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
],
"require": {
"php": "^8.0",
"illuminate/contracts": "^9.33",
"michael-rubel/laravel-formatters": "^7.0.4",
"illuminate/contracts": "^9.33|^10.0",
"michael-rubel/laravel-formatters": "^7.0.6",
"phpmath/bignumber": "^1.2",
"spatie/laravel-package-tools": "^1.12"
},
Expand All @@ -28,12 +28,8 @@
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.0",
"nunomaduro/larastan": "^2.2",
"orchestra/testbench": "^7.4",
"orchestra/testbench": "^7.4|^8.0",
"pestphp/pest": "^1.16",
"pestphp/pest-plugin-global-assertions": "^1.0",
"pestphp/pest-plugin-laravel": "^1.1",
"pestphp/pest-plugin-mock": "^1.0",
"pestphp/pest-plugin-parallel": "^0.2.0",
"phpunit/phpunit": "^9.5",
"roave/backward-compatibility-check": "^7.0|^8.0",
"roave/infection-static-analysis-plugin": "^1.25"
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Complex/ClassStringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
try {
new ClassString('');
} catch (ValidationException $e) {
assertSame(__('Class string cannot be empty.'), $e->getMessage());
$this->assertSame(__('Class string cannot be empty.'), $e->getMessage());
}
});

Expand Down Expand Up @@ -126,7 +126,7 @@
test('can extend protected methods in class string', function () {
$text = new TestClassString('Exception');
$text->validate();
assertSame('Exception', $text->value());
$this->assertSame('Exception', $text->value());
});

class TestClassString extends ClassString
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Complex/NameTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@

test('can extend protected methods in name', function () {
$name = new TestName('Name');
assertSame('Name', $name->value());
$this->assertSame('Name', $name->value());
});

class TestName extends Name
Expand Down
4 changes: 2 additions & 2 deletions tests/Unit/Complex/PhoneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
try {
new Phone('123');
} catch (ValidationException $e) {
assertSame(__('Your phone number is invalid.'), $e->getMessage());
$this->assertSame(__('Your phone number is invalid.'), $e->getMessage());
}
});

Expand Down Expand Up @@ -158,7 +158,7 @@

test('can extend protected methods in phone', function () {
$phone = new TestPhone('+38 000 000 00 00');
assertSame('+38 000 000 00 00', $phone->value());
$this->assertSame('+38 000 000 00 00', $phone->value());
});

class TestPhone extends Phone
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Complex/UuidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
$uuid = (string) Str::uuid();
$text = new TestUuid($uuid);
$text->validate();
assertSame($uuid, $text->value());
$this->assertSame($uuid, $text->value());
});

class TestUuid extends Uuid
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Primitive/BooleanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@

test('can extend protected methods in boolean', function () {
$bool = new TestBoolean('true');
assertIsBool($bool->value());
$this->assertIsBool($bool->value());
});

class TestBoolean extends Boolean
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/ValueObjectCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@

$fakeOption = new InputOption('value-object', null, InputOption::VALUE_NONE, 'Create a value object');

assertEquals($option, $fakeOption);
$this->assertEquals($option, $fakeOption);
});
2 changes: 1 addition & 1 deletion tests/Unit/ValueObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

test('toString casts value to string', function () {
$vo = new TestVO;
assertSame('100', $vo->toString());
$this->assertSame('100', $vo->toString());
});

class TestVO extends ValueObject
Expand Down