Skip to content

Commit db0249b

Browse files
authored
Merge pull request #8 from jorisvanandel/chore/upgrade-dependencies-phpstan-2
2 parents 4f0a943 + 09d4f29 commit db0249b

File tree

6 files changed

+17
-16
lines changed

6 files changed

+17
-16
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,18 @@
1818
"require": {
1919
"php": "^8.1",
2020
"saloonphp/saloon": "^3.7",
21-
"thecodingmachine/safe": "^2.5"
21+
"thecodingmachine/safe": "^3.0"
2222
},
2323
"require-dev": {
2424
"ergebnis/composer-normalize": "^2.42",
2525
"laravel/pint": "^1.14",
2626
"pestphp/pest": "^2.34",
2727
"phpstan/extension-installer": "^1.3",
28-
"phpstan/phpstan": "^1.10",
29-
"phpstan/phpstan-deprecation-rules": "^1.1",
30-
"rector/rector": "^1.0",
31-
"spaze/phpstan-disallowed-calls": "^3.1",
32-
"thecodingmachine/phpstan-safe-rule": "^1.2"
28+
"phpstan/phpstan": "^2.0",
29+
"phpstan/phpstan-deprecation-rules": "^2.0",
30+
"rector/rector": "^2.0",
31+
"spaze/phpstan-disallowed-calls": "^4.0",
32+
"thecodingmachine/phpstan-safe-rule": "^1.3.1"
3333
},
3434
"autoload": {
3535
"psr-4": {

phpstan.neon.dist

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ includes:
66

77
parameters:
88
checkBenevolentUnionTypes: true
9-
checkMissingIterableValueType: false
109
level: max
1110

11+
ignoreErrors:
12+
-
13+
identifier: missingType.iterableValue
14+
1215
paths:
1316
- src

rector.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@
22

33
declare(strict_types=1);
44

5-
use Rector\CodeQuality\Rector\Array_\CallableThisArrayToAnonymousFunctionRector;
6-
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector;
75
use Rector\Config\RectorConfig;
86
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector;
9-
use Rector\TypeDeclaration\Rector\ClassMethod\AddVoidReturnTypeWhereNoReturnRector;
107

118
return RectorConfig::configure()
129
->withPaths([
@@ -20,11 +17,6 @@
2017
typeDeclarations: true,
2118
earlyReturn: true
2219
)
23-
->withRules([
24-
AddVoidReturnTypeWhereNoReturnRector::class,
25-
InlineConstructorDefaultToPropertyRector::class,
26-
])
2720
->withSkip([
28-
CallableThisArrayToAnonymousFunctionRector::class,
2921
ClosureToArrowFunctionRector::class,
3022
]);

src/DataTransferObjects/Contact.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
class Contact
88
{
9+
/**
10+
* @var list<string>
11+
*/
912
public const DEFAULT_PROPERTIES = [
1013
'email',
1114
'firstName',

src/DataTransferObjects/CustomField.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public function __construct(
1616
) {
1717
}
1818

19+
/**
20+
* @param array{key: string, label: string, type: 'boolean'|'date'|'number'|'string'} $attributes
21+
*/
1922
public static function from(array $attributes): CustomField
2023
{
2124
return new CustomField(

src/Requests/Contacts/ContactCustomFieldsRequest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ContactCustomFieldsRequest extends Request
1515

1616
public function createDtoFromResponse(Response $response): array
1717
{
18-
/** @var array<int, array{key: string, label: string, type: string}> $data */
18+
/** @var array<int, array{key: string, label: string, type: 'boolean'|'date'|'number'|'string'}> $data */
1919
$data = $response->json();
2020

2121
return array_map(fn (array $customField): CustomField => CustomField::from($customField), $data);

0 commit comments

Comments
 (0)