Skip to content

Commit 2ff64c3

Browse files
authored
Merge pull request #100 from Art4/update-libraries
Update dev libraries
2 parents 9bc2d24 + d595140 commit 2ff64c3

35 files changed

+100
-68
lines changed

.phpstan.neon

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,6 @@ parameters:
1717
treatPhpDocTypesAsCertain: false
1818

1919
ignoreErrors:
20-
-
21-
message: "#^Constructor of class Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull has an unused parameter \\$data\\.$#"
22-
count: 1
23-
path: src/V1/ResourceNull.php
24-
# parameter is required by Art4\JsonApiClient\Element
25-
26-
-
27-
message: "#^Constructor of class Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull has an unused parameter \\$manager\\.$#"
28-
count: 1
29-
path: src/V1/ResourceNull.php
30-
# parameter is required by Art4\JsonApiClient\Element
31-
32-
-
33-
message: "#^Constructor of class Art4\\\\JsonApiClient\\\\V1\\\\ResourceNull has an unused parameter \\$parent\\.$#"
34-
count: 1
35-
path: src/V1/ResourceNull.php
36-
# parameter is required by Art4\JsonApiClient\Element
37-
38-
-
39-
message: "#^Constructor of an anonymous class has an unused parameter \\$data\\.$#"
40-
count: 1
41-
path: tests/BC/ElementTest.php
42-
# parameter is required by Art4\JsonApiClient\Element
43-
44-
-
45-
message: "#^Constructor of an anonymous class has an unused parameter \\$manager\\.$#"
46-
count: 1
47-
path: tests/BC/ElementTest.php
48-
# parameter is required by Art4\JsonApiClient\Element
49-
50-
-
51-
message: "#^Constructor of an anonymous class has an unused parameter \\$parent\\.$#"
52-
count: 1
53-
path: tests/BC/ElementTest.php
54-
# parameter is required by Art4\JsonApiClient\Element
55-
5620
-
5721
message: "#^Parameter \\#1 \\$string of class Art4\\\\JsonApiClient\\\\Input\\\\RequestStringInput constructor expects string, mixed given\\.$#"
5822
count: 1

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
},
1818
"require-dev": {
1919
"friendsofphp/php-cs-fixer": "^3.64",
20-
"phpstan/phpstan": "^1.10",
21-
"phpstan/phpstan-phpunit": "^1.3",
22-
"phpunit/phpunit": "^10.4"
20+
"phpstan/phpstan": "^2.0",
21+
"phpstan/phpstan-phpunit": "^2.0",
22+
"phpunit/phpunit": "^10.4 || ^11.0 || ^12.0"
2323
},
2424
"autoload": {
2525
"psr-4": {

tests/BC/AccessableTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ public function getKeys()
5959
}
6060
};
6161

62+
/** @phpstan-ignore-next-line */
6263
$this->assertInstanceOf(Accessable::class, $class);
6364
}
6465
}

tests/BC/ElementTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function testBcForElementInterface(): void
3838
public function __construct($data, Manager $manager, Accessable $parent) {}
3939
};
4040

41+
/** @phpstan-ignore-next-line */
4142
$this->assertInstanceOf(Element::class, $class);
4243
}
4344
}

tests/BC/Exception/ExceptionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function testBcForExceptionInterface(): void
2525
*/
2626
$class = new class implements Exception {};
2727

28+
/** @phpstan-ignore-next-line */
2829
$this->assertInstanceOf(Exception::class, $class);
2930
}
3031
}

tests/BC/FactoryTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function make($name, array $args = [])
3838
}
3939
};
4040

41+
/** @phpstan-ignore-next-line */
4142
$this->assertInstanceOf(Factory::class, $class);
4243
}
4344
}

tests/BC/Input/InputTest.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ public function testBcForInputInterface(): void
3030
* This should be a native PH stdClass object, so Manager could
3131
* iterate over all public attributes
3232
*
33-
* @throws \Art4\JsonApiClient\Exception\InputException if something went wrong with the input
34-
*
3533
* @return \stdClass
3634
*/
3735
public function getAsObject()
@@ -40,6 +38,7 @@ public function getAsObject()
4038
}
4139
};
4240

41+
/** @phpstan-ignore-next-line */
4342
$this->assertInstanceOf(Input::class, $class);
4443
}
4544
}

tests/BC/Input/RequestInputTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function testBcForRequestInputInterface(): void
2525
*/
2626
$class = new class implements RequestInput {};
2727

28+
/** @phpstan-ignore-next-line */
2829
$this->assertInstanceOf(RequestInput::class, $class);
2930
}
3031
}

tests/BC/ManagerTest.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@ public function testBcForManagerInterface(): void
3030
*
3131
* @param \Art4\JsonApiClient\Input\Input $input
3232
*
33-
* @throws \Art4\JsonApiClient\Exception\InputException If $input contains invalid JSON API
34-
* @throws \Art4\JsonApiClient\Exception\ValidationException If $input contains invalid JSON API
35-
*
3633
* @return \Art4\JsonApiClient\Accessable
3734
*/
3835
public function parse(Input $input)
@@ -64,6 +61,7 @@ public function getParam($key, $default)
6461
}
6562
};
6663

64+
/** @phpstan-ignore-next-line */
6765
$this->assertInstanceOf(Manager::class, $class);
6866
}
6967
}

tests/BC/Serializer/SerializerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public function serialize(Accessable $data)
3838
}
3939
};
4040

41+
/** @phpstan-ignore-next-line */
4142
$this->assertInstanceOf(Serializer::class, $class);
4243
}
4344
}

0 commit comments

Comments
 (0)