Skip to content

feat(explicit assertions): enable advanced string types and integer ranges#293

Merged
Ocramius merged 1 commit intodoctrine:11.0.xfrom
simPod:assert
Sep 23, 2022
Merged

feat(explicit assertions): enable advanced string types and integer ranges#293
Ocramius merged 1 commit intodoctrine:11.0.xfrom
simPod:assert

Conversation

@simPod
Copy link
Contributor

@simPod simPod commented Sep 22, 2022

  • require slevomat/coding-standard v8.5.1

Follows up #47 and adds support for more types

@simPod
Copy link
Contributor Author

simPod commented Sep 22, 2022

@kukulich I think the new option is broken. See simPod#17 where it's reproduced (simPod@6cd3856).

Enabling new options changes the behaviour so e.g.

/** @var Type $simpleType */
$simpleType = expression();

is transformed like

 $simpleType = expression();
-assert($simpleType instanceof Type);
+assert(is_string($simpleType));

assert($simpleType instanceof Type); was correct.

@kukulich
Copy link
Contributor

kukulich commented Sep 23, 2022

@simPod Please upgrade to 8.5.1 - yes, stupid mistake.

…anges

- require slevomat/coding-standard v8.5.1
@simPod simPod marked this pull request as ready for review September 23, 2022 07:42
@simPod simPod requested a review from a team as a code owner September 23, 2022 07:42
@Ocramius Ocramius added this to the 11.0.0 milestone Sep 23, 2022
@Ocramius Ocramius self-assigned this Sep 23, 2022
@Ocramius Ocramius merged commit baff79f into doctrine:11.0.x Sep 23, 2022
@simPod simPod deleted the assert branch September 23, 2022 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants