phpdoc-parser icon indicating copy to clipboard operation
phpdoc-parser copied to clipboard

Add syntax for subtraction type

Open rvanvelzen opened this issue 1 year ago • 1 comments

This is a preliminary syntax implementation for subtraction type syntax.

Merging now isn't necessary because the work in phpstan-src is far from done. Any feedback is still appreciated though.

rvanvelzen avatar May 08 '24 11:05 rvanvelzen

  1. We have to get rid of all Type inheritance before this is possible to do: https://phpstan.org/blog/why-is-instanceof-type-wrong-and-getting-deprecated
  2. I'm not sure we need a new syntax for this and how it should look like. We could do this simply with subtract-from<X, Y> generics.

ondrejmirtes avatar May 08 '24 11:05 ondrejmirtes