Skip to content

Commit

Permalink
Update workflows and remove older deps
Browse files Browse the repository at this point in the history
  • Loading branch information
mdpoulter committed Jun 16, 2024
1 parent ae75aa3 commit 4e37972
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: 🔥 Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.1
php-version: 8.2
coverage: none
tools: cs2pr, pint

Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,16 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
php: [ 8.1, 8.2 ]
laravel: [ "^9.0", "^10.0" ]
php: [ 8.2 ]
laravel: [ "^10.0", "^11.0" ]
stability: [ prefer-lowest, prefer-stable ]
include:
- laravel: "^9.0"
testbench: "^7.0"
enum: "^5.0"
- laravel: "^9.0"
testbench: "^7.0"
enum: "^6.0"
- laravel: "^10.0"
testbench: "^8.0"
enum: "^6.0"
- laravel: "^11.0"
testbench: "^9.0"
enum: "^6.0"

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

Expand Down
80 changes: 40 additions & 40 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
{
"name": "simplesquid/nova-enum-field",
"description": "A Laravel Nova field to add enums to resources.",
"keywords": [
"name" : "simplesquid/nova-enum-field",
"description" : "A Laravel Nova field to add enums to resources.",
"keywords" : [
"simplesquid",
"laravel",
"nova",
"field",
"enum",
"nova-enum-field"
],
"homepage": "https://github.com/simplesquid/nova-enum-field",
"license": "MIT",
"authors": [
"homepage" : "https://github.com/simplesquid/nova-enum-field",
"license" : "MIT",
"authors" : [
{
"name": "Matthew Poulter",
"email": "matthew.poulter@simplesquid.co.za",
"homepage": "https://simplesquid.co.za/",
"role": "Developer"
"name" : "Matthew Poulter",
"email" : "matthew.poulter@simplesquid.co.za",
"homepage" : "https://simplesquid.co.za/",
"role" : "Developer"
}
],
"repositories": [
"repositories" : [
{
"type": "composer",
"url": "https://nova.laravel.com"
"type" : "composer",
"url" : "https://nova.laravel.com"
}
],
"require": {
"php": "^8.0",
"bensampo/laravel-enum": "^5.0 || ^6.0",
"illuminate/support": "^9.0 || ^10.0 || ^11.0",
"laravel/nova": "^4.0"
"require" : {
"php" : "^8.1",
"bensampo/laravel-enum" : "^5.0 || ^6.0",
"illuminate/support" : "^10.0 || ^11.0",
"laravel/nova" : "^4.0"
},
"require-dev": {
"joshgaber/novaunit": "^3.1",
"laravel/pint": "^1.2",
"mockery/mockery": "^1.3.3",
"nunomaduro/collision": "^6.1 || ^7.0 || ^8.0",
"orchestra/testbench": "^7.0 || ^8.0 || ^9.0",
"phpunit/phpunit": "^10.0",
"symfony/var-dumper": "^6.0"
"require-dev" : {
"joshgaber/novaunit" : "^3.1",
"laravel/pint" : "^1.2",
"mockery/mockery" : "^1.3.3",
"nunomaduro/collision" : "^7.0 || ^8.0",
"orchestra/testbench" : "^8.0 || ^9.0",
"phpunit/phpunit" : "^10.0",
"symfony/var-dumper" : "^6.0 || ^7.0"
},
"autoload": {
"psr-4": {
"SimpleSquid\\Nova\\Fields\\Enum\\": "src"
"autoload" : {
"psr-4" : {
"SimpleSquid\\Nova\\Fields\\Enum\\" : "src"
}
},
"autoload-dev": {
"psr-4": {
"SimpleSquid\\Nova\\Fields\\Enum\\Tests\\": "tests"
"autoload-dev" : {
"psr-4" : {
"SimpleSquid\\Nova\\Fields\\Enum\\Tests\\" : "tests"
}
},
"extra": {
"laravel": {
"providers": []
"extra" : {
"laravel" : {
"providers" : []
}
},
"scripts": {
"test": "vendor/bin/phpunit --colors=always"
"scripts" : {
"test" : "vendor/bin/phpunit --colors=always"
},
"config": {
"sort-packages": true
"config" : {
"sort-packages" : true
},
"minimum-stability": "stable"
"minimum-stability" : "stable"
}
2 changes: 1 addition & 1 deletion src/Enum.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function (NovaRequest $request, $model, $attribute, $requestAttribute) {
public function attach($class)
{
return $this->options($class::asSelectArray())
->rules($this->nullable ? 'nullable' : 'required', new EnumValue($class, false));
->rules($this->nullable ? 'nullable' : 'required', new EnumValue($class, false));
}

public function nullable($nullable = true, $values = null)
Expand Down

0 comments on commit 4e37972

Please sign in to comment.