Skip to content

Commit 4b7547d

Browse files
azjezzinnocenzi
andauthored
chore: update mago to latest version (#1062)
Signed-off-by: azjezz <[email protected]> Co-authored-by: Enzo Innocenzi <[email protected]>
1 parent 4137981 commit 4b7547d

File tree

587 files changed

+1807
-1959
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

587 files changed

+1807
-1959
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
},
4040
"require-dev": {
4141
"aidan-casey/mock-client": "dev-master",
42-
"carthage-software/mago": "0.19.3",
42+
"carthage-software/mago": "0.22.0",
4343
"guzzlehttp/psr7": "^2.6.1",
4444
"illuminate/view": "~11.7.0",
4545
"mikey179/vfsstream": "^2.0@dev",
@@ -177,7 +177,7 @@
177177
"phpunit": "vendor/bin/phpunit --display-warnings --display-skipped --display-deprecations --display-errors --display-notices",
178178
"coverage": "vendor/bin/phpunit --coverage-html build/reports/html --coverage-clover build/reports/clover.xml",
179179
"mago:fmt": "vendor/bin/mago fmt",
180-
"mago:lint": "vendor/bin/mago lint --fix && vendor/bin/mago lint",
180+
"mago:lint": "vendor/bin/mago lint --fix --fmt && vendor/bin/mago lint",
181181
"phpstan": "vendor/bin/phpstan analyse src tests --memory-limit=1G",
182182
"rector": "vendor/bin/rector process --no-ansi",
183183
"merge": "php -d\"error_reporting = E_ALL & ~E_DEPRECATED\" vendor/bin/monorepo-builder merge",

mago.toml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,30 @@
11
php_version = "8.4.0"
22

33
[source]
4-
paths = ["src"]
4+
paths = ["src", "tests"]
55
includes = ["vendor"]
66
excludes = [
77
"./vendor/symfony/cache/Traits/ValueWrapper.php",
88
"./vendor/composer",
9-
"**/.cache"
9+
"**/.cache",
10+
"**/*.stub.php",
1011
]
1112

1213
[format]
1314
print_width = 180
1415
tab_width = 4
1516
use_tabs = false
16-
space_after_not_operator = true
17+
space_after_logical_not_unary_prefix_operator = true
1718
null_type_hint = "question"
18-
space_before_arrow_function_params = true
19+
space_before_arrow_function_parameter_list_parenthesis = true
1920
always_break_named_arguments_list = false
2021
preserve_breaking_member_access_chain = true
2122
preserve_breaking_argument_list = true
2223
preserve_breaking_array_like = true
2324
preserve_breaking_parameter_list = true
2425
preserve_breaking_attribute_list = true
2526
preserve_breaking_conditional_expression = true
27+
empty_line_after_opening_tag = false
2628

2729
[linter]
2830
default_plugins = true
@@ -60,9 +62,9 @@ ignore_arrow_function = true
6062
ignore_closure = true
6163

6264
# https://github.com/carthage-software/mago/issues/146
63-
# [[linter.rules]]
64-
# name = "strictness/require-strict-types"
65-
# level = "off"
65+
[[linter.rules]]
66+
name = "strictness/require-strict-types"
67+
level = "off"
6668

6769
[[linter.rules]]
6870
name = "strictness/require-parameter-type"

phpstan.neon.dist

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ parameters:
3636
message: '#.*undefined property Dom*#'
3737
-
3838
message: '#.*undefined method Dom*#'
39-
-
40-
message: '#File ends with a trailing whitespace*#'
41-
path: src/Tempest/View/src/Stubs/view.stub.php
4239

4340
disallowedFunctionCalls:
4441
-

src/Tempest/Auth/src/Allow.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@
1313
public function __construct(
1414
/** @var string|UnitEnum|class-string<\Tempest\Auth\Authorizer> $permission */
1515
public string|UnitEnum $permission,
16-
) {
17-
}
16+
) {}
1817
}

src/Tempest/Auth/src/AuthBootstrap.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
{
1313
public function __construct(
1414
private Router $router,
15-
) {
16-
}
15+
) {}
1716

1817
#[EventHandler(KernelEvent::BOOTED)]
1918
public function __invoke(): void

src/Tempest/Auth/src/AuthConfig.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ public function __construct(
1414

1515
/** @var class-string<\Tempest\Database\DatabaseModel> */
1616
public string $userModelClass = User::class,
17-
) {
18-
}
17+
) {}
1918
}

src/Tempest/Auth/src/AuthorizerMiddleware.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ public function __construct(
1818
private Authenticator $authenticator,
1919
private MatchedRoute $matchedRoute,
2020
private Container $container,
21-
) {
22-
}
21+
) {}
2322

2423
public function __invoke(Request $request, HttpMiddlewareCallable $next): Response
2524
{

src/Tempest/Auth/src/Install/Permission.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ final class Permission implements DatabaseModel
1515

1616
public function __construct(
1717
public string $name,
18-
) {
19-
}
18+
) {}
2019

2120
public function matches(string|UnitEnum|self $match): bool
2221
{

src/Tempest/Auth/src/Install/User.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public function __construct(
2525
public string $email,
2626
/** @var \Tempest\Auth\Install\UserPermission[] $userPermissions */
2727
public array $userPermissions = [],
28-
) {
29-
}
28+
) {}
3029

3130
/**
3231
* @param string $password The raw password, which will be encrypted as soon as it is set

src/Tempest/Auth/src/Install/UserPermission.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,5 @@ final class UserPermission implements DatabaseModel
1414
public function __construct(
1515
public User $user,
1616
public Permission $permission,
17-
) {
18-
}
17+
) {}
1918
}

0 commit comments

Comments
 (0)