diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 45ec05d4..bd2b6fb4 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -43,7 +43,7 @@ jobs: extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd, gmp, intl, json, mysql, readline, sodium, bcmath, pcov tools: composer:v2 env: - COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup GO uses: actions/setup-go@v5 @@ -62,7 +62,7 @@ jobs: chmod 600 ~/.ssh/id_rsa composer install --no-interaction --prefer-dist --optimize-autoloader composer build-sr25519 - composer dumpautoload + composer dump-autoload - name: Run Laravel Pint run: | diff --git a/composer.json b/composer.json index 60cb72f8..e78dec2f 100644 --- a/composer.json +++ b/composer.json @@ -19,13 +19,13 @@ } ], "require": { - "php": "^8.1|^8.2", + "php": "^8.2", "ext-bcmath": "*", "ext-json": "*", "ext-openssl": "*", "enjin/platform-core": "*", "phrity/websocket": "^1.0", - "rebing/graphql-laravel": "^9.0.0-rc1", + "rebing/graphql-laravel": "^9.2", "spatie/laravel-package-tools": "^1.0", "spatie/laravel-ray": "^1.0" }, @@ -73,9 +73,9 @@ "require-dev": { "dms/phpunit-arraysubset-asserts": "dev-master", "laravel/pint": "^1.16", - "nunomaduro/collision": "^7.0", - "nunomaduro/larastan": "^2.0", - "orchestra/testbench": "^8.0", + "nunomaduro/collision": "^8.1", + "larastan/larastan": "^2.0", + "orchestra/testbench": "^9.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-phpunit": "^1.0", diff --git a/phpunit.xml b/phpunit.xml index c9c31415..fa518df9 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -24,7 +24,7 @@ - + diff --git a/src/Events/BeamClaimInProgress.php b/src/Events/BeamClaimInProgress.php index a7829b2e..0d7632c4 100644 --- a/src/Events/BeamClaimInProgress.php +++ b/src/Events/BeamClaimInProgress.php @@ -2,6 +2,4 @@ namespace Enjin\Platform\Beam\Events; -class BeamClaimInProgress extends BeamClaimPending -{ -} +class BeamClaimInProgress extends BeamClaimPending {} diff --git a/src/Events/BeamClaimsComplete.php b/src/Events/BeamClaimsComplete.php index 67173afe..a828b83a 100644 --- a/src/Events/BeamClaimsComplete.php +++ b/src/Events/BeamClaimsComplete.php @@ -2,6 +2,4 @@ namespace Enjin\Platform\Beam\Events; -class BeamClaimsComplete extends BeamClaimPending -{ -} +class BeamClaimsComplete extends BeamClaimPending {} diff --git a/src/Events/BeamClaimsFailed.php b/src/Events/BeamClaimsFailed.php index 5693b979..0876f0d8 100644 --- a/src/Events/BeamClaimsFailed.php +++ b/src/Events/BeamClaimsFailed.php @@ -2,6 +2,4 @@ namespace Enjin\Platform\Beam\Events; -class BeamClaimsFailed extends BeamClaimPending -{ -} +class BeamClaimsFailed extends BeamClaimPending {} diff --git a/src/Events/BeamDeleted.php b/src/Events/BeamDeleted.php index 75b95787..f66d0919 100644 --- a/src/Events/BeamDeleted.php +++ b/src/Events/BeamDeleted.php @@ -2,6 +2,4 @@ namespace Enjin\Platform\Beam\Events; -class BeamDeleted extends BeamCreated -{ -} +class BeamDeleted extends BeamCreated {} diff --git a/src/Events/BeamUpdated.php b/src/Events/BeamUpdated.php index ccc60441..17718d9d 100644 --- a/src/Events/BeamUpdated.php +++ b/src/Events/BeamUpdated.php @@ -2,6 +2,4 @@ namespace Enjin\Platform\Beam\Events; -class BeamUpdated extends BeamCreated -{ -} +class BeamUpdated extends BeamCreated {} diff --git a/src/Events/TokensRemoved.php b/src/Events/TokensRemoved.php index 8216b912..37d5b431 100644 --- a/src/Events/TokensRemoved.php +++ b/src/Events/TokensRemoved.php @@ -2,6 +2,4 @@ namespace Enjin\Platform\Beam\Events; -class TokensRemoved extends TokensAdded -{ -} +class TokensRemoved extends TokensAdded {} diff --git a/src/Jobs/ClaimBeam.php b/src/Jobs/ClaimBeam.php index 2262004e..7d9ddecd 100644 --- a/src/Jobs/ClaimBeam.php +++ b/src/Jobs/ClaimBeam.php @@ -33,9 +33,7 @@ class ClaimBeam implements ShouldQueue /** * Create a new job instance. */ - public function __construct(protected ?array $data) - { - } + public function __construct(protected ?array $data) {} /** * Execute the job. diff --git a/src/Jobs/CreateBeamClaims.php b/src/Jobs/CreateBeamClaims.php index 26690b46..5ff58ad9 100644 --- a/src/Jobs/CreateBeamClaims.php +++ b/src/Jobs/CreateBeamClaims.php @@ -22,9 +22,7 @@ class CreateBeamClaims implements ShouldQueue /** * Create a new job instance. */ - public function __construct(protected ?Collection $chunk) - { - } + public function __construct(protected ?Collection $chunk) {} /** * Execute the job. diff --git a/src/Jobs/CreateClaim.php b/src/Jobs/CreateClaim.php index 5eb2cf33..ebfb8df8 100644 --- a/src/Jobs/CreateClaim.php +++ b/src/Jobs/CreateClaim.php @@ -21,9 +21,7 @@ class CreateClaim implements ShouldQueue /** * Create a new job instance. */ - public function __construct(protected ?array $claim) - { - } + public function __construct(protected ?array $claim) {} /** * Execute the job. diff --git a/src/Jobs/DispatchCreateBeamClaimsJobs.php b/src/Jobs/DispatchCreateBeamClaimsJobs.php index 8246c451..4480c8cf 100644 --- a/src/Jobs/DispatchCreateBeamClaimsJobs.php +++ b/src/Jobs/DispatchCreateBeamClaimsJobs.php @@ -26,8 +26,7 @@ class DispatchCreateBeamClaimsJobs implements ShouldQueue public function __construct( protected Model $beam, protected ?array $tokens - ) { - } + ) {} /** * Execute the job. diff --git a/src/Listeners/UpdateClaimCollectionIds.php b/src/Listeners/UpdateClaimCollectionIds.php index ff4631c4..4de90e0f 100644 --- a/src/Listeners/UpdateClaimCollectionIds.php +++ b/src/Listeners/UpdateClaimCollectionIds.php @@ -8,9 +8,7 @@ class UpdateClaimCollectionIds implements ShouldQueue { - public function __construct(private readonly BeamClaimService $beamClaimService) - { - } + public function __construct(private readonly BeamClaimService $beamClaimService) {} /** * Handle the event. diff --git a/src/Listeners/UpdateClaimStatus.php b/src/Listeners/UpdateClaimStatus.php index f7fb01de..dca0f8be 100644 --- a/src/Listeners/UpdateClaimStatus.php +++ b/src/Listeners/UpdateClaimStatus.php @@ -18,9 +18,7 @@ class UpdateClaimStatus implements ShouldQueue /** * Create new event listener instance. */ - public function __construct() - { - } + public function __construct() {} /** * Handle the event. diff --git a/src/Models/Beam.php b/src/Models/Beam.php index 2e4f1362..d885e450 100644 --- a/src/Models/Beam.php +++ b/src/Models/Beam.php @@ -4,6 +4,4 @@ use Enjin\Platform\Models\ModelResolver; -class Beam extends ModelResolver -{ -} +class Beam extends ModelResolver {} diff --git a/src/Models/BeamBatch.php b/src/Models/BeamBatch.php index a0f4b40a..ccd042c9 100644 --- a/src/Models/BeamBatch.php +++ b/src/Models/BeamBatch.php @@ -4,6 +4,4 @@ use Enjin\Platform\Models\ModelResolver; -class BeamBatch extends ModelResolver -{ -} +class BeamBatch extends ModelResolver {} diff --git a/src/Models/BeamClaim.php b/src/Models/BeamClaim.php index 415b0a39..21e72083 100644 --- a/src/Models/BeamClaim.php +++ b/src/Models/BeamClaim.php @@ -4,6 +4,4 @@ use Enjin\Platform\Models\ModelResolver; -class BeamClaim extends ModelResolver -{ -} +class BeamClaim extends ModelResolver {} diff --git a/src/Models/BeamScan.php b/src/Models/BeamScan.php index e531d6d7..c2eb5ce0 100644 --- a/src/Models/BeamScan.php +++ b/src/Models/BeamScan.php @@ -4,6 +4,4 @@ use Enjin\Platform\Models\ModelResolver; -class BeamScan extends ModelResolver -{ -} +class BeamScan extends ModelResolver {} diff --git a/src/Models/Laravel/Beam.php b/src/Models/Laravel/Beam.php index ada5a84b..0b760dd5 100644 --- a/src/Models/Laravel/Beam.php +++ b/src/Models/Laravel/Beam.php @@ -16,11 +16,9 @@ use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Facades\Cache; -use Staudenmeir\EloquentEagerLimit\HasEagerLimit; class Beam extends BaseModel { - use HasEagerLimit; use HasFactory; use SoftDeletes; use Traits\EagerLoadSelectFields; diff --git a/src/Models/Laravel/BeamClaim.php b/src/Models/Laravel/BeamClaim.php index 1aee55bd..b0a82f0e 100644 --- a/src/Models/Laravel/BeamClaim.php +++ b/src/Models/Laravel/BeamClaim.php @@ -22,11 +22,9 @@ use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Str; -use Staudenmeir\EloquentEagerLimit\HasEagerLimit; class BeamClaim extends BaseModel { - use HasEagerLimit; use HasFactory; use HasSingleUseCodeScope; use MassPrunable; diff --git a/src/Models/Laravel/BeamScan.php b/src/Models/Laravel/BeamScan.php index 1ab69d81..c7b7bded 100644 --- a/src/Models/Laravel/BeamScan.php +++ b/src/Models/Laravel/BeamScan.php @@ -7,11 +7,9 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\SoftDeletes; -use Staudenmeir\EloquentEagerLimit\HasEagerLimit; class BeamScan extends BaseModel { - use HasEagerLimit; use HasFactory; use SoftDeletes; use Traits\EagerLoadSelectFields; diff --git a/src/Rules/BeamExists.php b/src/Rules/BeamExists.php index 9a61077e..a98b5003 100644 --- a/src/Rules/BeamExists.php +++ b/src/Rules/BeamExists.php @@ -9,9 +9,7 @@ class BeamExists implements ValidationRule { - public function __construct(protected string $column = 'code') - { - } + public function __construct(protected string $column = 'code') {} /** * Run the validation rule. @@ -24,7 +22,7 @@ public function validate(string $attribute, mixed $value, Closure $fail): void $value = $beamData->beamCode; } - if (!Beam::where($this->column, $value)->exists()) { + if (! Beam::where($this->column, $value)->exists()) { $fail('validation.exists')->translate(); } } diff --git a/src/Rules/CanClaim.php b/src/Rules/CanClaim.php index 8615b4e5..e9284fab 100644 --- a/src/Rules/CanClaim.php +++ b/src/Rules/CanClaim.php @@ -17,9 +17,7 @@ class CanClaim implements DataAwareRule, ValidationRule /** * Create new rule instance. */ - public function __construct(protected bool $singleUse = false) - { - } + public function __construct(protected bool $singleUse = false) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/HasBeamFlag.php b/src/Rules/HasBeamFlag.php index fd11e40c..4c0489a0 100644 --- a/src/Rules/HasBeamFlag.php +++ b/src/Rules/HasBeamFlag.php @@ -12,9 +12,7 @@ class HasBeamFlag implements ValidationRule /** * Create new rule instance. */ - public function __construct(protected BeamFlag $flag) - { - } + public function __construct(protected BeamFlag $flag) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/MaxTokenCount.php b/src/Rules/MaxTokenCount.php index b3da2318..1572d11c 100644 --- a/src/Rules/MaxTokenCount.php +++ b/src/Rules/MaxTokenCount.php @@ -24,9 +24,7 @@ class MaxTokenCount implements DataAwareRule, ValidationRule */ protected $limit; - public function __construct(protected ?string $collectionId) - { - } + public function __construct(protected ?string $collectionId) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/MaxTokenSupply.php b/src/Rules/MaxTokenSupply.php index 1fea4b35..be18804d 100644 --- a/src/Rules/MaxTokenSupply.php +++ b/src/Rules/MaxTokenSupply.php @@ -37,9 +37,7 @@ class MaxTokenSupply implements DataAwareRule, ValidationRule /** * Create instance of rule. */ - public function __construct(protected ?string $collectionId) - { - } + public function __construct(protected ?string $collectionId) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/NotExpired.php b/src/Rules/NotExpired.php index 013f6f82..6bc93a8b 100644 --- a/src/Rules/NotExpired.php +++ b/src/Rules/NotExpired.php @@ -9,9 +9,7 @@ class NotExpired implements ValidationRule { - public function __construct(protected ?string $code = null) - { - } + public function __construct(protected ?string $code = null) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/NotOwner.php b/src/Rules/NotOwner.php index 05bd1eac..53ed161e 100644 --- a/src/Rules/NotOwner.php +++ b/src/Rules/NotOwner.php @@ -15,9 +15,7 @@ class NotOwner implements DataAwareRule, ValidationRule { use HasDataAwareRule; - public function __construct(protected bool $isSingleUse = false) - { - } + public function __construct(protected bool $isSingleUse = false) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/NotPaused.php b/src/Rules/NotPaused.php index 40d843cf..8a100b9e 100644 --- a/src/Rules/NotPaused.php +++ b/src/Rules/NotPaused.php @@ -9,9 +9,7 @@ class NotPaused implements ValidationRule { - public function __construct(protected ?string $code = null) - { - } + public function __construct(protected ?string $code = null) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/PassesClaimCondition.php b/src/Rules/PassesClaimCondition.php index 8f121199..192bf1c0 100644 --- a/src/Rules/PassesClaimCondition.php +++ b/src/Rules/PassesClaimCondition.php @@ -17,8 +17,7 @@ class PassesClaimCondition implements DataAwareRule, ValidationRule public function __construct( protected Closure $function, protected bool $singleUse - ) { - } + ) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/PassesClaimConditions.php b/src/Rules/PassesClaimConditions.php index 9ee9d96a..050260dd 100644 --- a/src/Rules/PassesClaimConditions.php +++ b/src/Rules/PassesClaimConditions.php @@ -21,8 +21,7 @@ class PassesClaimConditions implements DataAwareRule, ValidationRule */ public function __construct( protected bool $singleUse - ) { - } + ) {} public static function addConditionalFunctions(Closure|array|Collection $functions): void { diff --git a/src/Rules/SingleUseCodeExist.php b/src/Rules/SingleUseCodeExist.php index 9011d428..35bc924a 100644 --- a/src/Rules/SingleUseCodeExist.php +++ b/src/Rules/SingleUseCodeExist.php @@ -9,9 +9,7 @@ class SingleUseCodeExist implements ValidationRule { - public function __construct(protected bool $isClaiming = false) - { - } + public function __construct(protected bool $isClaiming = false) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/TokenUploadExistInCollection.php b/src/Rules/TokenUploadExistInCollection.php index 9d1ffe67..aa10aa2c 100644 --- a/src/Rules/TokenUploadExistInCollection.php +++ b/src/Rules/TokenUploadExistInCollection.php @@ -17,9 +17,7 @@ class TokenUploadExistInCollection implements ValidationRule */ protected $message; - public function __construct(protected ?string $collectionId) - { - } + public function __construct(protected ?string $collectionId) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/TokenUploadNotExistInBeam.php b/src/Rules/TokenUploadNotExistInBeam.php index 6f775fbf..3f8f94df 100644 --- a/src/Rules/TokenUploadNotExistInBeam.php +++ b/src/Rules/TokenUploadNotExistInBeam.php @@ -16,9 +16,7 @@ class TokenUploadNotExistInBeam implements DataAwareRule, ValidationRule use HasDataAwareRule; use IntegerRange; - public function __construct(protected ?Model $beam = null) - { - } + public function __construct(protected ?Model $beam = null) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/TokenUploadNotExistInCollection.php b/src/Rules/TokenUploadNotExistInCollection.php index 25e7b4fc..31d68479 100644 --- a/src/Rules/TokenUploadNotExistInCollection.php +++ b/src/Rules/TokenUploadNotExistInCollection.php @@ -12,9 +12,7 @@ class TokenUploadNotExistInCollection implements ValidationRule { use IntegerRange; - public function __construct(protected ?string $collectionId) - { - } + public function __construct(protected ?string $collectionId) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/TokensDoNotExistInBeam.php b/src/Rules/TokensDoNotExistInBeam.php index e5e51f8b..27a9fbde 100644 --- a/src/Rules/TokensDoNotExistInBeam.php +++ b/src/Rules/TokensDoNotExistInBeam.php @@ -18,9 +18,7 @@ class TokensDoNotExistInBeam implements DataAwareRule, ValidationRule use HasDataAwareRule; use IntegerRange; - public function __construct(protected ?Model $beam = null) - { - } + public function __construct(protected ?Model $beam = null) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/TokensDoNotExistInCollection.php b/src/Rules/TokensDoNotExistInCollection.php index d0136c57..19bf312b 100644 --- a/src/Rules/TokensDoNotExistInCollection.php +++ b/src/Rules/TokensDoNotExistInCollection.php @@ -11,9 +11,7 @@ class TokensDoNotExistInCollection implements ValidationRule { use IntegerRange; - public function __construct(protected ?string $collectionId) - { - } + public function __construct(protected ?string $collectionId) {} /** * Determine if the validation rule passes. diff --git a/src/Rules/TokensExistInCollection.php b/src/Rules/TokensExistInCollection.php index 391c9614..11649672 100644 --- a/src/Rules/TokensExistInCollection.php +++ b/src/Rules/TokensExistInCollection.php @@ -11,9 +11,7 @@ class TokensExistInCollection implements ValidationRule { use IntegerRange; - public function __construct(protected ?string $collectionId) - { - } + public function __construct(protected ?string $collectionId) {} /** * Determine if the validation rule passes. diff --git a/testbench.yaml b/testbench.yaml index fd060fca..ad5295ca 100644 --- a/testbench.yaml +++ b/testbench.yaml @@ -5,7 +5,7 @@ env: - DB_DATABASE="platform" - DB_USERNAME="root" - DB_PASSWORD="password" - - CACHE_DRIVER="redis" + - CACHE_STORE="redis" - QUEUE_CONNECTION="redis" - CHAIN="substrate" - NETWORK="enjin"