Skip to content

Commit

Permalink
[PLA-2105] Upgrade dependencies & changes formatting to php8.3 (#295)
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardocustodio authored Nov 29, 2024
1 parent 619626c commit 2abde6d
Show file tree
Hide file tree
Showing 274 changed files with 1,125 additions and 776 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,6 @@ jobs:
composer build-sr25519
composer dump-autoload
- name: Run Laravel Pint
run: |
./vendor/bin/pint --test
- name: Execute tests
run: |
php -d pcov.enabled=1 ./vendor/bin/phpunit --colors=always --coverage-clover coverage.xml
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/sast.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ jobs:
- name: Run Rector
run: |
./vendor/bin/rector process --dry-run
- name: Run Laravel Pint
run: |
./vendor/bin/pint --test
2 changes: 1 addition & 1 deletion .github/workflows/security_checker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Dependencies Security Checker
name: Security Checker

on:
pull_request:
Expand Down
16 changes: 7 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,31 +39,29 @@
"gmajor/substrate-codec-php": "^1.0",
"guzzlehttp/guzzle": "^7.0",
"illuminate/contracts": "^11.0",
"kevinrob/guzzle-cache-middleware": "^5.0",
"kevinrob/guzzle-cache-middleware": "^6.0",
"laravel/pail": "^1.1",
"mll-lab/laravel-graphiql": "^3.0",
"phrity/websocket": "^1.0",
"rebing/graphql-laravel": "^9.0",
"revolt/event-loop": "^1.0",
"simplesoftwareio/simple-qrcode": "^4.0",
"spatie/laravel-package-tools": "^1.0",
"spatie/laravel-ray": "^1.0",
"stechstudio/backoff": "^1.0",
"tuupola/base58": "^2.0"
},
"require-dev": {
"dms/phpunit-arraysubset-asserts": "dev-master",
"fakerphp/faker": "^1.0",
"larastan/larastan": "^2.0",
"larastan/larastan": "^3.0",
"laravel/pint": "^1.0",
"nunomaduro/collision": "^8.0",
"orchestra/testbench": "^9.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/php-code-coverage": "^10.0",
"phpunit/phpunit": "^10.0",
"rector/rector": "^1.0",
"phpstan/phpstan-deprecation-rules": "^2.0",
"phpstan/phpstan-phpunit": "^2.0",
"phpunit/php-code-coverage": "^11.0",
"phpunit/phpunit": "^11.0",
"rector/rector": "2.0.0-rc1",
"roave/security-advisories": "dev-latest"
},
"autoload": {
Expand Down
3 changes: 1 addition & 2 deletions rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
__DIR__ . '/src',
__DIR__ . '/tests',
])
->withPhpSets(php82: true)
->withPhpSets(php83: true)
->withPreparedSets(deadCode: true)
->withRules([Spatie\Ray\Rector\RemoveRayCallRector::class])
->withTypeCoverageLevel(0);
14 changes: 7 additions & 7 deletions src/BlockchainConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

final class BlockchainConstant
{
public const EXISTENTIAL_DEPOSIT = 100000000000000000;
public const int EXISTENTIAL_DEPOSIT = 100000000000000000;

// Transaction Deposits
public const DEPOSIT_PER_TOKEN_ACCOUNT = 10000000000000000;
public const int DEPOSIT_PER_TOKEN_ACCOUNT = 10000000000000000;

public const DEPOSIT_PER_COLLECTION = 6250000000000000000;
public const DEPOSIT_PER_ATTRIBUTE_BASE = 50000000000000000;
public const DEPOSIT_PER_ATTRIBUTE_PER_BYTE = 25000000000000;
public const DEPOSIT_PER_LISTING = 507225000000000000;
public const DEPOSIT_PER_FUEL_TANK = 2500000000000000000;
public const int DEPOSIT_PER_COLLECTION = 6250000000000000000;
public const int DEPOSIT_PER_ATTRIBUTE_BASE = 50000000000000000;
public const int DEPOSIT_PER_ATTRIBUTE_PER_BYTE = 25000000000000;
public const int DEPOSIT_PER_LISTING = 507225000000000000;
public const int DEPOSIT_PER_FUEL_TANK = 2500000000000000000;
}
2 changes: 2 additions & 0 deletions src/Clients/Abstracts/CachedHttpAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ abstract class CachedHttpAbstract extends JsonHttpAbstract
/**
* Get the http client instance.
*/
#[\Override]
protected function getClient(): PendingRequest
{
$stack = HandlerStack::create();
Expand All @@ -39,6 +40,7 @@ protected function getClient(): PendingRequest
*
* @throws RequestException
*/
#[\Override]
protected function getResponse(Response|PromiseInterface $response): mixed
{
return parent::getResponse($response);
Expand Down
2 changes: 2 additions & 0 deletions src/Clients/Abstracts/JsonHttpAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ abstract class JsonHttpAbstract extends HttpAbstract
/**
* Get the http client instance.
*/
#[\Override]
protected function getClient(): PendingRequest
{
return parent::getClient()
Expand All @@ -24,6 +25,7 @@ protected function getClient(): PendingRequest
*
* @throws RequestException
*/
#[\Override]
protected function getResponse(Response|PromiseInterface $response): mixed
{
return $response instanceof Response ?
Expand Down
2 changes: 2 additions & 0 deletions src/Clients/Implementations/DecoderHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class DecoderHttpClient extends JsonHttpAbstract
/**
* Get the http client instance.
*/
#[\Override]
public function getClient(): PendingRequest
{
return parent::getClient();
Expand All @@ -20,6 +21,7 @@ public function getClient(): PendingRequest
/**
* Get the response data.
*/
#[\Override]
public function getResponse(Response|PromiseInterface $response): mixed
{
return parent::getResponse($response);
Expand Down
1 change: 1 addition & 0 deletions src/CoreServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ public function configurePackage(Package $package): void
/**
* Bootstrap any application services.
*/
#[\Override]
public function boot()
{
parent::boot();
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Base/Mutation.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function getMutationName(): string
/**
* Validate arguments base from the rules.
*/
#[\Override]
protected function validateArguments(array $arguments, array $rules): void
{
$validator = $this->getValidator($arguments, $rules);
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Base/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ abstract class Query extends BaseQuery
/**
* Validate arguments base from the rules.
*/
#[\Override]
protected function validateArguments(array $arguments, array $rules): void
{
$validator = $this->getValidator($arguments, $rules);
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/CryptoSignatureTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class CryptoSignatureTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/EventTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class EventTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/FilterTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class FilterTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/FreezeStateTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class FreezeStateTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/FreezeTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class FreezeTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/ModelTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ModelTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/NetworkTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class NetworkTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/PalletIdentifierEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class PalletIdentifierEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/TokenMarketBehaviorTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TokenMarketBehaviorTypeEnum extends EnumType implements PlatformGraphQlEnu
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/TokenMintCapTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TokenMintCapTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/TokenTypeEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TokenTypeEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/TransactionMethodEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TransactionMethodEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
// TODO: Need to check the implications of removing:
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/TransactionResultEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TransactionResultEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Enums/TransactionStateEnum.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class TransactionStateEnum extends EnumType implements PlatformGraphQlEnum
/**
* Get the enum's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Middleware/ResolvePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class ResolvePage extends Middleware
/**
* Process the middleware.
*/
#[\Override]
public function handle($root, array $args, $context, ResolveInfo $info, Closure $next)
{
$this->resolveCurrentPageForPagination($args['after']);
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Middleware/SingleArgOnly.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SingleArgOnly extends Middleware
/**
* Process the middleware.
*/
#[\Override]
public function handle($root, array $args, $context, ResolveInfo $info, Closure $next)
{
if (count($args) != 1) {
Expand Down
1 change: 1 addition & 0 deletions src/GraphQL/Middleware/SingleFilterOnly.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class SingleFilterOnly extends Middleware
/**
* Process the middleware.
*/
#[\Override]
public function handle($root, array $args, $context, ResolveInfo $info, Closure $next)
{
$filledArgs = collect($args)->filter(fn ($arg) => !empty($arg));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class AcknowledgeEventsMutation extends Mutation implements PlatformGraphQlMutat
/**
* Get the mutation's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand All @@ -37,6 +38,7 @@ public function type(): Type
/**
* Get the mutation's arguments definition.
*/
#[\Override]
public function args(): array
{
return [
Expand All @@ -63,6 +65,7 @@ public function resolve($root, array $args, $context, ResolveInfo $resolveInfo,
/**
* Get the validation rules.
*/
#[\Override]
protected function rules(array $args = []): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function __construct()
/**
* Get the mutation's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand All @@ -51,6 +52,7 @@ public function type(): Type
/**
* Get the mutation's arguments definition.
*/
#[\Override]
public function args(): array
{
return [
Expand Down Expand Up @@ -95,6 +97,7 @@ public function resolve($root, array $args, $context, ResolveInfo $resolveInfo,
/**
* Get the validation rules.
*/
#[\Override]
protected function rules(array $args = []): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class CreateWalletMutation extends Mutation implements PlatformGraphQlMutation
/**
* Get the mutation's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand All @@ -37,6 +38,7 @@ public function type(): Type
/**
* Get the mutation's arguments definition.
*/
#[\Override]
public function args(): array
{
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class MarkAndListPendingTransactionsMutation extends Mutation implements Platfor
/**
* Get the mutation's attributes.
*/
#[\Override]
public function attributes(): array
{
return [
Expand All @@ -48,6 +49,7 @@ public function type(): Type
/**
* Get the mutation's arguments definition.
*/
#[\Override]
public function args(): array
{
return ConnectionInput::args([
Expand Down Expand Up @@ -105,6 +107,7 @@ public function resolve($root, array $args, $context, ResolveInfo $resolveInfo,
/**
* Get the validation rules.
*/
#[\Override]
protected function rules(array $args = []): array
{
return [
Expand Down
Loading

0 comments on commit 2abde6d

Please sign in to comment.