Conversation
Ocramius
left a comment
There was a problem hiding this comment.
Let's get psalm happy, before continuing this :D
a6fdf0c to
6f0e7ee
Compare
|
The tests are passing on both PHP 8.1 and 8.2. I added some more test cases too. Not sure if you want to keep There is a lot of mess and code duplication in Idk why is psalm crashing 🤷🏻♂️ |
Ocramius
left a comment
There was a problem hiding this comment.
Overall looking good from the tests: implementation will need a lot of careful reading / focus :)
Otherwise nice work!
I'll check it out locally when I can, and get it shipped.
|
The crash in psalm is... novel :O I wonder if we should just try going |
|
Psalm v5 crashes there too so no solution for that so far 😝 |
1fbc23a to
49d964c
Compare
Signed-off-by: Ion Bazan <ion.bazan@gmail.com>
Signed-off-by: Ion Bazan <ion.bazan@gmail.com>
…ting DNF types Disjunctive Normal Form types are hard, yo! Signed-off-by: Marco Pivetta <ocramius@gmail.com>
|
@IonBazan I'm picking this up: |
|
Great, thanks! Let me know if any help is needed. |
This stuff is a bunch of junk: on purpose. Signed-off-by: Marco Pivetta <ocramius@gmail.com>
…empty-string` Signed-off-by: Marco Pivetta <ocramius@gmail.com>
… effects Signed-off-by: Marco Pivetta <ocramius@gmail.com>
Signed-off-by: Marco Pivetta <ocramius@gmail.com>
…always guaranteed to be generated Signed-off-by: Marco Pivetta <ocramius@gmail.com>
Since `vimeo/psalm:^5`, inheriting from a class that declares generic types also does require generic types to be declared while extending. Signed-off-by: Marco Pivetta <ocramius@gmail.com>
…g and type improvements Signed-off-by: Marco Pivetta <ocramius@gmail.com>
Ocramius
left a comment
There was a problem hiding this comment.
Still working on it - got stuck on paid work :P
…nternals Signed-off-by: Marco Pivetta <ocramius@gmail.com>
…pe` instances Signed-off-by: Marco Pivetta <ocramius@gmail.com>
… `IntersectionType` instances Signed-off-by: Marco Pivetta <ocramius@gmail.com>
Signed-off-by: Marco Pivetta <ocramius@gmail.com>
Signed-off-by: Marco Pivetta <ocramius@gmail.com>
…ted internally Signed-off-by: Marco Pivetta <ocramius@gmail.com>
…/intersection type abstractions Signed-off-by: Marco Pivetta <ocramius@gmail.com>
This massively reduces the internal complexity of the `TypeGenerator`, since we convert `ReflectionType` symbols **directly** to our `@internal` data structures, ready to be rendered. Before this, we would cast the whole `ReflectionType` to a `string` that fits our need, and then we would go back to parsing that string, with a substantial overhead (especially considering the newly introduced validation rules around DNF types). Note that this introduces new Psalm violations that were added to `psalm-baseline.xml`, but which are solved by my work @ vimeo/psalm#8722 Signed-off-by: Marco Pivetta <ocramius@gmail.com>
Signed-off-by: Marco Pivetta <ocramius@gmail.com>
|
@IonBazan as you can see, I ended up using a radically different representation of internal types, mostly so that it can be understood at runtime. Shipping this now :) |
…not useful in this codebase Signed-off-by: Marco Pivetta <ocramius@gmail.com>

Description
Basic support for DNF types (as per #142)
Code review welcome, I'd like to know if this is the right direction. Collaboration is welcome too 🙏🏻 .