You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* unit test for union type with null
* Nullable union test
* Nullable union bug fix
* Fix test for old php version
* Targeting PHP minimum version 8.0
* Targeting PHP minimum version 8.0
* Targeting PHP minimum version 8.0
* Run cs fix
* Expanding php 8.0 features usage
* Expanding php 8.0 features usage
* Expanding php 8.0 features usage
* Datetime class name bug fix
* Failing tests fixed
* Bad params with stdClass test removed. It's already throws an error in php 8.0
* Improving code with php 8.0 features
* Improving code with php 8.0 features
* Improving code with php 8.0 features
* Improving code with php 8.0 features
* Improving code with php 8.0 features
* Improving code with php 8.0 features
* Expanding php 8.0 features
* drop test for php <=7.4
* remove some php 7.4 polyfill
* Version 6.1 docs. Drop all examples for php <8.0.
* Failed tests fix
* Improving code with php 8 features
* Improving code with php 8 features
* Improving code with php 8 features
* Improving code with php 8 features
* Improving code with php 8 features
* Improving code with php 8 features
* Improving code with php 8 features
* Remove php 7.4 from CI tests
* Improving code with php 8 features
* Improving code with php 8 features
* Replacing array_merge with built-in spread syntax for lists due to big performance difference.
* Removed types: Container does not match CI server psr extension classes
* Failing CI test fix
* Failing CI test fix
* Fix types for fields descriptors. That caused misunderstanding in methods purpose...
* Failing CI test fix.
* Failing CI test fix.
* Failing CI test fix. Just remove throws tag
* Failing CI test fix. Just remove throws tag
* Removed some php<8 code examples
* Remove test limit for only >=8.0 as minimum php version is 8 from now
* Improve type safety
* Improve type safety
* Improve type safety
* Improve type safety
* Remove unnecessary assertion
* Replace with native assertion
* Remove PHP_MAJOR_VERSION >= 8 conditions and redundant assertions as minimum php version is 8.0
* Replace webmozart/assert with native assertions, throw logic exception where needed.
Consequently, remove phpstan/phpstan-webmozart-assert.
* Improve type safety with better array type explanation
Co-authored-by: madness <ss@gmail.com>
// In this mode, no exceptions will be thrown for incorrect annotations (unless the name of the annotation we are looking for is part of the docblock)
@@ -66,7 +64,7 @@ class AnnotationReader
66
64
67
65
/**
68
66
* @param string $mode One of self::LAX_MODE or self::STRICT_MODE. If true, no exceptions will be thrown for incorrect annotations in code coming from the "vendor/" directory.
69
-
* @param string[] $strictNamespaces Classes in those namespaces MUST have valid annotations (otherwise, an error is thrown).
67
+
* @param array<int,string> $strictNamespaces Classes in those namespaces MUST have valid annotations (otherwise, an error is thrown).
Copy file name to clipboardExpand all lines: src/Annotations/UseInputType.php
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,7 @@ public function __construct(array|string $inputType = [])
40
40
$values = ['inputType' => $values];
41
41
}
42
42
if (! isset($values['inputType'])) {
43
-
thrownewBadMethodCallException('The @UseInputType annotation must be passed an input type. For instance: "@UseInputType(for="$input", inputType="MyInputType")" in PHP 7+ or #[UseInputType("MyInputType")] in PHP 8+');
43
+
thrownewBadMethodCallException('The @UseInputType annotation must be passed an input type. For instance: #[UseInputType("MyInputType")]');
44
44
}
45
45
$this->inputType = $values['inputType'];
46
46
if (! isset($values['for'])) {
@@ -53,7 +53,7 @@ public function __construct(array|string $inputType = [])
53
53
publicfunctiongetTarget(): string
54
54
{
55
55
if ($this->for === null) {
56
-
thrownewBadMethodCallException('The @UseInputType annotation must be passed a target and an input type. For instance: "@UseInputType(for="$input", inputType="MyInputType")" in PHP 7+ or #[UseInputType("MyInputType")] in PHP 8+');
56
+
thrownewBadMethodCallException('The @UseInputType annotation must be passed a target and an input type. For instance: #[UseInputType("MyInputType")]');
0 commit comments